Laboratory for Simulation Development

...because open source matters

  • Increase font size
  • Default font size
  • Decrease font size
Home Introduction to LSD LSD simulations

LSD simulation runs

Contrary to other languages, users do not need to indicate explicitly the operations to be executed during a simulation run. The module called LSD Simulation Manager (LSM) arranges automatically all the operations implicitly expressed into the model configuration and in the equations. Without any intervention by users, the system automatically ensures that the variables are correctly computed at the appropriate time and with the appropriate values. Possible conflicts or error generate messages indicating the source of the problem and suggesting possible solutions. 

As an intuition of how LSM generates the simulation steps, here is the rule followed by the system

  • Set the simulation time t
  • For each variable X in the model configuration
    • Check that the X has not already been updated for the current time step. If it is, skip to the next variable
    • If necessary, start to compute the equation for X
    • If the equation for X requires values from variables not updated as yet, compute the necessary equations, then complete the equation for X

This recursive rule ensures that each and every variable in the model is computed always, and only once, at each time step. Moreover, it also ensures that the computation generating its value at t by computing its equation using the appropriately updated values. 

Modellers relying on LSM can write the equations without worrying of the global ordering of the execution of the variables, but simply using the familiar lag notation. For example: X=f(Y[t-1]) indicates that equation for X may be computed before the equation for Y. Conversely, X=f(Y[t]) means that the equation for Y must always be executed before computing the equation for X. Reversing the order of computations in a model implies thereofore simply the modification of two characters.   

Last Updated on Saturday, 28 February 2009 11:38  

News