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
16 changes: 16 additions & 0 deletions Zero_engine.alpx
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,14 @@
<Id>1749651086661</Id>
<Name><![CDATA[CHARGER]]></Name>
</Option>
<Option>
<Id>1770131334713</Id>
<Name><![CDATA[METHANE_GENERATOR]]></Name>
</Option>
<Option>
<Id>1770131381146</Id>
<Name><![CDATA[DIESEL_GENERATOR]]></Name>
</Option>
</OptionList>
<OptionList>
<Id>1659525715752</Id>
Expand Down Expand Up @@ -1029,6 +1037,14 @@
<Id>1769617059977</Id>
<Name><![CDATA[electricHeaterElectricityConsumption_kW]]></Name>
</Option>
<Option>
<Id>1770131982612</Id>
<Name><![CDATA[dieselGeneratorProductionElectric_kW]]></Name>
</Option>
<Option>
<Id>1770132010080</Id>
<Name><![CDATA[methaneGeneratorProductionElectric_kW]]></Name>
</Option>
</OptionList>
<OptionList>
<Id>1762354709855</Id>
Expand Down
7 changes: 0 additions & 7 deletions _alp/Agents/GCUtility/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
f_manageEVCharging(timeVariables);

f_manageBattery(timeVariables);

/*
// Disabled the fuelcell call, the specific asset has been removed. If there is need for it again, please use the generic conversion asset.
if (v_enableFuelCell) {
f_manageFuelCell();
}
*/
/*ALCODEEND*/}

double f_manageFuelCell()
Expand Down
2 changes: 1 addition & 1 deletion _alp/Agents/GridConnection/Code/Functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="default" StaticFunction="false">
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1722512642645</Id>
Expand Down
43 changes: 23 additions & 20 deletions _alp/Classes/Class.J_EAConversion.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,36 @@ public class J_EAConversion extends zero_engine.J_EAFlex implements Serializable
/**
* Default constructor
*/
public J_EAConversion() {
public J_EAConversion() {
}

/**
* Constructor initializing the fields, and setting assetFlowCatagory (Assetflowcatagory is filled with OUTPUT product of the conversion!)
*/
public J_EAConversion(I_AssetOwner owner, OL_EnergyAssetType energyAssetType, double outputCapacity_kW, double efficiency_r, OL_EnergyCarriers energyCarrierProduced, OL_EnergyCarriers energyCarrierConsumed, OL_AssetFlowCategories assetFlowCatagory, J_TimeParameters timeParameters) {
this.assetFlowCategory = assetFlowCatagory;
construct(owner, energyAssetType, outputCapacity_kW, efficiency_r, energyCarrierProduced, energyCarrierConsumed, timeParameters);
}

/**
* Constructor initializing the fields
*/

public J_EAConversion(I_AssetOwner owner, OL_EnergyAssetType energyAssetType, double outputCapacity_kW, double efficiency_r, OL_EnergyCarriers energyCarrierProduced, OL_EnergyCarriers energyCarrierConsumed, J_TimeParameters timeParameters) {
this.setOwner(owner);
this.timeParameters = timeParameters;
this.energyAssetType = energyAssetType;
this.outputCapacity_kW = outputCapacity_kW;
this.eta_r = efficiency_r;
this.inputCapacity_kW = this.outputCapacity_kW / this.eta_r;
this.energyCarrierProduced = energyCarrierProduced;
this.energyCarrierConsumed = energyCarrierConsumed;
this.activeProductionEnergyCarriers.add(this.energyCarrierProduced);
this.activeConsumptionEnergyCarriers.add(this.energyCarrierConsumed);
registerEnergyAsset(timeParameters);
construct(owner, energyAssetType, outputCapacity_kW, efficiency_r, energyCarrierProduced, energyCarrierConsumed, timeParameters);
}
private void construct(I_AssetOwner owner, OL_EnergyAssetType energyAssetType, double outputCapacity_kW, double efficiency_r, OL_EnergyCarriers energyCarrierProduced, OL_EnergyCarriers energyCarrierConsumed, J_TimeParameters timeParameters) {
this.setOwner(owner);
this.timeParameters = timeParameters;
this.energyAssetType = energyAssetType;
this.outputCapacity_kW = outputCapacity_kW;
this.eta_r = efficiency_r;
this.inputCapacity_kW = this.outputCapacity_kW / this.eta_r;
this.energyCarrierProduced = energyCarrierProduced;
this.energyCarrierConsumed = energyCarrierConsumed;
this.activeProductionEnergyCarriers.add(this.energyCarrierProduced);
this.activeConsumptionEnergyCarriers.add(this.energyCarrierConsumed);
registerEnergyAsset(timeParameters);
}

@Override
public J_FlowPacket f_updateAllFlows(double powerFraction_fr, J_TimeVariables timeVariables) {
Expand Down Expand Up @@ -118,11 +128,4 @@ public String toString() {
+ "with efficiency: " + this.eta_r + ", "
+ "Current output: " + -this.getLastFlows().get(this.energyCarrierProduced) + " kW";
}

/**
* This number is here for model snapshot storing purpose<br>
* It needs to be changed when this class gets changed
*/
private static final long serialVersionUID = 1L;

}
6 changes: 0 additions & 6 deletions _alp/Classes/Class.J_EAConversionElectricHeater.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,4 @@ public void operate(double powerFraction_fr, J_TimeVariables timeVariables) {
public double getCurrentTemperature() {
return outputTemperature_degC;
}

/**
* This number is here for model snapshot storing purpose<br>
* It needs to be changed when this class gets changed
*/
private static final long serialVersionUID = 1L;
}