Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CalendarTime shows bug with non-zero offset #980

Closed
damienpicard opened this issue Feb 14, 2019 · 2 comments
Closed

CalendarTime shows bug with non-zero offset #980

damienpicard opened this issue Feb 14, 2019 · 2 comments

Comments

@damienpicard
Copy link
Contributor

When CalendarTime is used with non-zero offset, an unexpected behaviour appears: the next day starts at hour 1 instead of 0 and the minutes goes to a higher value than 60:

Examples: The simulation of Example/CalendarTime.mo with calendarTime2016.offset = 3600 gives this:
image

@damienpicard
Copy link
Contributor Author

This is solved by substracting the offset to the initial equations:

hourSampleStart = integer(time /3600)*3600 - offset;
daySampleStart  = integer((time) /(3600*24))*3600*24 - offset;

I'll propose a pull request.

@Mathadon
Copy link
Member

this will be merged through ibpsa/modelica-ibpsa#1100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants