RunPeriod not applied when running in Python (library mode)
UPDATE I cannot answer my question for 2 days since I am new, but I found the issue. I was using a python sample that was passing -a when running the simulation. This seems to force an annual simulation:
result = self.api.runtime.run_energyplus(
self.state,
[
'-a',
'-w', self.epw_path,
'-d', 'output',
self.idf_path
]
)
I'll add the answer when I can
In my idf file, I configured the following RunPeriod where the start date is 02/03/1986:
RunPeriod,
Run Period 1, !- Name
2, !- Begin Month
3, !- Begin Day of Month
1986, !- Begin Year
2, !- End Month
5, !- End Day of Month
1986, !- End Year
Tuesday, !- Day of Week for Start Day
Yes, !- Use Weather File Holidays and Special Days
Yes, !- Use Weather File Daylight Saving Period
No, !- Apply Weekend Holiday Rule
Yes, !- Use Weather File Rain Indicators
Yes, !- Use Weather File Snow Indicators
No; !- Treat Weather as Actual
When I run the simulation in Python using energyplus in library mode, I get the following output where you can see that the start date is 01/01/1986. I would expect to see 02/03/1986. Please note that during the simulation in Python, the simulation time I get from the Python api starts indeed at 01/01/1986 confirming that the date is wrong:
Initializing SimulationReporting SurfacesBeginning Primary SimulationInitializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 01/01/1986 for RUN PERIOD 1
Updating Shadowing Calculations, Start Date=01/21/1986
If I run with the same idf and ewp file in energyplus directly from the command line (without Python), I get the following output where the start date is good (02/03/1986):
EnergyPlus Starting
EnergyPlus, Version 22.1.0-ed759b17ee, YMD=2022.09.28 22:07
Adjusting Air System Sizing
Adjusting Standard 62.1 Ventilation Sizing
Initializing Simulation
Reporting Surfaces
Beginning Primary Simulation
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
[... removed warming up steps to reduce output size ...]
Warming up {29}
Warming up {30}
Starting Simulation at 12/21 for DENVER CENTENNIAL ANN HTG 99.6% CONDNS DB
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 07/21 for DENVER CENTENNIAL ANN CLG 1% CONDNS DB=>MWB
Initializing New Environment Parameters
Warming up {1}
Warming up {2}
Warming up {3}
Warming up {4}
Warming up {5}
Warming up {6}
Starting Simulation at 02/03/1986 for RUN PERIOD 1
Writing tabular output file results using tab format.
Writing tabular output file results using HTML format.
Notes:
- I am using the idf file USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw that comes when installing EnergyPlus.
Is there anything that I should do in Python to control the RunPeriod? Let me know if I can provide more info.
Thanks, Jonathan