The Model workpanel
Within the Model panel we can find six subpanels: Variables, Initialization, Evolution, Fixed Relations, Custom, and Elements.
- Variables is used to declare and initialize the variables of the model.
- Model Initialization allows to enter additional initialization algorithms
- Model Evolution describes how the model advances in time. It includes:
- Model Fixed relations sets fixed relations among the variables and additional computations required to keep the model updated
- Model Custom pages allow the author to create methods (functions and subroutines) for use in other parts of the model and view. These methods add to a standard list of EJS Predefined methods.
- Model Elements offers predefined, ready to use model objects (elements) which simplify some advanced tasks.
Clicking on the subpanel’s interior creates a new page that asks for a page name. That creates a page with the name showing in the tab at the top of the panel.
Right clicking in the tab area opens a drop down menu offering options for creating and moving pages so that the variables can be grouped more clearly.
The option enable/disable suspends usage of a particular page. However, on compiling a simulation these pages are compiled too, which means that if errors occur the compiler will stop and report the errors. The reason disabled pages are compiled is that predefined methods are available to switch particular pages on and off while a simulation is running.