Skip to main content

About models

A model defines an initial state, the rules for processing data, and the timeline of a simulation from start to finish. A model consists of an initial state plus logic that dictates how the state can change in response to the participants' decisions.

You can create models in:

  • Excel
  • Java
  • Julia
  • PowerSim
  • Python
  • SimLang
  • Stella
  • Vensim

Model context

The model context defines how a model run gets restored to memory, whether run rewind is enabled, what run variables are saved to database, and other settings.

Context file

The model context is stored as a JSON object in a CTX2 file known as the context file. If you have multiple models in your project, each one needs a corresponding CTX2 file.

Important

The context file should be located in your project's /model directory, and its name must match the name of the model file and have extension .ctx2.

For example, if your model file is called model_1.xlsx, the context file must be called model_1.ctx2.

learn more

For a complete reference on context files, read Model context schema.

Mapped context files

You can run the same model in different predefined contexts. For example, you might want to run your model for various districts or regions. Those would have different initial input values for the model. To achieve this, you could map different files for the regions in the mappedFiles property of the model's context.