Skip to content

Commit

Permalink
Merge branch 'release/2019.13.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Oct 10, 2019
2 parents c259000 + 07df381 commit 0d68afd
Show file tree
Hide file tree
Showing 38 changed files with 471 additions and 732 deletions.
2 changes: 1 addition & 1 deletion cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<!-- https://mvnrepository.com/artifact/com.github.scribejava/scribejava-core -->
<groupId>com.github.scribejava</groupId>
<artifactId>scribejava-core</artifactId>
<version>6.8.1</version>
<version>6.9.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/single_document.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= OpenEMS - Open Energy Management System
ifndef::toc[]
(c) 2019 OpenEMS Association e.V.
Version 2019.12.0
Version 2019.13.0
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class OpenemsConstants {
*
* This is usually the number of the sprint within the year
*/
public final static short VERSION_MINOR = 12;
public final static short VERSION_MINOR = 13;

/**
* The patch version of OpenEMS.
Expand Down
10 changes: 5 additions & 5 deletions io.openems.edge.application/EdgeApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,20 @@
com.ghgande.j2mod;version='[2.5.5,2.5.6)',\
io.openems.edge.controller.ess.delaycharge;version=snapshot,\
io.openems.edge.meter.discovergy;version=snapshot,\
com.fasterxml.jackson.core.jackson-annotations;version='[2.9.0,2.9.1)',\
com.fasterxml.jackson.core.jackson-core;version='[2.9.9,2.9.10)',\
com.fasterxml.jackson.core.jackson-databind;version='[2.9.9,2.9.10)',\
io.openems.edge.pvinverter.kaco.blueplanet;version=snapshot,\
io.openems.edge.controller.selltogridlimit;version=snapshot,\
com.sun.jna;version='[5.4.0,5.4.1)',\
io.openems.edge.pvinverter.sunspec;version=snapshot,\
io.openems.edge.predictor.persistencemodel;version=snapshot,\
io.openems.edge.tesla.powerwall2;version=snapshot,\
io.openems.edge.evcs.cluster;version=snapshot,\
com.github.scribejava.core;version='[6.8.1,6.8.2)',\
com.google.guava;version='[28.1.0,28.1.1)',\
org.ops4j.pax.logging.pax-logging-api;version='[1.11.2,1.11.3)',\
org.ops4j.pax.logging.pax-logging-service;version='[1.11.2,1.11.3)',\
com.fazecast.jSerialComm;version='[2.5.2,2.5.3)',\
io.openems.edge.meter.sunspec;version=snapshot,\
io.openems.edge.solaredge;version=snapshot
io.openems.edge.solaredge;version=snapshot,\
com.fasterxml.jackson.core.jackson-annotations;version='[2.10.0,2.10.1)',\
com.fasterxml.jackson.core.jackson-core;version='[2.10.0,2.10.1)',\
com.fasterxml.jackson.core.jackson-databind;version='[2.10.0,2.10.1)',\
com.github.scribejava.core;version='[6.9.0,6.9.1)'
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public enum SolverStrategy implements OptionsEnum {
ALL_CONSTRAINTS(0, "All Constraints"), //
OPTIMIZE_BY_MOVING_TOWARDS_TARGET(1, "Optimize By Moving Towards Target"), //
OPTIMIZE_BY_KEEPING_TARGET_DIRECTION_AND_MAXIMIZING_IN_ORDER(2,
"Optimize By Keeping Target Direction And Maximizing In Order");
"Optimize By Keeping Target Direction And Maximizing In Order"), //
OPTIMIZE_BY_KEEPING_ALL_EQUAL(3, "Optimize By Keeping All Inverters Equal"); //

private final int value;
private final String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ public void solve() {
SolverStrategy.OPTIMIZE_BY_KEEPING_TARGET_DIRECTION_AND_MAXIMIZING_IN_ORDER,
SolverStrategy.OPTIMIZE_BY_MOVING_TOWARDS_TARGET);
break;

case OPTIMIZE_BY_KEEPING_ALL_EQUAL:
solution = this.tryStrategies(targetDirection, allInverters, targetInverters, allConstraints,
SolverStrategy.OPTIMIZE_BY_KEEPING_ALL_EQUAL,
SolverStrategy.OPTIMIZE_BY_KEEPING_TARGET_DIRECTION_AND_MAXIMIZING_IN_ORDER,
SolverStrategy.OPTIMIZE_BY_MOVING_TOWARDS_TARGET);
break;
}

} catch (NoFeasibleSolutionException | UnboundedSolutionException e) {
Expand Down Expand Up @@ -276,6 +283,9 @@ private SolveSolution tryStrategies(TargetDirection targetDirection, List<Invert
solution = this.optimizeByKeepingTargetDirectionAndMaximizingInOrder(allInverters, targetInverters,
allConstraints, targetDirection);
break;
case OPTIMIZE_BY_KEEPING_ALL_EQUAL:
solution = this.optimizeByKeepingAllEqual(allInverters, allConstraints);
break;
}

if (solution != null) {
Expand Down Expand Up @@ -384,39 +394,27 @@ private void addConstraintsForNotStrictlyDefinedCoefficients(List<Inverter> allI
* @param allConstraints
* @return
*/
// private PointValuePair optimizeByDistributingEqually(List<Inverter>
// targetInverters,
// List<Constraint> allConstraints) {
//
// double[] weights = new double[targetInverters.size()];
// for (int invIndex = 1; invIndex < targetInverters.size(); invIndex++) {
// for (double weight = 1; weight > 0; weight -= LEARNING_RATE) {
// }
// }
//
// List<Constraint> constraints = new ArrayList<>(allConstraints);
// for (int i = 1; i < targetInverters.size(); i++) {
// Inverter inv0 = targetInverters.get(0);
// Inverter inv1 = targetInverters.get(i);
// constraints.add(new Constraint(inv0.toString() + "/" + inv1.toString() + ":
// distribute equally",
// new LinearCoefficient[] { //
// new LinearCoefficient(this.data.getCoefficient(inv0.getEss(),
// inv0.getPhase(), Pwr.ACTIVE),
// 1), //
// new LinearCoefficient(this.data.getCoefficient(inv1.getEss(),
// inv1.getPhase(), Pwr.ACTIVE),
// 1) //
// }, Relationship.EQUALS, 0));
// }
//
// try {
// return this.solveWithConstraints(constraints);
// } catch (NoFeasibleSolutionException | UnboundedSolutionException e) {
// log.warn("Unable to solve with optimizeByDistributingEqually()");
// return null;
// }
// }
private PointValuePair optimizeByKeepingAllEqual(List<Inverter> allInverters, List<Constraint> allConstraints) {
try {
List<Constraint> constraints = new ArrayList<>(allConstraints);
// Create weighted Constraint between first inverter and every other inverter
Inverter invA = allInverters.get(0);
for (int j = 1; j < allInverters.size(); j++) {
Inverter invB = allInverters.get(j);
Constraint c = new Constraint(invA.toString() + "|" + invB.toString() + ": distribute equally",
new LinearCoefficient[] {
new LinearCoefficient(
this.data.getCoefficient(invA.getEssId(), invA.getPhase(), Pwr.ACTIVE), 1),
new LinearCoefficient(
this.data.getCoefficient(invB.getEssId(), invB.getPhase(), Pwr.ACTIVE), -1) },
Relationship.EQUALS, 0);
constraints.add(c);
}
return this.solveWithConstraints(constraints);
} catch (OpenemsException | NoFeasibleSolutionException | UnboundedSolutionException e) {
return null;
}
}

/**
* Tries to keep all Target Inverters in the right TargetDirection; then
Expand Down
50 changes: 0 additions & 50 deletions ui/evcsCluster.component.html

This file was deleted.

122 changes: 0 additions & 122 deletions ui/evcsCluster.component.ts

This file was deleted.

Loading

0 comments on commit 0d68afd

Please sign in to comment.