Solved

AIMMS Calendar (expressing hours)

  • 2 March 2023
  • 1 reply
  • 37 views

I have a question regarding the calendar. We have an old app implemented based on calendar, in which the hours within a day are expressed as 00 ~ 23. But now we need to change it to 01 ~ 24. Please let us know what the easiest way to do it.

icon

Best answer by Chris Kuip 2 March 2023, 13:01

View original

1 reply

Userlevel 5
Badge +7

Hello Mjin,

 

The AIMMS Calendar does not provision directly for the representation of hours in the range 1..24 instead of 0..23.  To report dates in this range, you can use a string parameter indexed over hours.  When the hour number is 00, then the previous day, with hour 24 is used.  Part of the data of such a string may look as follows:

 



To implement this string parameter, I used a day calendar with the same time span as the hour calendar as illustrated in the enclosed small example project. 

 

Does this answer your question?


With kind regards,

Chris

PS: I used https://en.wikipedia.org/wiki/24-hour_clock

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator