Home > OS >  How to change time frame of the model?
How to change time frame of the model?

Time:12-02

I’m making a model which initially could be a minute based model, but now I have to change the time frame. Is it possible to change time frame from minutes to days?

CodePudding user response:

it is advised not to change the model time units once you created the model since there are a few functions that cannot be adapted (such as toTimeoutInCalendar), it is also advised to use the time units in all functions so you CAN change the time units early on, for example time(MINUTE)

with that being said, you can change it enter image description here

CodePudding user response:

Adding to Felipe's correct answer: there is no need ever to change the model time unit, if you use calls of time() and date() correctly:

As long as you always specify the time unit in the calls (time(SECOND) or date(YEAR)), your model will not suffer changing the time unit.

So you can "refactor" your model by specifying all such calls correctly and then, changing the model time unit is fine. It will not even have an impact on the model performance our results!

Check the help to understand these concepts, maybe easier than redoing the entire model.

PS: Even without it, there is literally no need to change the model time unit. Just adjust the run speed of the simulation experiment if it was too slow/fast

  • Related