Skip to content
Open
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
2 changes: 1 addition & 1 deletion 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.202512121156"
AnyLogicVersion="8.9.7.202512010504"
AlpVersion="8.9.7">
<Model>
<Id>1658477103134</Id>
Expand Down
24 changes: 23 additions & 1 deletion _alp/Agents/EnergyModel/Variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,28 @@
<Type><![CDATA[J_ProfileForecaster]]></Type>
</Properties>
</Variable>
<Variable Class="PlainVariable">
<Id>1776962977624</Id>
<Name><![CDATA[map_nrOfResidentsToDHWprofiles]]></Name>
<X>-850</X>
<Y>630</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[Map<Integer,List<J_ProfilePointer>>]]></Type>
<InitialValue Class="CodeValue">
<Code><![CDATA[new HashMap<>()]]></Code>
</InitialValue>
</Properties>
</Variable>
<Variable Class="Parameter">
<Id>1658752734133</Id>
<Name><![CDATA[b_parallelizeConnectionOwners]]></Name>
Expand Down Expand Up @@ -2105,7 +2127,7 @@
<Id>1749650197321</Id>
<Name><![CDATA[c_chargerProfiles]]></Name>
<X>-850</X>
<Y>615</Y>
<Y>610</Y>
<Label>
<X>10</X>
<Y>0</Y>
Expand Down
1 change: 1 addition & 0 deletions _alp/Agents/GCHouse/AOC.GCHouse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
<DrawMode>SHAPE_DRAW_2D3D</DrawMode>
<Z>0</Z>
<LevelVisibility>DIM_NON_CURRENT</LevelVisibility>
<Presentation xmlns:al="http://anylogic.com"/>
</Level>
</Presentation>
</ActiveObjectClass>
77 changes: 77 additions & 0 deletions _alp/Agents/GCHouse/Levels/Level.level.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Presentation>
<TimePlot>
<Id>1776974067080</Id>
<Name><![CDATA[plot_DHW]]></Name>
<X>1120</X>
<Y>1000</Y>
<Label>
<X>0</X>
<Y>-10</Y>
</Label>
<PublicFlag>false</PublicFlag>
<PresentationFlag>true</PresentationFlag>
<ShowLabel>false</ShowLabel>
<DrawMode>SHAPE_DRAW_2D3D</DrawMode>
<AutoUpdate>true</AutoUpdate>
<RecurrenceProperties>
<Id>1776974067078</Id>
<OccurrenceAtTime>true</OccurrenceAtTime>
<OccurrenceDate>1674979200000</OccurrenceDate>
<OccurrenceTime Class="CodeUnitValue">
<Code><![CDATA[0]]></Code>
<Unit Class="TimeUnits">HOUR</Unit>
</OccurrenceTime>
<RecurrenceCode Class="CodeUnitValue">
<Code><![CDATA[15]]></Code>
<Unit Class="TimeUnits">MINUTE</Unit>
</RecurrenceCode>
</RecurrenceProperties>
<EmbeddedIcon>false</EmbeddedIcon>
<Width>490</Width>
<Height>260</Height>
<BackgroundColor/>
<BorderColor/>
<ChartArea>
<XOffset>50</XOffset>
<YOffset>30</YOffset>
<Width>410</Width>
<Height>170</Height>
<BackgroundColor>-1</BackgroundColor>
<BorderColor>-16777216</BorderColor>
<GridColor>-12566464</GridColor>
</ChartArea>
<Legend>
<Place>SOUTH</Place>
<TextColor>-16777216</TextColor>
<Size>30</Size>
</Legend>
<Labels>
<HorLabelsPosition>DEFAULT</HorLabelsPosition>
<VerLabelsPosition>DEFAULT</VerLabelsPosition>
<TextColor>-12566464</TextColor>
</Labels>
<ShowLegend>true</ShowLegend>
<TimeWindowsMovementType>MOVEMENT_WITH_TIME</TimeWindowsMovementType>
<TimeWindowUnits>DAY</TimeWindowUnits>
<VerScaleFromExpression>0</VerScaleFromExpression>
<VerScaleToExpression>1</VerScaleToExpression>
<VerScaleType>AUTO</VerScaleType>
<DrawLine>true</DrawLine>
<Interpolation>LINEAR</Interpolation>
<DatasetExpression>
<Title>Building temp</Title>
<Id>1776974067076</Id>
<Expression>my_dataset</Expression>
<Color>-2448096</Color>
<Expression2>p_DHWAsset.getProfilePointer().getCurrentValue()</Expression2>
<Expression2Flag>true</Expression2Flag>
<PointStyle>NONE</PointStyle>
<LineWidth>1.0</LineWidth>
</DatasetExpression>
<SamplesToKeep>288</SamplesToKeep>
<TimeWindowExpression>3</TimeWindowExpression>
<FillAreaUnderLine>false</FillAreaUnderLine>
<LabelFormat>dd_MM_HH</LabelFormat>
</TimePlot>
</Presentation>
12 changes: 6 additions & 6 deletions _alp/Agents/GridConnection/Code/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,9 @@ J_ActivityTrackerTrips f_getNewTripTracker(OL_EnergyAssetType assetType,I_Vehicl

if (j_ea instanceof J_EAProfile profileAsset) {
c_profileAssets.add(profileAsset);
if (j_ea.getAssetFlowCategory() == OL_AssetFlowCategories.hotWaterConsumption_kW) {
p_DHWAsset = profileAsset;
}
}

if (j_ea instanceof J_EAFuelVehicle fuelVehicle) {
Expand All @@ -999,9 +1002,6 @@ else if (fuelVehicle.getEnergyCarrierConsumed() == OL_EnergyCarriers.HYDROGEN) {
}
else if (j_ea instanceof J_EAConsumption consumptionAsset) {
c_consumptionAssets.add(consumptionAsset);
if (j_ea.energyAssetType == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) {
p_DHWAsset = consumptionAsset;
}
}
else if (j_ea instanceof J_EAProduction productionAsset) {
c_productionAssets.add(productionAsset);
Expand Down Expand Up @@ -1058,6 +1058,9 @@ else if (j_ea instanceof J_EAProfile) {

if (j_ea instanceof J_EAProfile profileAsset) {
c_profileAssets.remove(profileAsset);
if (j_ea.getAssetFlowCategory() == OL_AssetFlowCategories.hotWaterConsumption_kW) {
p_DHWAsset = null;
}
}

if (j_ea instanceof J_EAFuelVehicle fuelVehicle) {
Expand All @@ -1079,9 +1082,6 @@ else if (fuelVehicle.getEnergyCarrierConsumed() == OL_EnergyCarriers.HYDROGEN) {
}
else if (j_ea instanceof J_EAConsumption) {
c_consumptionAssets.remove((J_EAConsumption)j_ea);
if (j_ea.energyAssetType == OL_EnergyAssetType.HOT_WATER_CONSUMPTION) {
p_DHWAsset = null;
}
if( j_ea.energyAssetType == OL_EnergyAssetType.ELECTRICITY_DEMAND ) {

}
Expand Down
2 changes: 1 addition & 1 deletion _alp/Agents/GridConnection/Variables.xml
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@
<PresentationFlag>true</PresentationFlag>
<ShowLabel>true</ShowLabel>
<Properties SaveInSnapshot="true" ModificatorType="STATIC">
<Type><![CDATA[J_EAConsumption]]></Type>
<Type><![CDATA[J_EAProfile]]></Type>
<UnitType>NONE</UnitType>
<SdArray>false</SdArray>
<DefaultValue Class="CodeValue">
Expand Down
2 changes: 1 addition & 1 deletion _alp/Classes/Class.J_ProfilePointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public J_ProfilePointer() {

public J_ProfilePointer(String name, double[] profile, double dataTimeStep_h, double dataStartTime_h, OL_ProfileUnits profileUnits) {
if (profileUnits == null) {
throw new RuntimeException("Attemtping to create J_ProfilePointer with null profileUnits!");
throw new RuntimeException("Attempting to create J_ProfilePointer with null profileUnits!");
}
this.name = name;
this.a_profile = profile;
Expand Down
Loading