|
@@ -292,6 +292,7 @@ public class controlAlgorithm implements AddOn {
|
|
|
* this iteration
|
|
|
*/
|
|
|
private boolean blackstartAlgo() {
|
|
|
+ printCurrentEnergyState();
|
|
|
if (currentRenewableProduction() < getEnergyRequiredForPowerplantBlackstart()) {
|
|
|
// renewable energy production is not sufficient for the blackstart
|
|
|
if (SPC.currentPossibleStorageProduction() >= getEnergyRequiredForPowerplantBlackstart()
|
|
@@ -317,7 +318,6 @@ public class controlAlgorithm implements AddOn {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //TODO: das ist ja eigentlich doppelt
|
|
|
private ArrayList<StorageElement> getStorageElements() {
|
|
|
ArrayList<StorageElement> storageElements = new ArrayList<>();
|
|
|
for (HolonObject holonObject : control.getModel().getAllHolonObjectsOnCanvas()) {
|
|
@@ -344,15 +344,8 @@ public class controlAlgorithm implements AddOn {
|
|
|
}
|
|
|
|
|
|
private void enableConsumers(float energyAvailable) {
|
|
|
- println("currenctrenewable: " + currentRenewableProduction());
|
|
|
- for (StorageElement ele :
|
|
|
- getStorageElements()) {
|
|
|
- println("Storage ID: " + ele.getId() + " at distance " + ele.getLowDistance() + " at charge " + (ele.getStateOfCharge()/60)/1000 + "kWh");
|
|
|
- }
|
|
|
- println("currenctpossiblestorage: " + SPC.currentPossibleStorageProduction());
|
|
|
- println("blackstart resi: " + getEnergyRequiredForPowerplantBlackstart());
|
|
|
- println("current pp production: " + getPowerplantProduction());
|
|
|
- println("energy available for consumers" + energyAvailable);
|
|
|
+// println("current pp production: " + getPowerplantProduction());
|
|
|
+// println("energy available for consumers" + energyAvailable);
|
|
|
|
|
|
// Damit wir immer die gleiche ausgangslage haben //TODO: wirklich?
|
|
|
disableConsumers();
|
|
@@ -368,7 +361,6 @@ public class controlAlgorithm implements AddOn {
|
|
|
// since
|
|
|
// its
|
|
|
// negative
|
|
|
-// System.out.println("Element " + ele.getId() + " was enabled Energy left: "+ energyAvailable);
|
|
|
}
|
|
|
} else {
|
|
|
return;
|
|
@@ -487,6 +479,16 @@ public class controlAlgorithm implements AddOn {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ private void printCurrentEnergyState(){
|
|
|
+ println("blackstart resi: " + getEnergyRequiredForPowerplantBlackstart());
|
|
|
+ println("currenctrenewable: " + currentRenewableProduction());
|
|
|
+ println("currenctpossiblestorage: " + SPC.currentPossibleStorageProduction());
|
|
|
+ for (StorageElement ele :
|
|
|
+ getStorageElements()) {
|
|
|
+ println("Storage " + ele.getId() + " charge: " + (ele.getStateOfCharge()/60)/1000 + "kWh" + " at distance " + (ele.getLowDistance()+ele.getHighDistance()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* To let the User See the current state without touching the Canvas.
|
|
|
*/
|