From c61f3e0179959e9338ec7a7f402581bea8493297 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Fri, 15 Aug 2025 12:04:41 +0200 Subject: [PATCH 1/6] Renamed J_EACharger to J_EAChargePoint --- _alp/Agents/Zero_Interface/Code/Functions.java | 12 ++++++------ _alp/Agents/Zero_Interface/Variables.xml | 4 ++-- _alp/Agents/Zero_Loader/Code/Functions.java | 8 ++++---- _alp/Agents/tabElectricity/Code/Functions.java | 8 ++++---- _alp/Classes/Class.J_ModelSave.java | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index cdee4083..56e151a3 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -2591,15 +2591,15 @@ Pair f_getPresentationPositionIteration( double f_initialChargerOrder() {/*ALCODESTART::1750247111856*/ -c_orderedV1GChargers = new ArrayList(); -c_orderedV2GChargers = new ArrayList(); +c_orderedV1GChargers = new ArrayList(); +c_orderedV2GChargers = new ArrayList(); c_orderedPublicChargers = new ArrayList(); -List c_inactiveV1GChargers = new ArrayList(); -List c_inactiveV2GChargers = new ArrayList(); +List c_inactiveV1GChargers = new ArrayList(); +List c_inactiveV2GChargers = new ArrayList(); for (GridConnection gc : energyModel.f_getActiveGridConnections()) { - for (J_EACharger charger : gc.c_chargers) { + for (J_EAChargePoint charger : gc.c_chargers) { if (charger.V1GCapable) { c_orderedV1GChargers.add(0, charger); } @@ -2616,7 +2616,7 @@ Pair f_getPresentationPositionIteration( } for (GridConnection gc : energyModel.f_getPausedGridConnections()) { - for (J_EACharger charger : gc.c_chargers) { + for (J_EAChargePoint charger : gc.c_chargers) { if (charger.V1GCapable) { c_inactiveV1GChargers.add(0, charger); } diff --git a/_alp/Agents/Zero_Interface/Variables.xml b/_alp/Agents/Zero_Interface/Variables.xml index ee0e841a..1d9ecf52 100644 --- a/_alp/Agents/Zero_Interface/Variables.xml +++ b/_alp/Agents/Zero_Interface/Variables.xml @@ -3155,7 +3155,7 @@ true ArrayList - J_EACharger + J_EAChargePoint String @@ -3191,7 +3191,7 @@ true ArrayList - J_EACharger + J_EAChargePoint String diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 87a5b43b..a16c7c2c 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -1680,7 +1680,7 @@ GISRegion f_createGISRegionChargingStation(double lat,double lon) List chargerProfile = f_getChargerProfile(); boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); - new J_EACharger(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable); + new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); } else{ for(int k = 0; k < chargingStation.p_nbOfChargers*avgc_data.p_avgVehiclesPerChargePoint; k++ ){ @@ -1726,9 +1726,9 @@ GISRegion f_createGISRegionChargingStation(double lat,double lon) //Create vehicles that charge at the charging station if(chargingStation.p_chargingVehicleType == OL_EnergyAssetType.CHARGER){ List chargerProfile = f_getChargerProfile(); - boolean V1GCapable = randomTrue(avgc_data.p_v1gProbability); - boolean V2GCapable = randomTrue(avgc_data.p_v2gProbability); - new J_EACharger(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable); + boolean V1GCapable = true; //randomTrue(avgc_data.p_v1gProbability); + boolean V2GCapable = true; //randomTrue(avgc_data.p_v2gProbability); + new J_EAChargePoint(chargingStation, chargingStation.p_maxChargingPower_kW, energyModel.p_timeStep_h, chargerProfile, V1GCapable, V2GCapable, 2); } else{ for(int k = 0; k < avgc_data.p_avgVehiclesPerChargePoint; k++ ){ diff --git a/_alp/Agents/tabElectricity/Code/Functions.java b/_alp/Agents/tabElectricity/Code/Functions.java index 5e67ad24..2aaa7551 100644 --- a/_alp/Agents/tabElectricity/Code/Functions.java +++ b/_alp/Agents/tabElectricity/Code/Functions.java @@ -565,7 +565,7 @@ else if ( gc instanceof GCUtility ) { int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); while (currentNbChargers < nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> !x.V1GCapable); + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> !x.V1GCapable); j_ea.V1GCapable = true; currentNbChargers++; zero_Interface.c_orderedV1GChargers.remove(j_ea); @@ -573,7 +573,7 @@ else if ( gc instanceof GCUtility ) { } while (currentNbChargers > nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> x.V1GCapable); + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV1GChargers, x -> x.V1GCapable); j_ea.V1GCapable = false; currentNbChargers--; zero_Interface.c_orderedV1GChargers.remove(j_ea); @@ -595,7 +595,7 @@ else if ( gc instanceof GCUtility ) { int nbChargersGoal = roundToInt(goal_pct / 100.0 * totalNbChargers); while (currentNbChargers < nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> !x.V2GCapable); + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> !x.V2GCapable); j_ea.V2GCapable = true; currentNbChargers++; zero_Interface.c_orderedV2GChargers.remove(j_ea); @@ -603,7 +603,7 @@ else if ( gc instanceof GCUtility ) { } while (currentNbChargers > nbChargersGoal) { - J_EACharger j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> x.V2GCapable); + J_EAChargePoint j_ea = findFirst(zero_Interface.c_orderedV2GChargers, x -> x.V2GCapable); j_ea.V2GCapable = false; currentNbChargers--; zero_Interface.c_orderedV2GChargers.remove(j_ea); diff --git a/_alp/Classes/Class.J_ModelSave.java b/_alp/Classes/Class.J_ModelSave.java index a6f8a612..d54ca67f 100644 --- a/_alp/Classes/Class.J_ModelSave.java +++ b/_alp/Classes/Class.J_ModelSave.java @@ -17,8 +17,8 @@ public class J_ModelSave implements Serializable { public ArrayList c_orderedVehiclesPrivateParking; public ArrayList c_orderedParkingSpaces; - public ArrayList c_orderedV1GChargers; - public ArrayList c_orderedV2GChargers; + public ArrayList c_orderedV1GChargers; + public ArrayList c_orderedV2GChargers; public ArrayList c_orderedPublicChargers; /** From 76795c64e740f47bcd6d25d4f72e2a5ae18d37c6 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Mon, 18 Aug 2025 13:52:04 +0200 Subject: [PATCH 2/6] Removal of p_householdEV from GCHouse --- _alp/Agents/Zero_Loader/Code/Functions.java | 44 ++++++++++--------- .../Agents/tabElectricity/Code/Functions.java | 2 +- _alp/Agents/tabHeating/Code/Functions.java | 6 +-- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index a16c7c2c..73af74df 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -3384,7 +3384,7 @@ else if (GCH.p_bouwjaar < 2015) { double f_addEnergyAssetsToHouses(GCHouse house,double jaarlijksElectriciteitsVerbruik) {/*ALCODESTART::1749728889986*/ //Add generic electricity demand profile -GridNode gn = randomWhere(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); +GridNode gn = randomWhere(energyModel.pop_gridNodes, x -> x.p_gridNodeID.equals( house.p_parentNodeElectricID)); // Why random?? if ( ! gn.p_hasProfileData ){ f_addElectricityDemandProfile(house, jaarlijksElectriciteitsVerbruik, null, false, "default_house_electricity_demand_fr"); } @@ -3432,26 +3432,28 @@ else if (GCH.p_bouwjaar < 2015) { double f_setHouseHeatingPreferences(GCHouse house) {/*ALCODESTART::1749728889988*/ -if( randomTrue(0.5) ){ //50% kans op ochtend ritme - house.v_nightTempSetpoint_degC = uniform_discr(12,18); - house.v_dayTempSetpoint_degC = uniform_discr(18, 24); - house.v_heatingOn_time = uniform_discr(5,10) + uniform_discr(0,4) / 4.0; - house.v_heatingOff_time = uniform_discr(21,23); - house.p_heatingKickinTreshold_degC = roundToDecimal(uniform(0,1),1); -} -else if (randomTrue(0.5) ){ // 25% kans op hele dag aan - house.v_nightTempSetpoint_degC = uniform_discr(18,21); - house.v_dayTempSetpoint_degC = house.v_nightTempSetpoint_degC; - house.v_heatingOn_time = -1; - house.v_heatingOff_time = 25; - house.p_heatingKickinTreshold_degC = roundToDecimal(uniform(0, 1),1); -} -else { // 25% kans op smiddags/savonds aan - house.v_nightTempSetpoint_degC = uniform_discr(12,18); - house.v_dayTempSetpoint_degC = uniform_discr(18, 24); - house.v_heatingOn_time = uniform_discr(14, 16) + uniform_discr(0,4) / 4.0; - house.v_heatingOff_time = uniform_discr(21,23); - house.p_heatingKickinTreshold_degC = roundToDecimal(uniform(0, 1),1); +if (house.p_heatingManagement instanceof J_HeatingManagementSimple heatingManagement) { + if( randomTrue(0.5) ){ //50% kans op ochtend ritme + heatingManagement.nightTimeSetPoint_degC = uniform_discr(12,18); + heatingManagement.dayTimeSetPoint_degC = uniform_discr(18, 24); + heatingManagement.startOfDay_h = uniform_discr(5,10) + uniform_discr(0,4) / 4.0; + heatingManagement.startOfNight_h = uniform_discr(21,23); + // house.p_heatingKickinTreshold_degC = roundToDecimal(uniform(0,1),1); + } + else if (randomTrue(0.5) ){ // 25% kans op hele dag aan + heatingManagement.nightTimeSetPoint_degC = uniform_discr(18,21); + heatingManagement.dayTimeSetPoint_degC = heatingManagement.nightTimeSetPoint_degC; + heatingManagement.startOfDay_h= -1; + heatingManagement.startOfNight_h = 25; + //house.p_heatingKickinTreshold_degC = roundToDecimal(uniform(0, 1),1); + } + else { // 25% kans op smiddags/savonds aan + heatingManagement.nightTimeSetPoint_degC = uniform_discr(12,18); + heatingManagement.dayTimeSetPoint_degC = uniform_discr(18, 24); + heatingManagement.startOfDay_h = uniform_discr(14, 16) + uniform_discr(0,4) / 4.0; + heatingManagement.startOfNight_h = uniform_discr(21,23); + //house.p_heatingKickinTreshold_degC = roundToDecimal(uniform(0, 1),1); + } } /*ALCODEEND*/} diff --git a/_alp/Agents/tabElectricity/Code/Functions.java b/_alp/Agents/tabElectricity/Code/Functions.java index 2aaa7551..449c86af 100644 --- a/_alp/Agents/tabElectricity/Code/Functions.java +++ b/_alp/Agents/tabElectricity/Code/Functions.java @@ -625,7 +625,7 @@ else if ( gc instanceof GCUtility ) { double f_setVehiclesPrivateParking(double privateParking_pct) {/*ALCODESTART::1750328750011*/ -int nbHousesWithEV = count(zero_Interface.energyModel.Houses, x -> x.p_eigenOprit && x.p_householdEV != null); +int nbHousesWithEV = count(zero_Interface.energyModel.Houses, x -> x.p_eigenOprit && x.c_electricVehicles.size() > 0); int desiredNbOfHousesWithEV = roundToInt(privateParking_pct / 100 * zero_Interface.c_orderedVehiclesPrivateParking.size()); // we scale the consumption instead of getting the diesel/EV parameter from avgc data to represent the 'size' of the car diff --git a/_alp/Agents/tabHeating/Code/Functions.java b/_alp/Agents/tabHeating/Code/Functions.java index c7020573..374e9f4f 100644 --- a/_alp/Agents/tabHeating/Code/Functions.java +++ b/_alp/Agents/tabHeating/Code/Functions.java @@ -362,10 +362,7 @@ Pair f_calculateNumberOfGhostHeatingSystems(List gc house.f_removeAllHeatingAssets(); house.p_parentNodeHeat = null; house.p_parentNodeHeatID = null; - - //house.p_heatingType = OL_GridConnectionHeatingType.GASBURNER; - house.v_districtHeatDelivery_kW = 0; - + //add gasburner J_EAConsumption heatDemandAsset = findFirst(house.c_consumptionAssets, j_ea -> j_ea.energyAssetType == OL_EnergyAssetType.HEAT_DEMAND); J_EAConversionGasBurner gasBurner; @@ -493,7 +490,6 @@ else if (house.p_BuildingThermalAsset != null){ for (GCHouse house: zero_Interface.energyModel.Houses ) { // Disconnect from GridNode Heat house.p_parentNodeHeat = null; - house.v_districtHeatDelivery_kW = 0; // Remove Heatpump and replace with gasburner house.f_removeAllHeatingAssets(); From 19c4b694531702c30b818415879088f8d879cad3 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:21:41 +0200 Subject: [PATCH 3/6] 'Slim laden' setting in eHub-tab now enables max power charging. (which is most appliccable for eTruck fleets) Removed 'max power charging' checkbox. (the name is also quite meaningless to most people) --- _alp/Agents/Zero_Loader/Code/Functions.java | 3 +-- _alp/Agents/tabEHub/Code/AdditionalClassCode.java | 4 ++-- _alp/Agents/tabEHub/Levels/Level.level.xml | 10 ++++++---- _alp/Agents/tabElectricity/Levels/Level.level.xml | 4 ++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/_alp/Agents/Zero_Loader/Code/Functions.java b/_alp/Agents/Zero_Loader/Code/Functions.java index 73af74df..413cd042 100644 --- a/_alp/Agents/Zero_Loader/Code/Functions.java +++ b/_alp/Agents/Zero_Loader/Code/Functions.java @@ -1640,8 +1640,7 @@ GISRegion f_createGISRegionChargingStation(double lat,double lon) //Is active at start? chargingStation.v_isActive = dataChargingStation.initially_active(); - //Set charging attitude: MAX_POWER should always be the starting case for charge stations to prevent more charging than possible - chargingStation.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.MAX_SPREAD); + chargingStation.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); //Create and connect owner ConnectionOwner owner = energyModel.add_pop_connectionOwners(); diff --git a/_alp/Agents/tabEHub/Code/AdditionalClassCode.java b/_alp/Agents/tabEHub/Code/AdditionalClassCode.java index 29c3ed9f..dca52b46 100644 --- a/_alp/Agents/tabEHub/Code/AdditionalClassCode.java +++ b/_alp/Agents/tabEHub/Code/AdditionalClassCode.java @@ -6,9 +6,9 @@ public ShapeCheckBox getCb_powerChargingEVs() { return this.cb_powerChargingEVs; } -public ShapeCheckBox getCb_spreadChargingEVs() { +/*public ShapeCheckBox getCb_spreadChargingEVs() { return this.cb_spreadChargingEVs; -} +}*/ public ShapeCheckBox getCb_curtailment() { return this.cb_curtailment; diff --git a/_alp/Agents/tabEHub/Levels/Level.level.xml b/_alp/Agents/tabEHub/Levels/Level.level.xml index 59e59044..07a7d32e 100644 --- a/_alp/Agents/tabEHub/Levels/Level.level.xml +++ b/_alp/Agents/tabEHub/Levels/Level.level.xml @@ -99,8 +99,9 @@ false 1722253487935 - 260 - 33 + true + 450 + 30