
« Model events  Sitemap  Model custom code » Model fixed relationsEJS evaluates the statements on the Fixed Relations panel before the first evolution step, and after that between each evolution step.
The Evolution panel and the Fixed Relations panel complement each other. To show how that works out let us take the example of a simulation that works with position and velocity as variables for calculation of the dynamics, in which the kinetic energy is also calculated, for displaying that in the view. Then the correct place for calculating the kinetic energy is on the Fixed Relations panel.
More generally, Fixed Relations are expressed explicitly by expressions like: where, as you can see, each variable appears only on one side of the equation.
Using again the example of a simulation that works with position and velocity as variables, with kinetic energy calculated on the Fixed Relations panel:
So while the statements in the Evolution panel and the Fixed Relations are similar (both deal with a change in one variable produced by changes in other variables), there are clear criteria to decide whether a particular calculation belongs in the Evolution panel or the Fixed Relations panel.
« Model events  Sitemap  Model custom code » 