Docs / Shapes / Initial Values

Initial Values Shape

The Initial Values shape lists the input terms of your model — the starting values of differential equations and user-adjustable parameters — as an editable table, with one column per case.

Initial Values table with one row per term and one editable value column per case

Overview

Every term that accepts user input — the state variables of differential equations and recurrences, and parameters without a defining expression — appears as a row. The rows always follow the model: every time the expressions are re-read, terms that appeared are added and terms that are gone are dropped. Editing a cell changes the value the term starts from when the model runs. When the model defines more than one case, the table shows one value column per case, making it easy to compare scenarios side by side.

The state variables come first and the parameters after them, with a discreet line marking where one block ends and the other begins. Columns can be made wider or narrower by dragging the line between them: on the case header when the model has more than one case, and on any term row when it has only one.

Adding the Shape

Open the table button in the top toolbar and choose Initial Values, then click and drag on the board to draw it. The table starts with a row for each input term currently defined in the model.

Toolbar

The Initial Values toolbar provides:

Editing Values

Moments

Besides its starting value, a term can be given a value at a later iteration — for example to model an impulse or a sudden change. Those iterations appear as moments: a colored row naming the instant, followed by the terms that take a value there.

  1. Click the button in the shape toolbar to add a moment. It starts with every term of the table
  2. Enter the value each term should take at that moment
  3. Edit the value on the moment row itself to move the whole moment to another instant

A moment holds only the terms you keep in it, so different moments can carry different terms:

The first group is the model's own starting values, so it always lists every term and its rows cannot be dropped.

A moment only reaches the run through the instant it opens, so changing one the model has already run past — a value typed into it, a term added, dropped or swapped, the moment moved or removed — stops the model and takes it back to the first moment. The next run reads the moment as it now stands.

Cases

A model can run up to 9 cases in parallel, each with its own initial values. Set the number of cases from the independent variable menu in the player toolbar (click the variable name, e.g. t, and change Cases). With more than one case, the Initial Values table shows one column per case, and each column is edited independently. Every case is shown until you pick the ones you want in the Scenarios menu of the toolbar; after that the table keeps your choice, and cases added later are not shown automatically.

Use cases to compare scenarios — for example, the same projectile launched with three different initial velocities — and plot all of them in a single Chart.

Copying Data

The shape's copy menu can copy the table as CSV, with one column per case, ready to paste into a spreadsheet.

To display computed results instead of editing inputs, use the Table shape.