The Buildings.Occupants.Office.Occupancy.Wang2005Occupancy model works well if your simulation starts at 0, but if you want to simulate other time ranges (e.g. only simulating a summer week based on an annual weather file), the occupancy is constantly true.
This seems to be because of the initial equation
initial equation
tNext = 0;
if the initial equation is set to
initial equation
tNext = time;
it seems to work.
Tested it for a standalone simulation of the Buildings.Occupants.Office.Occupancy.Wang2005Occupancy
Outputs of StartTime=0, StopTime=100000, are identical for both tNext inital equations.
The Output of StartTime=100000, StopTime=200000, is identical to the first two for tNext = time; but remains constantly true for tNext = 0;
model OccTest
Buildings.Occupants.Office.Occupancy.Wang2005Occupancy occ
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
annotation (
Icon(coordinateSystem(preserveAspectRatio=false)),
Diagram(coordinateSystem(preserveAspectRatio=false)),
uses(Buildings(version="8.0.0")),
experiment(
StartTime=0,
StopTime=100000,
Tolerance=1e-06,
__Dymola_Algorithm="Dassl"));
end OccTest;
The Buildings.Occupants.Office.Occupancy.Wang2005Occupancy model works well if your simulation starts at 0, but if you want to simulate other time ranges (e.g. only simulating a summer week based on an annual weather file), the occupancy is constantly true.
This seems to be because of the initial equation
if the initial equation is set to
it seems to work.
Tested it for a standalone simulation of the Buildings.Occupants.Office.Occupancy.Wang2005Occupancy Outputs of
StartTime=0, StopTime=100000,
are identical for both tNext inital equations. The Output ofStartTime=100000, StopTime=200000,
is identical to the first two fortNext = time;
but remains constantly true fortNext = 0;