diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index 1f3dead1..a19c1b70 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -2427,15 +2427,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); } @@ -2452,7 +2452,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 3b4daf8a..9b8380ea 100644 --- a/_alp/Agents/Zero_Interface/Variables.xml +++ b/_alp/Agents/Zero_Interface/Variables.xml @@ -3211,7 +3211,7 @@ true ArrayList - J_EACharger + J_EAChargePoint String @@ -3247,7 +3247,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 e02cbca3..c982cc67 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(); @@ -1680,7 +1679,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 +1725,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++ ){ @@ -3085,8 +3084,8 @@ J_ChargingSession f_createChargingSession(String chargingSessionData) {/*ALCODESTART::1749648772203*/ String[] chargingSessionInfo = chargingSessionData.split("/"); -int startIndex = Integer.parseInt(chargingSessionInfo[0]); -int endIndex = Integer.parseInt(chargingSessionInfo[1]); +double startIndex = Double.parseDouble(chargingSessionInfo[0]); +double endIndex = Double.parseDouble(chargingSessionInfo[1]); double chargingDemand_kWh = Double.parseDouble(chargingSessionInfo[2]); double batteryCap_kWh = Double.parseDouble(chargingSessionInfo[3]); double chargingPower_kW = Double.parseDouble(chargingSessionInfo[5]); @@ -3384,7 +3383,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 +3431,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 6fddf60a..458531ec 100644 --- a/_alp/Agents/tabElectricity/Code/Functions.java +++ b/_alp/Agents/tabElectricity/Code/Functions.java @@ -512,7 +512,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); @@ -520,7 +520,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); @@ -542,7 +542,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); @@ -550,7 +550,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/Agents/tabElectricity/Levels/Level.level.xml b/_alp/Agents/tabElectricity/Levels/Level.level.xml index 72d9fab2..600c740b 100644 --- a/_alp/Agents/tabElectricity/Levels/Level.level.xml +++ b/_alp/Agents/tabElectricity/Levels/Level.level.xml @@ -2149,10 +2149,13 @@ f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), gr_settingsV2G.setVisible(false); for( GCHouse house : zero_Interface.energyModel.Houses ){ - house.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); + //house.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); + house.f_addChargingManagementToGC(OL_ChargingAttitude.SIMPLE, false); + house.f_activateV2GChargingMode(false); } for( GCPublicCharger publicCharger : zero_Interface.energyModel.PublicChargers ){ - publicCharger.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); + //publicCharger.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.SIMPLE); + publicCharger.f_activateV2GChargingMode(false); } break; case 1: @@ -2160,10 +2163,13 @@ f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), gr_settingsV2G.setVisible(false); for( GCHouse house : zero_Interface.energyModel.Houses ){ - house.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.V1G); + //house.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.BALANCE); + house.f_addChargingManagementToGC(OL_ChargingAttitude.BALANCE, false); + house.f_activateV2GChargingMode(false); } for( GCPublicCharger publicCharger : zero_Interface.energyModel.PublicChargers ){ - publicCharger.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.V1G); + //publicCharger.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.PRICE); + publicCharger.f_activateV2GChargingMode(false); } break; case 2: @@ -2171,10 +2177,13 @@ f_setResidentialBatteries( sl_householdBatteriesResidentialArea_pct.getValue(), gr_settingsV2G.setVisible(true); for( GCHouse house : zero_Interface.energyModel.Houses ){ - house.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.V2G); + //house.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.V2G); + house.f_addChargingManagementToGC(OL_ChargingAttitude.BALANCE, false); + house.f_activateV2GChargingMode(true); } for( GCPublicCharger publicCharger : zero_Interface.energyModel.PublicChargers ){ - publicCharger.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.V2G); + //publicCharger.set_p_chargingAttitudeVehicles(OL_ChargingAttitude.V2G); + publicCharger.f_activateV2GChargingMode(true); } break; } diff --git a/_alp/Agents/tabHeating/Code/Functions.java b/_alp/Agents/tabHeating/Code/Functions.java index 0aae441c..7a576729 100644 --- a/_alp/Agents/tabHeating/Code/Functions.java +++ b/_alp/Agents/tabHeating/Code/Functions.java @@ -298,10 +298,7 @@ int f_setHeatingSystemsWithCompanyUI(List gcList,double targetHeatPum 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; @@ -429,7 +426,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(); diff --git a/_alp/Agents/tabMobility/Code/Functions.java b/_alp/Agents/tabMobility/Code/Functions.java index 6855c51a..fe0cbaf4 100644 --- a/_alp/Agents/tabMobility/Code/Functions.java +++ b/_alp/Agents/tabMobility/Code/Functions.java @@ -1542,7 +1542,7 @@ else if (vehicle instanceof J_EAHydrogenVehicle){ double f_setChargingAttitude(OL_ChargingAttitude selectedChargingAttitude,List gcList) {/*ALCODESTART::1754990674760*/ -gcList.forEach(x -> x.set_p_chargingAttitudeVehicles(selectedChargingAttitude)); +gcList.forEach(x -> x.f_addChargingManagementToGC(selectedChargingAttitude, false)); //Update variable to change to custom scenario diff --git a/_alp/Agents/tabMobility/Levels/Level.level.xml b/_alp/Agents/tabMobility/Levels/Level.level.xml index 631685c2..ec6dff43 100644 --- a/_alp/Agents/tabMobility/Levels/Level.level.xml +++ b/_alp/Agents/tabMobility/Levels/Level.level.xml @@ -1045,7 +1045,7 @@ f_setElectricVans( zero_Interface.energyModel.f_getActiveGridConnections(), sl_e true OL_ChargingAttitude selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; if(cb_spreadChargingEVs.isSelected()){ - selectedChargingAttitude = OL_ChargingAttitude.MAX_SPREAD; + selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; } f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getSliderGridConnections_all()); @@ -1207,17 +1207,17 @@ f_setChargingAttitude(selectedChargingAttitude, uI_Tabs.f_getSliderGridConnectio OL_ChargingAttitude selectedChargingAttitude = null; switch(cb_setChargingAttitude.getValue()){ - case "Simpel": + case "Standaard": selectedChargingAttitude = OL_ChargingAttitude.SIMPLE; break; case "Gelimiteerd vermogen": selectedChargingAttitude = OL_ChargingAttitude.MAX_POWER; break; - case "Slimme spreiding": + /*case "Slimme spreiding": selectedChargingAttitude = OL_ChargingAttitude.MAX_SPREAD; - break; - case "V2G": - selectedChargingAttitude = OL_ChargingAttitude.V2G; + break;*/ + case "Prijsgestuurd": + selectedChargingAttitude = OL_ChargingAttitude.PRICE; break; case "Custom": selectedChargingAttitude = null; @@ -1231,10 +1231,9 @@ if(selectedChargingAttitude != null){ false - + - - + false 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; /**