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
121 changes: 88 additions & 33 deletions Zero_engine.alpx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<AnyLogicWorkspace splitVersion="1"
WorkspaceVersion="1.9"
AnyLogicVersion="8.9.7.202512010504"
AnyLogicVersion="8.9.7.202512121156"
AlpVersion="8.9.7">
<Model>
<Id>1658477103134</Id>
Expand Down Expand Up @@ -833,22 +833,6 @@
<Name><![CDATA[KW]]></Name>
</Option>
</OptionList>
<OptionList>
<Id>1722411204920</Id>
<Name><![CDATA[OL_CurtailmentMode]]></Name>
<Option>
<Id>1722411204921</Id>
<Name><![CDATA[CAPACITY]]></Name>
</Option>
<Option>
<Id>1722411204922</Id>
<Name><![CDATA[MARKETPRICE]]></Name>
</Option>
<Option>
<Id>1742810522883</Id>
<Name><![CDATA[NODALPRICING]]></Name>
</Option>
</OptionList>
<OptionList>
<Id>1726685111559</Id>
<Name><![CDATA[OL_HouseholdCookingMethod]]></Name>
Expand Down Expand Up @@ -1317,10 +1301,35 @@ EXCLUDE_PV => Use PV profile to preprocess gridnode profile to create a more acc
<ParentId>1772100328968</ParentId>
</Folder>
<Folder>
<Id>1772100488693</Id>
<Name><![CDATA[AggregatorBatteryManagement]]></Name>
<Id>1774957755174</Id>
<Name><![CDATA[AggregatorEnergyManagement]]></Name>
<ParentId>1772100333519</ParentId>
</Folder>
<Folder>
<Id>1774957776815</Id>
<Name><![CDATA[AggregatorAssetManagement]]></Name>
<ParentId>1772100333519</ParentId>
</Folder>
<Folder>
<Id>1774957797642</Id>
<Name><![CDATA[AggregatorBatteryManagement]]></Name>
<ParentId>1774957776815</ParentId>
</Folder>
<Folder>
<Id>1774959568850</Id>
<Name><![CDATA[AggregatorHeatingManagement]]></Name>
<ParentId>1774957776815</ParentId>
</Folder>
<Folder>
<Id>1774959583939</Id>
<Name><![CDATA[AggregatorChargingManagement]]></Name>
<ParentId>1774957776815</ParentId>
</Folder>
<Folder>
<Id>1774960311910</Id>
<Name><![CDATA[CurtailManagement]]></Name>
<ParentId>1772100318398</ParentId>
</Folder>
</Folders>
<ActiveObjectClasses/>
<DifferentialEquationsMethod>EULER</DifferentialEquationsMethod>
Expand Down Expand Up @@ -1863,30 +1872,25 @@ EXCLUDE_PV => Use PV profile to preprocess gridnode profile to create a more acc
<Name><![CDATA[J_BatteryManagementExternalSetpoint]]></Name>
<Folder>1772100322546</Folder>
</JavaClass>
<JavaClass>
<Id>1756210846035</Id>
<Name><![CDATA[I_AggregatorBatteryManagement]]></Name>
<Folder>1772100488693</Folder>
</JavaClass>
<JavaClass>
<Id>1756211095187</Id>
<Name><![CDATA[J_AggregatorBatteryManagementOff]]></Name>
<Folder>1772100488693</Folder>
<Folder>1774957797642</Folder>
</JavaClass>
<JavaClass>
<Id>1756212442478</Id>
<Name><![CDATA[J_AggregatorBatteryManagementCollectiveSelfConsumption_batterySize]]></Name>
<Folder>1772100488693</Folder>
<Folder>1774957797642</Folder>
</JavaClass>
<JavaClass>
<Id>1756213000574</Id>
<Name><![CDATA[J_AggregatorBatteryManagementCollectiveSelfConsumption_exportRate]]></Name>
<Folder>1772100488693</Folder>
<Folder>1774957797642</Folder>
</JavaClass>
<JavaClass>
<Id>1756213864971</Id>
<Name><![CDATA[J_AggregatorBatteryManagementCollectiveSelfConsumption_exportRateGH]]></Name>
<Folder>1772100488693</Folder>
<Folder>1774957797642</Folder>
</JavaClass>
<JavaClass>
<Id>1758192949084</Id>
Expand Down Expand Up @@ -2022,11 +2026,6 @@ EXCLUDE_PV => Use PV profile to preprocess gridnode profile to create a more acc
<Id>1772013198482</Id>
<Name><![CDATA[I_StoreStatesAndReset]]></Name>
</JavaClass>
<JavaClass>
<Id>1772098769739</Id>
<Name><![CDATA[I_AggregatorManagement]]></Name>
<Folder>1772100333519</Folder>
</JavaClass>
<JavaClass>
<Id>1773841546071</Id>
<Name><![CDATA[J_BatteryManagementLocalBalancing]]></Name>
Expand All @@ -2037,6 +2036,62 @@ EXCLUDE_PV => Use PV profile to preprocess gridnode profile to create a more acc
<Name><![CDATA[J_EAConversionAirConditioner]]></Name>
<Folder>1752677832758</Folder>
</JavaClass>
<JavaClass>
<Id>1774957587021</Id>
<Name><![CDATA[I_AggregatorEnergyManagement]]></Name>
<Folder>1774957755174</Folder>
</JavaClass>
<JavaClass>
<Id>1774957849700</Id>
<Name><![CDATA[I_AggregatorAssetManagement]]></Name>
<Folder>1774957776815</Folder>
</JavaClass>
<JavaClass>
<Id>1774957900719</Id>
<Name><![CDATA[I_AggregatorBatteryManagement]]></Name>
<Folder>1774957797642</Folder>
</JavaClass>
<JavaClass>
<Id>1774959021082</Id>
<Name><![CDATA[J_AggregatorEnergyManagementDefault]]></Name>
<Folder>1774957755174</Folder>
</JavaClass>
<JavaClass>
<Id>1774959609764</Id>
<Name><![CDATA[I_AggregatorChargingManagement]]></Name>
<Folder>1774959583939</Folder>
</JavaClass>
<JavaClass>
<Id>1774959621092</Id>
<Name><![CDATA[I_AggregatorHeatingManagement]]></Name>
<Folder>1774959568850</Folder>
</JavaClass>
<JavaClass>
<Id>1774960734304</Id>
<Name><![CDATA[J_CurtailManagementNodalPricing]]></Name>
<ExcludeFromBuild>true</ExcludeFromBuild>
<Folder>1774960311910</Folder>
</JavaClass>
<JavaClass>
<Id>1774960922174</Id>
<Name><![CDATA[I_CurtailManagement]]></Name>
<Folder>1774960311910</Folder>
</JavaClass>
<JavaClass>
<Id>1774961188583</Id>
<Name><![CDATA[J_CurtailManagementContractCapacity]]></Name>
<Folder>1774960311910</Folder>
</JavaClass>
<JavaClass>
<Id>1774961428077</Id>
<Name><![CDATA[J_CurtailManagementPrice]]></Name>
<Folder>1774960311910</Folder>
</JavaClass>
<JavaClass>
<Id>1774966264594</Id>
<Name><![CDATA[J_BatteryManagementProfile]]></Name>
<Folder>1772100322546</Folder>
</JavaClass>
</JavaClasses>
<RequiredLibraryReference>
<LibraryName>com.anylogic.libraries.modules.markup_descriptors</LibraryName>
Expand Down
50 changes: 40 additions & 10 deletions _alp/Agents/EnergyCoop/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1575,13 +1575,6 @@ ArrayList<GridConnection> f_getMemberGridConnectionsCollectionPointer()

/*ALCODEEND*/}

double f_aggregatorBatteryManagement_EnergyCoop()
{/*ALCODESTART::1756207893357*/
if(p_aggregatorBatteryManagement != null){
p_aggregatorBatteryManagement.manageExternalSetpoints();
}
/*ALCODEEND*/}

double f_removeMemberGCs(List<GridConnection> gcList,J_TimeParameters timeParameters)
{/*ALCODESTART::1756301338833*/
c_memberGridConnections.removeAll(gcList);
Expand All @@ -1594,10 +1587,11 @@ ArrayList<GridConnection> f_getMemberGridConnectionsCollectionPointer()
f_initializeCustomCoop(newMemberGridConnectionsList, timeParameters);
/*ALCODEEND*/}

double f_aggregatorManagement_EnergyCoop()
double f_operateAggregatorEnergyManagement(J_TimeVariables timeVariables)
{/*ALCODESTART::1756207893363*/
//Run battery setpoint management
f_aggregatorBatteryManagement_EnergyCoop();
if(p_aggregatorEnergyManagement != null){
p_aggregatorEnergyManagement.operateAggregatorEnergyManagement(timeVariables);
}
/*ALCODEEND*/}

double f_collectGridConnectionOriginalRapidRunData()
Expand Down Expand Up @@ -1760,3 +1754,39 @@ ArrayList<GridConnection> f_getMemberGridConnectionsCollectionPointer()
}
/*ALCODEEND*/}

double f_setAggregatorEnergyManagement(I_AggregatorEnergyManagement aggregatorEnergyManagement)
{/*ALCODESTART::1774957430435*/
this.p_aggregatorEnergyManagement = aggregatorEnergyManagement;
/*ALCODEEND*/}

I_AggregatorEnergyManagement f_getAggregatorEnergyManagement()
{/*ALCODESTART::1774957430437*/
return this.p_aggregatorEnergyManagement;
/*ALCODEEND*/}

double f_setExternalAggregatorAssetManagement(I_AggregatorAssetManagement externalAggregatorAssetManagement)
{/*ALCODESTART::1774957430439*/
if(this.p_aggregatorEnergyManagement == null){
this.p_aggregatorEnergyManagement = new J_AggregatorEnergyManagementDefault(this, energyModel.p_timeParameters);
}
this.p_aggregatorEnergyManagement.setExternalAggregatorAssetManagement(externalAggregatorAssetManagement);

/*ALCODEEND*/}

<T extends I_AggregatorAssetManagement> T f_getExternalAggregatorAssetManagement(Class<T> aggregatorAssetManagementInterfaceType)
{/*ALCODESTART::1774957430441*/
if(this.p_aggregatorEnergyManagement != null){
return this.p_aggregatorEnergyManagement.getExternalAggregatorAssetManagement(aggregatorAssetManagementInterfaceType);
}
else{
return null;
}
/*ALCODEEND*/}

double f_removeExternalAggregatorAssetManagement(Class<? extends I_AggregatorAssetManagement> aggregatorAssetManagementInterfaceType)
{/*ALCODESTART::1774957430443*/
if(this.p_aggregatorEnergyManagement != null){
this.p_aggregatorEnergyManagement.removeExternalAggregatorAssetManagement(aggregatorAssetManagementInterfaceType);
}
/*ALCODEEND*/}

118 changes: 101 additions & 17 deletions _alp/Agents/EnergyCoop/Code/Functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -785,22 +785,6 @@
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="default" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1756207893357</Id>
<Name><![CDATA[f_aggregatorBatteryManagement_EnergyCoop]]></Name>
<X>670</X>
<Y>710</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
Expand Down Expand Up @@ -829,7 +813,7 @@
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1756207893363</Id>
<Name><![CDATA[f_aggregatorManagement_EnergyCoop]]></Name>
<Name><![CDATA[f_operateAggregatorEnergyManagement]]></Name>
<X>650</X>
<Y>690</Y>
<Label>
Expand All @@ -839,6 +823,10 @@
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Parameter>
<Name><![CDATA[timeVariables]]></Name>
<Type><![CDATA[J_TimeVariables]]></Type>
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="default" StaticFunction="false">
Expand Down Expand Up @@ -909,4 +897,100 @@
<ShowLabel>true</ShowLabel>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1774957430435</Id>
<Name><![CDATA[f_setAggregatorEnergyManagement]]></Name>
<X>670</X>
<Y>730</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Parameter>
<Name><![CDATA[aggregatorEnergyManagement]]></Name>
<Type><![CDATA[I_AggregatorEnergyManagement]]></Type>
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>RETURNS_VALUE</ReturnModificator>
<ReturnType>I_AggregatorEnergyManagement</ReturnType>
<Id>1774957430437</Id>
<Name><![CDATA[f_getAggregatorEnergyManagement]]></Name>
<X>670</X>
<Y>750</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1774957430439</Id>
<Name><![CDATA[f_setExternalAggregatorAssetManagement]]></Name>
<X>680</X>
<Y>770</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Parameter>
<Name><![CDATA[externalAggregatorAssetManagement]]></Name>
<Type><![CDATA[I_AggregatorAssetManagement]]></Type>
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>RETURNS_VALUE</ReturnModificator>
<ReturnType>&lt;T extends I_AggregatorAssetManagement&gt; T</ReturnType>
<Id>1774957430441</Id>
<Name><![CDATA[f_getExternalAggregatorAssetManagement]]></Name>
<X>680</X>
<Y>810</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Parameter>
<Name><![CDATA[aggregatorAssetManagementInterfaceType]]></Name>
<Type><![CDATA[Class<T> ]]></Type>
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
<Function AccessType="public" StaticFunction="false">
<ReturnModificator>VOID</ReturnModificator>
<ReturnType>double</ReturnType>
<Id>1774957430443</Id>
<Name><![CDATA[f_removeExternalAggregatorAssetManagement]]></Name>
<X>680</X>
<Y>790</Y>
<Label>
<X>10</X>
<Y>0</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Parameter>
<Name><![CDATA[aggregatorAssetManagementInterfaceType]]></Name>
<Type><![CDATA[Class<? extends I_AggregatorAssetManagement>]]></Type>
</Parameter>
<Body xmlns:al="http://anylogic.com"/>
</Function>
</Functions>
Loading
Loading