Composite model execute logic

Given the scenario above when there are no dependencies between model the following will occur when the composite model is run.

CompositeModel.Initialize()
Model1.Initialize()
Model2.Initialize()
Model3.Initialize()
CompositeModel.Execute()
Model1.Execute()
Model2.Execute()
Model3.Execute()
Model2.Execute()
CompositeModel.Execute()
Model1.Execute()
Model2.Execute()
Model2.Execute()

Basically the rule is:

  While (there is a model with currenttime < compositemodel.currenttime + compositemodel.timestep)
     Run all models with currenttime < compositemodel.currenttime+compositemode.timestep in order

After which the compositemodel currenttime is increased and all child models and run against the new time.

If model3 is dependent of model2 (model3->input(t) == model2->output(t)) it can not run and should wait for model2 to deliver the data. This could be specified on the model by defining that it should not fail when input data is missing. Instead it should just report as ok but not increase its timestep. This could result if a model never finishing if this is not detected.

The start and endtime of composite model overrule start and endtime of childmodels
The start and endtime of composite model cannot be 'larger' than the smallest child model.
NB:The second rule rules out periodic extrapolation of model outputs.

Time notation for formula based model

Model 
  |-In
  |   |-A(t)
  |   |-B(t)
  |-Out
    |-C(t)

A formula could be C= A + B or C = A + A(t-1). If no t is specified the current time is assumed.

  • No labels

1 Comment

  1. Unknown User (don)

    Thanks for taking notes from meeting.

    Loop here is exactly how it works now, also checks if model state is still not Finished.