Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

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.

Code Block
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:

Code Block
  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

Code Block
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.