Skip to content
Merged
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
4 changes: 0 additions & 4 deletions Zero_engine.alpx
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,6 @@
<Id>1717159864803</Id>
<Name><![CDATA[FUEL_CELL]]></Name>
</Option>
<Option>
<Id>1734089970461</Id>
<Name><![CDATA[CHP]]></Name>
</Option>
</OptionList>
<OptionList>
<Id>1659525715752</Id>
Expand Down
8 changes: 4 additions & 4 deletions _alp/Agents/GCDistrictHeating/Code/Functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<ReturnType>double</ReturnType>
<Id>1663773953770</Id>
<Name><![CDATA[f_operateAssetsDistrictHeating]]></Name>
<X>930</X>
<Y>260</Y>
<X>910</X>
<Y>200</Y>
<Label>
<X>10</X>
<Y>0</Y>
Expand Down Expand Up @@ -75,8 +75,8 @@
<ReturnType>double</ReturnType>
<Id>1693302929918</Id>
<Name><![CDATA[f_connectToJ_EA_DistrictHeating]]></Name>
<X>1020</X>
<Y>200</Y>
<X>1070</X>
<Y>90</Y>
<Label>
<X>10</X>
<Y>0</Y>
Expand Down
3 changes: 1 addition & 2 deletions _alp/Agents/GCNeighborhood/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ else if (j_ea.energyAssetType == OL_EnergyAssetType.WINDMILL) {
p_tertiaryHeatingAsset = (J_EAConversion)j_ea;
} else if (j_ea instanceof J_EAConversionHydrogenBurner) {
p_quaternaryHeatingAsset = (J_EAConversion)j_ea;
}
else if (j_ea.energyAssetType == OL_EnergyAssetType.CHP) {
} else if (j_ea instanceof J_EAConversionGasCHP) {
c_chpAssets.add(j_ea);
}
} else if (j_ea instanceof J_EAStorage) {
Expand Down
53 changes: 30 additions & 23 deletions _alp/Agents/GridConnection/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,12 @@ else if (j_ea instanceof J_EAConversionCurtailer || j_ea instanceof J_EAConversi
}
} else {
if ( p_primaryHeatingAsset instanceof J_EAConversionGasBurner || p_primaryHeatingAsset instanceof J_EAConversionHeatDeliverySet || p_primaryHeatingAsset instanceof J_EAConversionHydrogenBurner || p_primaryHeatingAsset instanceof J_EAConversionHeatPump) { // when there is only a gas burner or DH set
p_primaryHeatingAsset.v_powerFraction_fr = min(1,powerDemand_kW / p_primaryHeatingAsset.getOutputCapacity_kW());
//traceln("Running manageHeatingAsset for single heating asset");
} else {
p_primaryHeatingAsset.v_powerFraction_fr = min(1,powerDemand_kW / p_primaryHeatingAsset.getOutputCapacity_kW());
}
else if(p_primaryHeatingAsset instanceof J_EAConversionGasCHP){
p_primaryHeatingAsset.v_powerFraction_fr = min(1,powerDemand_kW / ((J_EAConversionGasCHP)p_primaryHeatingAsset).getOutputHeatCapacity_kW());
}
else {
traceln("GridConnection " + p_gridConnectionID + " has a single unsupported heating asset!");
}
}
Expand Down Expand Up @@ -1211,9 +1214,9 @@ else if (j_ea.energyAssetType == OL_EnergyAssetType.WINDMILL) {
p_primaryHeatingAsset = (J_EAConversion)j_ea;
} else if (j_ea instanceof J_EAConversionElectrolyser || j_ea instanceof J_EAConversionElektrolyser) {
c_electrolyserAssets.add(j_ea);
}
else if (j_ea.energyAssetType == OL_EnergyAssetType.CHP) {
} else if (j_ea instanceof J_EAConversionGasCHP) {
c_chpAssets.add(j_ea);
p_primaryHeatingAsset = (J_EAConversion)j_ea;
}
} else if (j_ea instanceof J_EAStorage) {
c_storageAssets.add((J_EAStorage)j_ea);
Expand Down Expand Up @@ -1723,28 +1726,32 @@ else if (j_ea.energyAssetType == OL_EnergyAssetType.WINDMILL) {
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){
}
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) {
if(p_heatingType == OL_GridConnectionHeatingType.HYBRID_HEATPUMP)
p_secondaryHeatingAsset = null;
else{
p_primaryHeatingAsset = null;
}
} else if (j_ea instanceof J_EAConversionHeatPump) {
p_primaryHeatingAsset = null;
energyModel.c_ambientAirDependentAssets.remove(j_ea);
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_EAConversionElectrolyser) {
c_electrolyserAssets.remove(j_ea);
}
else if (j_ea.energyAssetType == OL_EnergyAssetType.CHP) {
c_chpAssets.remove(j_ea);
else{
if (j_ea instanceof J_EAConversionGasBurner) {

} else if (j_ea instanceof J_EAConversionHeatPump) {
energyModel.c_ambientAirDependentAssets.remove(j_ea);
c_electricHeatpumpAssets.remove(j_ea);
} else if (j_ea instanceof J_EAConversionHydrogenBurner) {

} else if (j_ea instanceof J_EAConversionGasCHP) {
c_chpAssets.remove(j_ea);
}
if(p_primaryHeatingAsset == j_ea){
if(p_secondaryHeatingAsset != null){
p_primaryHeatingAsset = p_secondaryHeatingAsset;
p_secondaryHeatingAsset = null;
}
}
if(p_secondaryHeatingAsset == j_ea){
p_secondaryHeatingAsset = null;
}
}
} else if (j_ea instanceof J_EAStorage) {
c_storageAssets.remove((J_EAStorage)j_ea);
Expand Down
12 changes: 12 additions & 0 deletions _alp/Classes/Class.J_EAConversionGasCHP.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ public double getCurrentTemperature() {
return outputTemperature_degC;
}

public double getOutputHeatCapacity_kW() {
return outputHeatCapacity_kW;
}
public double getOutputElectricCapacity_kW() {
return outputElectricCapacity_kW;
}

@Override
public double getOutputCapacity_kW() {
throw new RuntimeException("Can't use the basic getOutputcapacity of this Asset, as it has 2 outputs. So You need to specify which output!");
}

/**
* This number is here for model snapshot storing purpose<br>
* It needs to be changed when this class gets changed
Expand Down