Menu

#10 TimeHorizon compare

1.4.1.0
closed-accepted
2
2009-01-15
2005-05-23
No

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

Discussion

  • Jan Gregersen

    Jan Gregersen - 2005-05-24
    • status: open --> open-accepted
     
  • Jan Gregersen

    Jan Gregersen - 2007-10-22
    • milestone: 493366 --> 1.4.1.0
     
  • Jan Gregersen

    Jan Gregersen - 2008-06-04

    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).

     
  • Jan Gregersen

    Jan Gregersen - 2008-12-18

    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."

     
  • gennadii_donchyts

    • status: open-accepted --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB