Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions _alp/Agents/GCHouse/Code/AdditionalClassCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ public void f_connectToJ_EA(J_EA j_ea){
f_connectTo_J_EA_House(j_ea);
}

@Override
public void f_removeTheJ_EA(J_EA j_ea){
f_removeTheJ_EA_default(j_ea);
f_removeTheJ_EA_house(j_ea);
}

/*@Override
public void f_operateFixedConsumptionAssets(){
f_operateFixedConsumptionAssets_overwrite();
Expand Down
7 changes: 7 additions & 0 deletions _alp/Agents/GCHouse/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -933,3 +933,10 @@ else if (p_primaryHeatingAsset instanceof J_EAConversionGasBurner && p_BuildingT
}
/*ALCODEEND*/}

double f_removeTheJ_EA_house(J_EA j_ea)
{/*ALCODESTART::1749722407831*/
if (j_ea instanceof J_EAEV) {
p_householdEV = null;
}
/*ALCODEEND*/}

24 changes: 22 additions & 2 deletions _alp/Agents/GCHouse/Code/Functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@
<ReturnType>double</ReturnType>
<Id>1693300820997</Id>
<Name><![CDATA[f_connectTo_J_EA_House]]></Name>
<X>1070</X>
<Y>130</Y>
<X>1140</X>
<Y>90</Y>
<Label>
<X>10</X>
<Y>0</Y>
Expand Down Expand Up @@ -383,4 +383,24 @@
<ShowLabel>true</ShowLabel>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="default" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1749722407831</Id>
<Name><![CDATA[f_removeTheJ_EA_house]]></Name>
<X>1140</X>
<Y>110</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Parameter>
<Name><![CDATA[j_ea]]></Name>
<Type><![CDATA[J_EA]]></Type>
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
</Functions>
2 changes: 1 addition & 1 deletion _alp/Agents/GCNeighborhood/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ else if (j_ea.energyAssetType == OL_EnergyAssetType.WINDMILL) {
//energyModel.c_productionAssets.add((J_EAProduction)j_ea);

if (j_ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC) {
v_hasPV = true;
v_liveAssetsMetaData.hasPV = true;
v_liveAssetsMetaData.totalInstalledPVPower_kW += ((J_EAProduction)j_ea).getCapacityElectric_kW();
if ( p_parentNodeElectric != null ) {
p_parentNodeElectric.f_updateTotalInstalledProductionAssets(OL_EnergyAssetType.PHOTOVOLTAIC, ((J_EAProduction)j_ea).getCapacityElectric_kW(), true);
Expand Down
4 changes: 2 additions & 2 deletions _alp/Agents/GridConnection/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ else if (p_primaryHeatingAsset== null && p_secondaryHeatingAsset != null && v_ha
//energyModel.c_productionAssets.add((J_EAProduction)j_ea);

if (j_ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC) {
v_hasPV = true;
v_liveAssetsMetaData.hasPV = true;
double capacity_kW = ((J_EAProduction)j_ea).getCapacityElectric_kW();
v_liveAssetsMetaData.totalInstalledPVPower_kW += capacity_kW;
if ( p_parentNodeElectric != null ) {
Expand Down Expand Up @@ -1531,7 +1531,7 @@ else if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) {
if (j_ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC) {
J_EAProduction otherPV = findFirst(c_productionAssets, x -> x.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC);
if (otherPV == null) {
v_hasPV = false;
v_liveAssetsMetaData.hasPV = false;
}
double capacity_kW = ((J_EAProduction)j_ea).getCapacityElectric_kW();
v_liveAssetsMetaData.totalInstalledPVPower_kW -= capacity_kW;
Expand Down
19 changes: 0 additions & 19 deletions _alp/Agents/GridConnection/Variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -849,25 +849,6 @@
<Type><![CDATA[double]]></Type>
</Properties>
</Variable>
<Variable Class="PlainVariable">
<Id>1692972667627</Id>
<Name><![CDATA[v_hasPV]]></Name>
<X>270</X>
<Y>300</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Properties SaveInSnapshot="true"
Constant="false"
AccessType="public"
StaticVariable="false">
<Type><![CDATA[boolean]]></Type>
</Properties>
</Variable>
<Variable Class="PlainVariable">
<Id>1695824940090</Id>
<Name><![CDATA[v_WTRV2G_eurpkWh]]></Name>
Expand Down
4 changes: 4 additions & 0 deletions _alp/Classes/Class.J_EAConsumption.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ public Pair<J_FlowsMap, Double> curtailElectricityConsumption(double curtailment
return new Pair(flowsMap, this.energyUse_kW);
}

public J_ProfilePointer getProfilePointer() {
return this.profilePointer;
}

@Override
public String toString() {
return
Expand Down