|
@@ -262,15 +262,11 @@ public class controlAlgorithm implements AddOn {
|
|
|
powerplantMaxOutput = Float.parseFloat(powerplantMaxOutputTextfield.getText());
|
|
|
blackstartStartTime = Integer.parseInt(blackstartStartTimeTextfield.getText());
|
|
|
control.getModel().setIterations(Integer.parseInt(simulationDurationTextfield.getText()));
|
|
|
- for (StorageElement se :
|
|
|
- getStorageElements()) {
|
|
|
- switch (se.getEleName()){
|
|
|
- case "Storage":
|
|
|
- se.setStateOfCharge(Float.parseFloat(storageStartCharge.getText()));
|
|
|
- break;
|
|
|
- case "Car":
|
|
|
- se.setStateOfCharge(Float.parseFloat(carStartCharge.getText()));
|
|
|
- break;
|
|
|
+ for (StorageElement se : getStorageElements()) {
|
|
|
+ if ("Car".equals(se.getEleName())) {
|
|
|
+ se.setStateOfCharge(Float.parseFloat(carStartCharge.getText()));
|
|
|
+ } else {
|
|
|
+ se.setStateOfCharge(Float.parseFloat(storageStartCharge.getText()));
|
|
|
}
|
|
|
}
|
|
|
updateVisual();
|
|
@@ -416,12 +412,6 @@ public class controlAlgorithm implements AddOn {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-// if (!SPC.batteriesFull()) {
|
|
|
-// // TODO: load unused batteries
|
|
|
-// } else {
|
|
|
-//
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
private void enableAllConsumers() {
|
|
@@ -557,9 +547,9 @@ public class controlAlgorithm implements AddOn {
|
|
|
* To let the User See the current state without touching the Canvas.
|
|
|
*/
|
|
|
private void updateVisual() {
|
|
|
- System.out.println("Start updateVisual in Iteration: " + control.getModel().getCurIteration());
|
|
|
+// System.out.println("Start updateVisual in Iteration: " + control.getModel().getCurIteration());
|
|
|
control.calculateStateAndVisualForCurrentTimeStep();
|
|
|
control.updateCanvas();
|
|
|
- System.out.println("Finish updateVisual in Iteration: " + control.getModel().getCurIteration());
|
|
|
+// System.out.println("Finish updateVisual in Iteration: " + control.getModel().getCurIteration());
|
|
|
}
|
|
|
}
|