Skip to content

Commit

Permalink
Merge pull request #49 from Zenmo/Bugfix-RemoveTheJ_EA
Browse files Browse the repository at this point in the history
Bugfix RemoveTheJ_EA
  • Loading branch information
Luc-Sol committed Sep 2, 2024
2 parents e00f9f5 + adbc6da commit a20fa13
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
22 changes: 20 additions & 2 deletions Zero_engine.alp
Original file line number Diff line number Diff line change
Expand Up @@ -23231,6 +23231,8 @@ if (j_ea instanceof J_EAVehicle) {
p_primaryHeatingAsset = (J_EAConversion)j_ea;
} else if (j_ea instanceof J_EAConversionHydrogenBurner) {
p_primaryHeatingAsset = (J_EAConversion)j_ea;
} else if (j_ea instanceof J_EAConversionElectrolyserAte) {
c_electrolyserAssets.add(j_ea);
}
} else if (j_ea instanceof J_EAStorage) {
c_storageAssets.add((J_EAStorage)j_ea);
Expand Down Expand Up @@ -23866,6 +23868,7 @@ if (j_ea instanceof J_EAVehicle) {
} else if (vehicle instanceof J_EAEV) {
c_vehiclesAvailableForCharging.remove((J_EAEV)vehicle);
energyModel.c_EVs.remove((J_EAEV)vehicle);
c_EvAssets.remove(j_ea);
}
c_vehicleAssets.remove(j_ea);

Expand All @@ -23878,6 +23881,9 @@ if (j_ea instanceof J_EAVehicle) {
if (j_ea.energyAssetType == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) {
p_DHWAsset = null;
}
if( j_ea.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ) {
c_fixedConsumptionElectricAssets.remove(j_ea);
}
} else if (j_ea instanceof J_EAProduction) {
c_productionAssets.remove((J_EAProduction)j_ea);
//energyModel.c_productionAssets.remove((J_EAProduction)j_ea);
Expand All @@ -23891,25 +23897,35 @@ if (j_ea instanceof J_EAVehicle) {
l_parentNodeElectric.getConnectedAgent().f_updateTotalInstalledProductionAssets(OL_EnergyAssetType.PHOTOVOLTAIC, j_ea.getElectricCapacity_kW(), false);
}
energyModel.v_totalInstalledPVPower_kW -= j_ea.getElectricCapacity_kW();
c_pvAssets.remove(j_ea);
}
else if (j_ea.energyAssetType == OL_EnergyAssetType.WINDMILL) {
v_totalInstalledWindPower_kW -= j_ea.getElectricCapacity_kW();
if (l_parentNodeElectric.getConnectedAgent() != null) {
l_parentNodeElectric.getConnectedAgent().f_updateTotalInstalledProductionAssets(OL_EnergyAssetType.WINDMILL, j_ea.getElectricCapacity_kW(), false);
}
energyModel.v_totalInstalledWindPower_kW -= j_ea.getElectricCapacity_kW();
c_windAssets.remove(j_ea);
}
} else if (j_ea instanceof J_EAConversion) {
c_conversionAssets.remove((J_EAConversion)j_ea);
if (j_ea.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB) {
c_electricHobAssets.remove(j_ea);
c_conversionElectricAssets.remove(j_ea);
}
if ( j_ea.energyAssetType == OL_EnergyAssetType.GAS_PIT | j_ea.energyAssetType == OL_EnergyAssetType.ELECTRIC_HOB){
p_cookingTracker = null;
} else if (j_ea instanceof J_EAConversionGasBurner) {
p_primaryHeatingAsset = null;
} else if (j_ea instanceof J_EAConversionHeatPump) {
p_primaryHeatingAsset = null;
energyModel.c_ambientAirDependentAssets.remove(j_ea);
//} else if (j_ea instanceof J_EAConversionCurtailer) {
// p_curtailer = null;
c_electricHeatpumpAssets.remove(j_ea);
c_conversionElectricAssets.remove(j_ea);
} else if (j_ea instanceof J_EAConversionHydrogenBurner) {
p_primaryHeatingAsset = null;
} else if (j_ea instanceof J_EAConversionElectrolyserAte) {
c_electrolyserAssets.remove(j_ea);
}
} else if (j_ea instanceof J_EAStorage) {
c_storageAssets.remove((J_EAStorage)j_ea);
Expand All @@ -23921,6 +23937,8 @@ if (j_ea instanceof J_EAVehicle) {
p_gasBuffer = null;
} else if (j_ea instanceof J_EAStorageElectric) {
p_batteryAsset = null;
c_batteryAssets.remove(j_ea);

}
} else if (j_ea instanceof J_EAProfile) {
//p_energyProfile = null;
Expand Down
4 changes: 2 additions & 2 deletions database/db.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#HSQL Database Engine 2.7.1
#Mon Aug 26 17:11:00 CEST 2024
tx_timestamp=13594997
#Thu Aug 29 14:13:23 CEST 2024
tx_timestamp=13595204
modified=no
version=2.7.1
2 changes: 1 addition & 1 deletion database/db.script
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SET FILES NIO TRUE
SET FILES NIO SIZE 256
SET FILES LOG TRUE
SET FILES LOG SIZE 50
SET FILES CHECK 13594997
SET FILES CHECK 13595204
SET DATABASE COLLATION "SQL_TEXT" PAD SPACE
CREATE USER SA PASSWORD DIGEST 'd41d8cd98f00b204e9800998ecf8427e'
ALTER USER SA SET LOCAL TRUE
Expand Down

0 comments on commit a20fa13

Please sign in to comment.