The Run Variables

Top  Previous  Next

Run Variable is a variable used within a run set for specifying parameter values and/or setting up for-loops over parameters. One application would be to define quantities to be used in multiple setting expressions; another would be to store expensive-to-compute results which can be reused in multiple simulation runs. There is one special type of run variable, called a loop variable, used for setting up for-loops over parameters.

 

This particular runset has warnings and errors. Click the red dot or yellow dot to see the message. 

This particular runset has warnings and errors. Click the red dot or yellow dot to see the message.

Clicking on red dot to the left of run variable xcoord shows message:

Runset_RunVariable_Error

 

Clicking on red yellow to the left of run variable _mass shows message:

Runset_RunVariable_Warning

 

Loop variable is a special type of run variable, used to define a set of nested for-loops within a run set, while the actual simulation runs would take place inside the innermost loop. To add a for-loop in the Run Set Edit window, one simply adds a new run variable, say iloop, and sets its type to int and its value to $loop(3). The simulation in the following example will execute three runs. In each run the constant_force will be set to force[0], force[1] and force[2] respectively.

Runset_LoopVariable