When someone wants to run linked model components
upto the very last time in the LC.TimeHorizon, the
org.OpenMI.Utilities.LinkableRunEngine sometimes
throughs an exception, because the time passed as
argument in GetValues exceeds the EndTime in the
TimeHorizon property from the model. This happens
becuase of accumulation of small errors when the time
in incresmented. The LinkableRunEngine should use an
epsilon when comparing these number and adjust the
time given as argument in the GetValues to match the
last time in the TimeHorizon
Logged In: YES
user_id=1262901
Originator: YES
We should also look more into analyzing the details around time stepping in general (the use of time epsilon in the wrapper).
I do not think we can make this correction in the generic wrapper. It is very difficult to see what a reasonable epsilon would be. So, my recommendations are to leave the wrapper code as it is, where the safest approach is used - the wrapper throws an exception when GetValues is invoked with time arguments outside the TimeHorizon. For specific models, developers can make their own implementation. According the the standard is it not required but allowed that LinkableComponents can provide data outside their TimeHorizon.
The OpenMI standard says:
"The GetValues method is not required to return values for times outside the TimeHorizon of the LinkableComponent. If the GetValues method is invoked with a time argument that is outside the TimeHorizon of the LinkableComponent and the LinkableComponent cannot handle such invocation an exception must be thrown."