If the uptime/downtime provided is fractional, Egret may not enforce the initial on/off time correctly. The new tiny_uc_12.json demonstrates the issue:
min_up_time: 2.2
initial_status: 1
Currently, the formulation allows a decommitment in the 2nd hour using an hourly horizon, e.g, [1,0,...] is an acceptable schedule. The bug fix and new test ensure this isn't permitted.
Changes proposed in this PR:
Change inappropriate round to math.ceil for InitialTimePeriodsOffLine and InitialTimePeriodsOnLine.
When a ModelData object is serialized, create the directory the user specifies if it doesn't exist.
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:
I agree my contributions are submitted under the BSD license.
I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
Fixes # .
Summary/Motivation:
If the uptime/downtime provided is fractional, Egret may not enforce the initial on/off time correctly. The new
tiny_uc_12.json
demonstrates the issue:Currently, the formulation allows a decommitment in the 2nd hour using an hourly horizon, e.g,
[1,0,...]
is an acceptable schedule. The bug fix and new test ensure this isn't permitted.Changes proposed in this PR:
round
tomath.ceil
forInitialTimePeriodsOffLine
andInitialTimePeriodsOnLine
.Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: