Sign in to start building system dynamics models
or
Sign In
or
☁ Save As

Save this model to your account. You can open it from any device.

📁 My Models
Loading…
About
S.I.M.P.L.E. SD
www.simple-sd.com
Version 3.0.0
© 2026 S.I.M.P.L.E. SD. All rights reserved.
Dimensional Analysis
Sensitivity Analysis
Feedback Loops
Causes Tree
Output Log
Simulation Replay
Replay flow intensity and dominant feedback loops over time.
Time 0
Frame 1 / 1
100%

Dominant Loops

Orange highlighting follows the selected loop. Pipe and non-constant wire widths reflect relative flow strength at the current frame.
untitled.simple
Ready
Editor
0 errors Ln 1, Col 1
Diagram
Diagram View
100%
Edit History
Move Select and Draw
Primary Nodes
Special Nodes
Model Output
Run
Scope MODULE
Run a model to see data here.

S.I.M.P.L.E. Code Help

Unified guide for the editor, diagram, output tabs, tools, and S.I.M.P.L.E. code reference

Overview

S.I.M.P.L.E. SD combines text-first and diagram-first modeling. Editor checks, diagram highlights, and node tooltips stay synchronized so you can spot issues quickly and fix them from either view.

Single Unified Popup Top-to-Bottom Tour Complete Feature Index Live Search + TOC
Editor L POP .K= POP.J+DT*(BIRTH.JK-DEATH.JK) U POP=PERSONS,BR=1/YEAR D POP=TOTAL POPULATION ~ undefined variable DRATE on line 8 NOTE SIR EPIDEMIC MODEL SPEC DT=0.5,LENGTH=100,PRTPER=1,PLTPER=1 O NTITLE=INFECTION,NBODY=PEOPLE PER DAY Diagram POP BIRTH RATIO DR TOTAL POPULATION unit: PERSONS error: POP requires .K suffix INFECTION PEOPLE PER DAY

Full Interface Tour

This section now includes a real captured interface view, followed by a labeled layout map from top toolbar to output/log surfaces.

S.I.M.P.L.E. SD interface screenshot showing editor, diagram, and embedded plot node
File Edit Insert Simulation Help S.I.M.P.L.E. SD Sign In Sign Up Workspace Plot Data ▶ Run Ln 12, Col 41 Editor 1 2 3 4 5 6 7 8 9 * SIR EPIDEMIC MODEL L POP .K=POP.J+DT*(BIRTH.JK-DEATH.JK) R BIRTH .KL=POP.K*BR C BR = 0.03 N POP = 1000 U POP=PERSONS,BR=1/YEAR D POP=TOTAL POPULATION SPEC DT=1,LENGTH=50,PRTPER=1,PLTPER=1 PRINT POP,BIRTH,DEATH Diagram Fit View − + │ Undo Redo │ ✛ Wire ⊳ Note │ ☐ ⊳☐ · ○ │ ☐☐ ⊙ ▼Macro ▼Ghost │ 📊 📋 │ ▼ BASE + Run POP BIRTH DEATH BR RATIO POP INFECTION PEOPLE PER DAY / CONTACT DYNAMICS Element Properties Type ▾ Level Name: POP Formula: POP.J+DT*(...) Units: PERSONS Desc: TOTAL POPULATION Initial (N): 1000 Apply Plot Tab Run: BASE P POP B BIRTH Data Tab RUN TIME POP BIRTH DEATH BASE 0 1000 30 20 BASE 1 1010 30.3 20.2 BASE 2 1020 30.6 20.4 💾 CSV Output Log ✓ Parse OK: 6 equations, 1 run ✓ Simulation complete: 50 steps (BASE) Settings: DT=1, LENGTH=50, PRTPER=1, PLTPER=1, Solver=Euler | Time Unit from U DT=... | Integration: Euler or RK3 (with REL_ERR, ABS_ERR)
If any area looks different in your current theme or window size, behavior is still the same: this tour maps the same controls and flow from top bar to output.

Unified Workspace Popup (Editor + Diagram + Plot + Data)

This single help popup combines the main work areas. Use the quick-jump buttons at the top or the table of contents to move between sections without opening separate dialogs.

EDITOR L POP .K=POP.J+DT*(BIRTH.JK-DEATH.JK) R BIRTH .KL=POP.K*BR ~ undefined variable DR DIAGRAM POP error glow BIRTH PLOT P POP B BIRTH DATA RUN TIME POP BIRTH DEATH BASE 0 1000 30 20 BASE 1 1010 30.3 20.2 BASE 2 1020 30.6 20.4
  • Editor catches syntax and variable issues with inline code markers.
  • Diagram mirrors those issues with red node glow and per-node tooltip messages.
  • Plot displays run-scoped time-series with chip toggles and scales.
  • Data shows run output rows and CSV export from PRINT variables.

Complete Feature Index

This index lists every major interface area and what it controls.

AreaIncludesWhere To Find
Top MenuFile, Edit, Insert, Simulation, HelpApp top bar
Workspace TabsWorkspace, Plot, DataMain content header
Editor PanelCode input, code issue underlines, autocomplete, line/column statusWorkspace left side
Diagram PanelNode canvas, wire/pipe drawing, ghosts, notes, plot nodesWorkspace right side
Diagram ToolbarMove/select/draw modes, node insert tools, run tools, macrosDiagram top row
Context PanelName, formula, units, description, apply/delete/hideWhen a node is selected
Simulation SettingsDT, LENGTH, PRTPER, PLTPER, RUN, time unit, solver settingsSimulation > Settings
SimRun ReplayAnimated diagram replay, dominant loop list, play/pause, slider scrubWorkspace header, next to Run
Plot TabRun dropdown, variable chips, line/letter display, hover tooltipsMain Plot tab
Data TabPRINT-based output table and CSV exportMain Data tab
Output LogParse results, code issue messages, runtime diagnosticsStatus/log panel
Cloud/AuthSign in/up, cloud save/load model listTop-right account controls
Help PopupTOC, search filter, quick jumps, screenshots, referencesHelp menu and help buttons

Top-to-Bottom Workflow

  1. Define equations in Editor or create nodes in Diagram toolbar.
  2. Use Context Panel Apply to write formulas, units, and descriptions.
  3. Fix any code issue underlines; affected nodes glow red on the diagram.
  4. Use Run for standard output, or SimRun for an animated diagram replay with dominant loop highlighting.
  5. Export CSV or diagram images as needed.

Editor + Code Checks

The editor enforces uppercase style, 72-character line checks, and live code diagnostics. Hover over underlined lines for the exact message.

When a code issue is found, related diagram nodes are highlighted and node tooltip messages are shown in red.

5 6 7 8 9 10 11 12 U SUSC=PERSONS,SICK=PERSONS,RECOV=PERSONS D SUSC=TOTAL POPULATION AT RISK D SICK=INFECTED AND SYMPTOMATIC D BAD LINE WITHOUT EQUALS O NTITLE=INFECTION RATE,NBODY=PEOPLE PER DAY SPEC DT=0.5,LENGTH=100,PRTPER=1,PLTPER=1 PRINT SUSC,SICK,RECOV PLOT SUSC=S(0,1000)/SICK=I(0,500) ⚠ 1 code issue col 72 Ln 8, Col 29

Diagram + Context Panel

The diagram toolbar is organized into labeled sections:

Toolbar SectionControls
Diagram ViewFit View, Zoom Out (−), Zoom In (+), zoom % display
Edit HistoryUndo (Ctrl+Z), Redo (Ctrl+Y)
Move Select and DrawMove/Select (crosshair, default), Wire (dashed info link), Pipe (flow connector), Note (text annotation)
Primary NodesLevel (rectangle), Rate (valve), Constant (dot + line), Auxiliary (circle)
Special NodesArray (stacked rectangles), Table (circle + data lines), Macro (dropdown: + New / list), Ghost (dropdown with variable search), Module scope pill when editing inside a module
Model OutputPlot (embedded chart), Print/Data (data table config)
RunRun selector dropdown, + Run button, Hidden variables filter

After successful wire or pipe creation, mode returns to Move automatically. Context panel fields sync both directions with editor code, including D descriptions and U units.

Auto-layout: Nodes without saved positions are placed automatically when the diagram opens. The engine groups nodes by subsystem (connected levels and their rates), positions each group, and arranges auxiliaries and constants around them.

Modules: Collapsed module boxes summarize a set of nodes in a standard square box. New modules default to no icon. Click a module to open its settings panel, or double-click it to enter the module's local diagram. Root-view module wires are white dotted proxy links and can be reshaped like other wires.

Draw Modes

ModeButtonDescription
Move / SelectCrosshair (✛)Default mode. Click to select, drag to reposition. Click empty space to deselect.
WireDashed lineClick source node, then click target to create an information wire (dashed arrow). Adds the source variable to the target's formula dependencies.
PipeSolid valve lineClick a level, then a rate (or vice versa) to create a flow pipe (solid connector). Must connect Level ↔ Rate only.
NoteNote icon (📝)Adds a new note annotation at the next open position on the canvas. Opens the note editor panel.
LassoDashed rectangleClick and drag to draw a selection rectangle. All nodes inside it are selected together. Selected nodes can be dragged as a group, hidden, or wrapped into a module box.

Lasso Multi-Select

The Lasso tool lets you select multiple nodes at once by drawing a rectangle around them. In the root diagram, selecting two or more model nodes also enables a Create Module action.

POP RATIO BR 3 selected Hide Module After selecting, drag to move as a group, hide, or collapse into a module. Esc → clear → exit lasso
  • Select: Drag a rectangle around nodes to multi-select them (highlighted in blue).
  • Group drag: After lasso selection, drag any selected node to move the whole group.
  • Hide: Click the Hide button in the floating action bar to hide all selected nodes at once.
  • Create Module: In the root view, click Create Module to wrap the selected model nodes in a standard square module box. New modules start with no icon, but you can pick one later in Module Settings.
  • Open Module: Click a module box to open its settings panel. Double-click the box to enter its local diagram and edit the internal nodes directly.
  • Module scope: When you are inside a module, the scope pill shows which module you are editing. Exit back to the root view to see collapsed module boxes and proxy links again.
  • Escape: Press Escape to progressively: cancel active drag → clear selection → exit lasso mode.
Diagram View Fit − + 100% Edit History Undo Redo Move Select and Draw ✛ ╌╌ ⊳═ 📝 Primary Nodes ☐ ⊳☐ •─ ○ Special Nodes ☐☐ ⊙ ▼Macro ▼Ghost Model Output 📊 📋 Run ▼ BASE + Run SUSC INF SICK RATIO CR TBLOOK SUSC (ghost) SIR MODEL SUSCEPTIBLE → INFECTED → RECOV Element Properties Type ▾ Level Name: SUSC Formula: SUSC.J+DT*(−INF.JK) Units: PERSONS Desc: SUSCEPTIBLE POP Initial (N): 990 + − * / () DT TIME.K SQRT ABS ... Apply Del Hide

Node Types + Shapes

Each variable type has a distinct diagram shape. Below is every node with its visual representation, editor prefix, and usage notes.

Diagram NodeModeShapeNotes
LevelLRectangleStock/accumulator with N initial value. Integrates flows over time.
RateRValve/BowtieFlow variable connected to levels by pipes. Units derived from connected level.
AuxiliaryACircleAlgebraic helper computed each time step. Uses .K timescript.
Table LookupA + TCircle with linesAuxiliary using TABLE/TABHL/TABXT/TABPL. Data from T line.
ConstantCDot + lineScalar constant, no timescript needed. Can convert to table or array.
SupplementarySDashed triangleOutput-only variable, computed but does not feed back. Uses .K timescript.
Array LevelL + FOR/IStacked rectanglesMulti-element stock with index variable and per-element formulas.
GhostReferenceDashed copyDiagram routing helper. No new equation; reduces long wires.
Plot NodePLOTEmbedded chartRun-scoped chart directly on the diagram canvas.
Note NodeONote cardAnnotation backed by O NTITLE=...,NBODY=... in editor.

Level — Rectangle

Levels (stocks) accumulate flows over time. They require an N initial value and are integrated using the DT time step. The level equation uses .J (previous) and .JK (incoming rates).

L POP.K=POP.J+DT*(BIRTH.JK-DEATH.JK)
N POP=1000
POP Level node — rectangle Prefix: L Timescript: .K (LHS), .J (RHS carry) Requires: N line for initial value Connected to rates via pipes

Rate — Valve / Bowtie

Rates define flow between levels. The valve shape has a triangular inlet and a rectangular body. Rates use .KL on the left side and .K on the right side references.

R BIRTH.KL=POP.K*BR
BIRTH Rate node — valve Prefix: R Timescript: .KL (LHS), .K (RHS) Units derived from connected level Connected by pipe (solid line)

Auxiliary — Circle

Auxiliaries are algebraic computations evaluated each step. They receive information via wires and can feed into rates or other auxiliaries.

A RATIO.K=SICK.K/POP.K
RATIO Auxiliary node — circle Prefix: A Timescript: .K (both sides) General algebraic helper Connected by information wires

Table Lookup — Circle with Lines

Table nodes are auxiliaries that use a TABLE function. The circle has horizontal data lines to distinguish it from plain auxiliaries. Data values come from a T line.

A EFFECT.K=TABLE(ETAB,INPUT.K,0,100,25)
T ETAB=0/0.2/0.6/0.9/1.0
EFFECT Table node — circle w/ lines Prefix: A (formula) + T (data) Functions: TABLE, TABHL, TABXT, TABPL T line: slash-separated values Context panel shows chart preview TABLE: warns if out of range TABHL: clamps silently at bounds

Constant — Dot + Line

Constants are fixed numeric values that do not change over time. No timescript is needed. They appear as a small dot on a horizontal line.

C BR=0.03
BR Constant node — dot + line Prefix: C No timescript (just C NAME=VALUE) Can override in reruns Context panel: convert to table/array

Supplementary — Dashed Triangle

Supplementary variables are output-only computations. They are calculated each step but are not intended to feed back into the model. Useful for reporting derived quantities.

S OUT.K=POP.K*1000
OUT Supplementary — dashed triangle Prefix: S Timescript: .K (both sides) Output-only: does not feed back Useful for reporting / monitoring

Array Level — Stacked Rectangles

Array levels represent multi-element stocks. They use FOR to declare index variables and I for integer constants. Each element has its own equation expanded at parse time.

FOR AGE=1,3=YOUNG,ADULT,OLD
I NAGES=3
L POP.K(AGE)=POP.J(AGE)+DT*(IN.JK(AGE)-OUT.JK(AGE))
POP [ ] Array level — stacked rects Prefix: L (with FOR/I declarations) Size: 2–20 elements Index variable for subscript access Context panel: per-element tabs Array functions: SUM, SUMV, SCLPRD

Ghost — Dashed Copy

Ghost nodes are diagram routing helpers. They duplicate the appearance of an existing variable so you can wire it closer to consumers without creating long crossing wires. No new equation is generated.

POP original POP ghost copy No equation generated Dashed outline, reduced opacity Create from Ghost dropdown or menu Can retarget specific wire consumers

Plot Node — Embedded Chart

Plot nodes embed a live chart directly on the diagram canvas. They display the time series from the active run's PLOT statement. Click to configure variables, symbols, and scales.

Plot: BASE Plot node — embedded chart Statement: PLOT VAR=CHAR(lo,hi) Run-scoped: tied to active RUN Click to open config panel Drag to reposition on canvas Updates live after simulation run

Note Node — Annotation Card

Notes are free-form annotations for documenting parts of the model. They are backed by O statements in the editor with NTITLE and NBODY fields.

O NTITLE=INFECTION RATE,NBODY=PEOPLE PER DAY
INFECTION RATE PEOPLE PER DAY CONTACT DYNAMICS Note node — annotation card Prefix: O Format: O NTITLE=...,NBODY=... Double-click to edit title/body Run-scoped: per active run section

Context Panel

The right-side context panel changes by selected element type. Click any node in the diagram to open it.

Panel ModeKey FieldsApply Writes
Level NodeType dropdown, Name, Formula, Units, Description (D), Initial Value (N)L, N, U, D lines
Rate NodeType dropdown, Name, Formula, Units (read-only — derived from connected level), DescriptionR, D lines (unit inferred from level)
Auxiliary NodeType dropdown, Name, Formula, Units, DescriptionA, U, D lines
Constant NodeType dropdown, Name, Formula (numeric value), Units, DescriptionC, U, D lines
Table NodeName, TABLE formula, T data (slash-separated), chart preview, Array Const toggleA + T lines (+ D if set)
Array NodeSize (2–20), Index variable, Element aliases, per-element tabsFOR, I, expanded L/R per element
Ghost NodeOriginal variable (read-only), Description, Units, Wire consumer checkboxesWire routing only (no equation)
Plot ConfigVariables (checkbox list), Symbol letters, Lo/Hi scale values per groupPLOT statement for active run
Print ConfigVariables (checkbox list)PRINT statement for active run
NoteNTITLE and NBODY text fieldsO NTITLE=...,NBODY=...

Common controls on all equation panels:

  • Insert function bar — chip buttons organized by category: Ops (+−*/() DT TIME.K), Math (SQRT, ABS, …), Table (TABLE, TABHL, …), Logic (CLIP, SWITCH, …), Time (STEP, RAMP, PULSE), Delay (DELAY1, SMOOTH, …), plus any user macros.
  • Connections list — shows inbound wires and pipes with direction, variable name, type, and a remove button.
  • Hide in diagram — checkbox to visually hide the node while keeping the equation.
  • Buttons — Apply (writes all changes to editor), Duplicate, Cancel, Delete.
Element Properties Type ▾ Level Name POP Formula POP.J+DT*(BIRTH.JK-DEATH.JK) Insert: DT TIME.K SQRT TABLE CLIP STEP DELAY1 Variable Description TOTAL POPULATION Units PERSONS Initial Value (N) 1000 Connections: ← BIRTH (pipe) → DEATH (pipe) ← BR (wire) Apply Duplicate Cancel Delete ☐ Hide in diagram

Wires, Pipes + Ghosts

Connections link diagram nodes to represent dependencies. There are two types: information wires and flow pipes.

INFORMATION WIRE (dashed) RATIO INF Wire = information link. Adds source as a dependency in target's formula. FLOW PIPE (solid) POP DEATH Pipe = material flow. Level ↔ Rate only. Click pipe to toggle hollow info markers on/off.
ConnectionAppearanceValid BetweenEffect
WireDashed line with arrowAny node → Any nodeAdds source variable to target's formula dependencies
PipeSolid line, optionally with hollow circlesLevel ↔ Rate onlyCreates flow connection for integration; hollow circles are a diagram display toggle
Module proxy wireWhite dotted line at the module box edgeNode ↔ Module or Module ↔ Module (root view)Represents pending or collapsed module connections and can be curved like other wires
  • Creating wires: Select Wire mode, click the source node, then click the target. Or Shift+drag from source to target.
  • Creating pipes: Select Pipe mode, click a level, then a rate (or vice versa).
  • Module connections: In the root view, you can draw a wire or pipe between a node and a module box, or between two module boxes. That creates a pending module connection shown as a white dotted proxy wire.
  • Outgoing module wires: Open the source module and use the source node's context panel to assign which internal node owns the outgoing module wire or pipe.
  • Incoming module wires: Wires going into a module appear inside node panels as Module Imports. Click an import to insert that variable into a formula or initial-value field.
  • Module-to-module wires: Assign the source side in the source module first. The destination module then exposes that assigned source node as an import in its internal node panels.
  • Pipe display: Hover and click a pipe to open its settings, then switch between a plain material pipe and a pipe with hollow information markers.
  • After creation, draw mode automatically returns to Move/Select.
  • Removing: Select a node, open context panel, and use the remove button next to a connection.
  • Ghosts are diagram routing helpers. They duplicate a node's appearance at a different position so wires don't cross the whole diagram. No equation is generated.
  • Ghost nodes can retarget specific consumers — reassigning which consumers read from the ghost's position.
Ghosts are diagram-level routing helpers only. They do not duplicate equations in the model text.

Notes + O Statement

Notes are diagram annotations with title and body, backed by O lines in the editor.

O NTITLE=INFECTION RATE,NBODY=PEOPLE PER DAY / CONTACT DYNAMICS
RuleBehavior
Both NTITLE and NBODY requiredCode checks flag a missing note title or body
Comma separator requiredExpected format: O NTITLE=...,NBODY=...
Run scopedNotes are written into the active run section
Diagram edit syncDouble-click note opens panel and updates O line

S.I.M.P.L.E. SD Extras

  • D prefix: D VARNAME=DESCRIPTION with X continuation support.
  • Context field: Variable Description now syncs with D lines.
  • Tooltip format: description + unit + red error lines.
  • Error glow: red glow on diagram nodes tied to code issues.
  • Unit safety: shared U lines are preserved during apply/delete operations.
  • Insert sync: toolbar and Insert menu include matching elements.
D PREFIX + X CONTINUATION D POP=TOTAL POPULATION OF THE X ENTIRE REGION UNDER STUDY U POP=PERSONS,BR=PERSONS/YEAR O NTITLE=INFECTION,NBODY=DYNAMICS NOTE D, U, and O are custom extensions NODE ERROR STATE + TOOLTIP SICK INFECTED AND SYMPTOMATIC unit: PERSONS error: SICK requires .K suffix error: undefined variable CR RECOV ✓ no errors

Language Reference

S.I.M.P.L.E. code uses uppercase card-image style statements. Keep statements within 72 characters, start the statement identifier in column 1, and use X for continuation.

*     MODEL TITLE
L     POP.K=POP.J+DT*(BIRTH.JK-DEATH.JK)
N     POP=1000
U     POP=PERSONS,DT=DAYS
D     POP=TOTAL POPULATION

Supported statement families include core equations, metadata cards, run controls, and macro cards:

FamilyStatementsNotes
EquationsL, R, A, C, N, TCore model structure and values
MetadataU, D, XUnits, descriptions, and continuation lines
Run cardsSPEC, PRINT, PLOT, RUNPer-run execution and output configuration
MacrosMACRO, INTRN, MENDReusable equation templates expanded at parse time
This help follows the S.I.M.P.L.E. code rules used by the editor, including D and O support alongside the core statement families.

Timescripts

SuffixMeaningTypical Use
.KCurrent time valueCurrent level/aux states
.JPrevious time valueLevel carry-forward term
.JKRate from J to KFlow terms in level integration
.KLRate from K to LRate equation left-hand side
L POP.K=POP.J+DT*(BIRTH.JK-DEATH.JK)
R BIRTH.KL=POP.K*BR

All Prefixes (L/R/A/C/N/T/S/U/D/O/X/FOR/I)

PrefixMeaningExample
LLevelL POP.K=POP.J+DT*(...)
RRateR BIRTH.KL=POP.K*BR
AAuxA RATIO.K=SICK.K/POP.K
CConstC BR=0.03
NInitialN POP=1000
TTable dataT TAB=0/1/2/3
SSupplementaryS OUT.K=POP.K*1000
UUnitsU POP=PERSONS,BR=PERSONS/DAY
DDescriptionD POP=TOTAL POPULATION
ONote payloadO NTITLE=...,NBODY=...
NOTEComment lineNOTE TEXT COMMENT
XContinuationX CONTINUED TEXT...
FORArray index declarationFOR AGE=1,3=YOUNG,ADULT,OLD
IInteger/subscript constantsI NAGES=3
SPEC/PRINT/PLOT/RUNRun control/output cardsSPEC DT=1,... / PRINT ...
MACRO/INTRN/MENDMacro blocksMACRO MY(...)

Prefix formatting rules:

  • Prefix appears in column 1, followed by spaces, then statement text.
  • Long U and D statements can wrap using one or more X lines.
  • Variable names are normalized uppercase; unit text is normalized uppercase.

Functions + Operators

All 28 built-in functions. User-defined macros are also callable as functions.

CategoryFunctionSignature
MathSQRTSQRT(x)
ABSABS(x)
SINSIN(x)
COSCOS(x)
EXPEXP(x)
LOG / LOGNLOG(x) — natural logarithm
MAXMAX(a, b)
MINMIN(a, b)
Table LookupTABLETABLE(name, input, lo, hi, step)
TABHLTABHL(name, input, lo, hi, step) — clamp at bounds
TABXTTABXT(name, input, lo, hi, step) — extrapolate beyond bounds
TABPLTABPL(name, input, lo, hi, step)
Logic / ConditionalCLIPCLIP(a, b, x, y) — returns a if x≥y, else b
SWITCHSWITCH(a, b, x) — returns a if x=0, else b
FIFZEFIFZE(a, b, x) — returns a if x=0, else b
FIFGEFIFGE(a, b, x, y) — returns a if x≥y, else b
Delay / SmoothDELAY1DELAY1(input, delay) — 1st-order material delay
DELAY3DELAY3(input, delay) — 3rd-order material delay
DELAYPDELAYP(input, delay, pipeline) — 3rd-order with pipeline output
DLINF3DLINF3(input, delay) — 3rd-order information delay
SMOOTHSMOOTH(input, delay) — exponential smoothing (1st-order info delay)
Time / InputSTEPSTEP(height, stime) — step input at time stime
RAMPRAMP(slope, stime) — ramp starting at stime
PULSEPULSE(height, first, interval) — repeating pulse train
RandomNOISENOISE() — uniform random [−0.5, 0.5]
NORMRNNORMRN(mean, stddev) — normal random
SamplingSAMPLESAMPLE(input, interval, start) — sample-and-hold
ArraySUMSUM(array) — sum all elements
SUMVSUMV(array, from, to) — sum range
PRDVPRDV(array, from, to) — product of range
SCLPRDSCLPRD(a, b, from, to) — scalar product
SHIFTC / SHIFTLSHIFTC(a, shift), SHIFTL(a, shift) — circular/linear shift

Operators: + - * / and exponentiation **. Precedence: ** first, then */÷, then +−. Use parentheses to override.

Function Details (from the S.I.M.P.L.E. code manual)

Table Lookups: Express arbitrary relationships between variables using tabulated data points with linear interpolation.

FunctionOut of Range Behavior
TABLEUses extreme value + warning message
TABHLUses extreme value silently (no warning)
TABXTExtrapolates from last two points (non-horizontal asymptote)
TABPLCubic spline interpolation between points. T data needs extra zeros.
A EFFECT.K=TABLE(ETAB,INPUT.K,0,100,25)
T ETAB=0.0/0.3/0.7/0.9/1.0

Delay / Smooth Functions: Model information and material delays in the system.

FunctionTypeDescription
DELAY11st-order materialFirst-order exponential delay. Output approaches input with single time constant.
DELAY33rd-order materialThird-order delay. S-shaped response, more realistic for physical processes.
DELAYP3rd-order + pipelineLike DELAY3 but also outputs the total material in the pipeline.
DLINF33rd-order informationInformation smoothing over three stages.
SMOOTH1st-order informationExponential smoothing: SMOOTH.K = SMOOTH.J + DT*(INPUT.JK − SMOOTH.J)/DELAY

Test Input Functions: Generate time-dependent inputs for testing model behavior.

FunctionOutput ShapeNotes
STEP(H, T)0 before time T, then HSudden one-time change. Both H and T can be variables.
RAMP(S, T)0 before time T, then accumulating slope SLinear increase starting at time T.
PULSE(H, F, I)Pulse of height H, width DT, starting at F, repeating every IFor impulses of area P, use PULSE(P/DT, F, I).
NOISE()Uniform random [−0.5, +0.5]Pseudo-random. Same sequence each run unless seed changed.
NORMRN(M, S)Normal distribution with mean M, stddev SMax deviation ≈ 2.4 standard deviations.
SAMPLE(X, I, S)Sample-and-hold: captures X every I time unitsReturns initial value S until first sample time.

Trigonometric / Math: Standard mathematical functions. EXP and LOGN can compute arbitrary powers: A^B = EXP(B*LOGN(A)).

Multi-Run Behavior

Models can contain multiple runs (scenarios). The first run is usually the baseline; later runs override only changed statements.

ActionResult
Select run dropdownContext edits target that run section in the editor
+ RunCreates a new run section for scenario overrides
Run modelAll run sections execute and populate Plot/Data tabs
Settings applySPEC settings are synchronized across runs
* BASE RUN
SPEC  DT=1,LENGTH=100,PRTPER=1,PLTPER=1
RUN   BASE

* ALT RUN
R BR.KL=POP.K*0.04
RUN   HIGH BIRTH

Macros

Macros are reusable equation templates. They are defined at the top of the editor and expanded into normal equations when called.

MACRO MYSMOOTH(INPUT,DELAY)
A MYSMOOTH.K=SMOOTH(INPUT.K,DELAY)
MEND

Macro workflow:

  • Create/edit from the Macro dropdown in the diagram toolbar or directly in code.
  • Use INTRN for helper names that should be unique for each expansion.
  • Calls must pass the correct number of arguments.
  • Macros do not appear as standalone diagram nodes; expanded variables do.

Simulation Settings

Use Settings to configure DT, LENGTH, PRTPER, PLTPER, RUN name, time unit, and integration method (Euler or RK3 with REL_ERR / ABS_ERR).

The Workspace header has two run controls: Run executes the model and updates Plot/Data tabs, while SimRun executes the same model and then opens an animated replay window.

⚙ Model Settings Model Title SIR EPIDEMIC MODEL DT (Time Step) 0.5 LENGTH (Duration) 100 PRTPER 1 PLTPER 1 RUN Name BASE Time Unit DAYS Integration ▾ Euler (1st order) Cancel Apply

SimRun Replay

SimRun opens a replay window after the model finishes, then animates the diagram slowly so you can see which pipes, rates, and information links are most active over time.

Animated Diagram Replay Play / Pause / Restart Slider Scrubbing Dominant Loop Highlighting

Use the red ▶ SimRun button beside ▶ Run in the Workspace header. SimRun runs the model first, then uses the selected Plot run when available; otherwise it replays the first completed run.

  • Pipes and wires get wider as relative flow strength increases.
  • Opacity and glow also respond to the same frame, so weak links fade back while strong links stand out.
  • The right panel lists the strongest detected feedback loops and highlights the selected loop in orange.
  • The play button, restart button, and slider let you either watch the replay or scrub through it manually.
Simulation Replay Replay flow intensity and dominant feedback loops over time Time 25 Frame 26 / 101 POP BIRTH DEATH RATIO Dominant Loops R1 86% active POP -> BIRTH -> POP B1 52% active POP -> DEATH -> POP Pause Drag slider to scrub Restart
SimRun is a visual explanation layer. It does not replace Plot/Data output; it helps reveal when reinforcing or balancing structures dominate during the run.

Plot Tab + Plot Nodes

Run dropdown shows runs with PLOT statements. Diagram plot nodes show run-specific series directly on canvas.

Plot controls include line mode, letter markers, variable chips, and hover readouts. Variables with different magnitudes are normalized by group so traces stay visible.

PLOT Syntax

PLOT  VAR=CHAR(lo,hi)/VAR2=C2(*,*),VAR3=C3(*,*)
  • =CHAR — assign a single letter symbol that marks the trace (e.g. POP=P).
  • (lo,hi) — set the Y-axis bounds for this variable. Use * for auto-scale.
  • / — separates variables that use different Y-axis scales.
  • , — groups variables on the same Y-axis scale.
PLOT  POP=P(0,5000)/BIRTH=B(*,*),DEATH=D(*,*)

Above: POP on its own scale 0–5000, BIRTH and DEATH share an auto-scaled axis. Only runs containing a PLOT statement appear in the Plot run dropdown.

Run: ▾ BASE ☐ Lines ☑ Letters P POP B BIRTH D DEATH P P P P B B D D 0 50 TIME Diagram Plot Node embedded chart on canvas

Data Tab + CSV Export

Data table includes runs with PRINT statements. Use CSV button to export full output for spreadsheet analysis.

Rows are spaced by PRTPER from SPEC. If PRTPER=0, no print output is produced, so the Data tab stays empty for that run.

PRINT POP,BIRTH,DEATH

Only runs containing a PRINT statement appear in the Data output and CSV export.

💾 CSV RUN TIME SUSC SICK RECOV BIRTH DEATH BASE 0 988 2 10 29.64 19.76 BASE 5 940 30 30 28.20 18.80 BASE 10 880 52 66 26.40 17.60 BASE 15 812 78 110 24.36 16.24 … rows spaced by PRTPER from SPEC

Common Errors

AreaTypical MessagesHow to Fix
EquationsUndefined variable, missing suffix, malformed assignmentCheck spelling, suffixes (.K/.J/.JK/.KL), and equation syntax
UnitsInvalid U entries, inconsistent dimensionsUse U NAME=UNIT format and correct each variable entry
DescriptionsD line must be D VARNAME=DESCRIPTIONKeep D format exact; use X lines for long text
MacrosNO MEND CARD, wrong argument countClose each MACRO with MEND and match call arguments
Run cardsNo or incomplete SPEC cardProvide DT, LENGTH, PRTPER, and PLTPER

Code issues are shown in three places at once: editor underline, red node glow, and node tooltip error lines.

Model Examples

Starter examples you can paste and run:

Quick Start

* QUICK START
L POP.K=POP.J+DT*(BIRTH.JK-DEATH.JK)
R BIRTH.KL=POP.K*BR
R DEATH.KL=POP.K*DR
C BR=0.03
C DR=0.02
N POP=1000
U DT=YEAR,POP=PERSONS,BIRTH=PERSONS/YEAR,DEATH=PERSONS/YEAR,BR=1/YEAR,
X DR=1/YEAR
D POP=TOTAL POPULATION
SPEC  DT=1,LENGTH=50,PRTPER=1,PLTPER=1
PRINT POP,BIRTH,DEATH
PLOT  POP=P(0,3000)/BIRTH=B(0,200)/DEATH=D(0,200)
RUN   BASE

Array Cohort Example

This shows a three-element aging chain with one plotted line per array element.

* ARRAY COHORT MODEL
FOR AGE=1,3=YOUNG,ADULT,OLD
L POPULATION.K(AGE)=POPULATION.J(AGE)+DT*(IN.JK(AGE)-OUT.JK(AGE))
R IN.KL(AGE)=SWITCH(BIRTHS,OUT.JK(AGE-1),AGE-1)
R OUT.KL(AGE)=POPULATION.K(AGE)/RESIDENCE(AGE)
A TOTALPOP.K=SUM(POPULATION.K)
C BIRTHS=12
C RESIDENCE(1)=8
C RESIDENCE(2)=22
C RESIDENCE(3)=18
N POPULATION(1)=120
N POPULATION(2)=260
N POPULATION(3)=90
U DT=YEAR,POPULATION=PEOPLE,TOTALPOP=PEOPLE,BIRTHS=PEOPLE/YEAR,
X IN=PEOPLE/YEAR,OUT=PEOPLE/YEAR,RESIDENCE=YEAR
SPEC  DT=1,LENGTH=40,PRTPER=1,PLTPER=1
PRINT TOTALPOP,POPULATION(1),POPULATION(2),POPULATION(3)
PLOT  POPULATION(1)=A,POPULATION(2)=B,POPULATION(3)=C/TOTALPOP=T
RUN   BASE

Macro Smoothing Example

This defines a reusable smoothing macro, then calls it from a normal auxiliary equation.

MACRO MYSMOOTH(INPUT,DELAY)
A MYSMOOTH.K=SMOOTH(INPUT.K,DELAY)
MEND

* MACRO EXAMPLE
A DEMAND.K=STEP(100,5)
A SMOOTHED.K=MYSMOOTH(DEMAND.K,4)
SPEC  DT=0.5,LENGTH=30,PRTPER=1,PLTPER=1
PRINT DEMAND,SMOOTHED
PLOT  DEMAND=D(0,120)/SMOOTHED=S(0,120)
RUN   BASE

Menu Reference

MenuItems
FileNew (Ctrl+N), Open (Ctrl+O), Save (Ctrl+S), Save As (Ctrl+Shift+S), Rename, Export Diagram → SVG / PNG / PDF, Load Example, About
EditUndo (Ctrl+Z), Redo (Ctrl+Y)
InsertLevel, Rate, Auxiliary, Table Lookup, Constant, Supplementary, Array, Macro, Ghost, Plot, Print, Note
SimulationSettings (opens SPEC editor), Run (Ctrl+Enter)
ToolsDimensional Analysis, Sensitivity Analysis, Feedback Loops, Causes Tree
HelpManual Help (this panel), Bugs & Feature Requests (GitHub link)

The Workspace header also includes ▶ Run and ▶ SimRun. SimRun is not a menu item; it is a direct replay control that runs the model and opens the animated simulation window.

File Menu Detail

ItemShortcutDescription
NewCtrl+NClear editor and start a fresh model. Prompts to save unsaved work.
OpenCtrl+OOpen a model from cloud storage (requires sign-in).
SaveCtrl+SQuick save to cloud. If no cloud doc exists yet, opens Save As.
Save AsCtrl+Shift+SSave with a new name to cloud storage.
RenameRename the current cloud model file.
Export → SVGExport the diagram as a scalable SVG file. Best for documentation and editing.
Export → PNGExport the diagram as a 2× resolution PNG image with background fill.
Export → PDFExport the diagram as a single-page PDF with embedded image.
Load ExampleLoad a built-in example model to explore and learn from.
AboutVersion info and application details.

Insert Menu Detail

Every node type from the diagram toolbar is also accessible via the Insert menu. Selecting an item creates the corresponding node on the diagram canvas.

ItemCreates
LevelNew L equation and rectangle node
RateNew R equation and valve node
AuxiliaryNew A equation and circle node
Table LookupNew A+T equation and table circle node
ConstantNew C equation and dot+line node
SupplementaryNew S equation and dashed triangle node
ArrayNew array level with FOR/I declarations
MacroOpens macro dropdown for new/edit
GhostOpens ghost dropdown with variable search
PlotEmbedded chart node on diagram
PrintOpens PRINT variable configuration popup
NoteNew O statement and annotation card

Tools Overview

The Tools menu provides four analysis tools that help you understand and validate your model's structure and behavior. All tools run against the current editor content.

Dimensional Analysis Check unit consistency across all equations Sensitivity Analysis Perturb a parameter and measure output elasticity Feedback Loops Find reinforcing and balancing causal loops Causes Tree Trace upstream causes for any variable

Dimensional Analysis

Dimensional Analysis checks that your model's unit declarations are self-consistent. It uses U line declarations and propagates units through equations to find mismatches.

Open via Tools → Dimensional Analysis.

How It Works

  1. Parses the current editor source to collect all equations.
  2. Reads declared units from U lines (e.g., U POP=PERSONS,BR=1/YEAR).
  3. Propagates inferred units through equation dependencies.
  4. Checks unit consistency for every equation and flags mismatches.
⊞ Dimensional Analysis Summary Declared units: 4 │ Inferred units: 6 │ Equations checked: 8 │ ✓ All consistent Declared Units Variable Unit Type POP PERSONS Level BR 1/YEAR Constant DR 1/YEAR Constant DT YEARS System Inferred Units BIRTH PERSONS/YEAR Rate (inferred) DEATH PERSONS/YEAR Rate (inferred) ⚠ RATIO: left side has DIMENSIONLESS, right side has PERSONS/PERSONS — possible mismatch Tip: Add U RATIO=DIMENSIONLESS to declare this intentionally

Output Sections

SectionShows
SummaryCount of declared units, inferred units, equations checked, pass/warnings
Declared UnitsVariables with explicit U line declarations and their types
Inferred UnitsVariables whose units were propagated from equation dependencies
No UnitsVariables without any unit information (declared or inferred)
WarningsUnit mismatches found during consistency checking (red border)
Add U declarations to as many variables as possible. The more units you declare, the more comprehensive the analysis.

Sensitivity Analysis

Sensitivity Analysis measures how much a chosen output variable responds to changes in a parameter. It runs three simulations: base, perturbed up, and perturbed down.

Open via Tools → Sensitivity Analysis.

Configuration

SettingDescription
Parameter to perturbDropdown of all constants (C) and initial values (N) in the model
Output variableDropdown of all levels (L), rates (R), auxiliaries (A), and supplementaries (S)
Perturbation %The percentage to vary the parameter (1–100%, default 10%)

How It Works

  1. Runs the base simulation with the current parameter value.
  2. Runs a +% simulation with the parameter increased by the perturbation amount.
  3. Runs a −% simulation with the parameter decreased by the perturbation amount.
  4. Shows a trajectory chart comparing all three runs over time.
  5. Calculates elasticity at each time step: (% change in output) / (% change in parameter).
📊 Sensitivity Analysis Parameter: ▾ BR Output: ▾ POP Perturbation: 10% Run POP over TIME | BR = 0.03 ± 10% base +10% −10% 0 50 TIME Results BASE value of BR: 0.03 │ +10% → 0.033 │ −10% → 0.027 Final POP: base=4479 +10%=5234 −10%=3820 Final Elasticity: 1.58 — POP is sensitive to BR

Reading Elasticity

ElasticityInterpretation
|E| < 0.5Output is insensitive to the parameter — small effect
|E| ≈ 1.0Output changes proportionally — linear relationship
|E| > 1.0Output is highly sensitive — amplified response, leverage point
Sensitivity Analysis excludes SPEC system parameters (DT, LENGTH, PRTPER, PLTPER) from the parameter dropdown.

Feedback Loops

Feedback Loops identifies all circular causal chains in your model. Each loop is classified as Reinforcing (positive feedback) or Balancing (negative feedback) based on link polarities.

Open via Tools → Feedback Loops.

How It Works

  1. Builds an adjacency graph from all equation dependencies (excluding N initial-value equations).
  2. Runs an async depth-first search (chunked for responsiveness) to find cycles up to 12 variables long.
  3. Determines link polarity heuristically: additive references have positive (+) polarity; references in a denominator have negative (−) polarity.
  4. Classifies each loop: an even number of negative links → Reinforcing (R); an odd number → Balancing (B).
  5. Displays up to 2000 unique loops with colored arrows showing each link's polarity.
🔄 Feedback Loops Filter by variable: ▾ All variables Found: 5 loops (3 R, 2 B) R Reinforcing loop (3 variables) POP →(+) BIRTH →(+) POP more people → more births → more people B Balancing loop (4 variables) POP →(+) CROWD →(−) BIRTH →(+) POP one negative link makes it balancing R Reinforcing loop (5 variables) INVEST →(+) CAPACITY →(+) OUTPUT →(+) REVENUE →(+) INVEST Analysis runs asynchronously with progress indicator. Large models may take several seconds.

Understanding Loop Polarity

SymbolMeaning
→(+)Positive link: as the source increases, the target increases (or decreases together)
→(−)Negative link: as the source increases, the target decreases (appears in denominator or subtracted)
RReinforcing: even number of negative links → self-amplifying feedback
BBalancing: odd number of negative links → self-correcting feedback
  • Use the filter dropdown to show only loops containing a specific variable.
  • Maximum loop length is 12 variables. Maximum displayed loops is 2000.
  • Progress is shown during search: "X found so far (Y% scanned)".

Causes Tree

The Causes Tree traces all upstream dependencies for a chosen variable, displayed as an SVG tree diagram using the same node shapes as the main diagram.

Open via Tools → Causes Tree.

Configuration

SettingDescription
Select a variableDropdown of all model variables (excluding N initial values)
DepthHow many levels deep to trace (2–6, default 4)
🌳 Causes Tree Variable: ▾ POP Depth: ▾ 4 + POP BIRTH DEATH BR DR ↻ POP circular ref

Tree Features

  • Node shapes match diagram: Levels = rectangles, Rates = valves, Auxiliaries = circles, Constants = dot+line.
  • Circular references: Marked with a dashed border and ↻ symbol to prevent infinite recursion.
  • Zoom controls: Use +, −, and ⊙ (reset) buttons to zoom the tree view.
  • Theme-aware: Tree adjusts to light or dark mode automatically.

Export Diagram

Export the current diagram to an image file via File → Export Diagram.

FormatBest ForDetails
SVGDocumentation, editingScalable vector format. Inline styles included. Can be opened in design tools for further editing.
PNGPresentations, sharingRendered at 2× resolution for high-DPI displays. Background color matches your theme.
PDFPrinting, reportsSingle-page PDF with embedded image. Uses the diagram's bounding box as page size.

All exports are auto-cropped to the diagram content with padding. Hidden nodes are excluded. The file downloads automatically to your Downloads folder.

Cloud Save / Load

S.I.M.P.L.E. SD supports cloud storage for your models. Sign in with email/password or Google to save and access models from any device.

Authentication

  • Sign In / Sign Up: Use the top-right button or the welcome screen. Supports email+password and Google OAuth.
  • Once signed in, the button changes to show your account with Save and My Models options.

Cloud Operations

ActionHowDescription
SaveCtrl+S or File → SaveQuick save to cloud. If no cloud document exists yet, opens Save As.
Save AsCtrl+Shift+S or File → Save AsSave with a new name. Enter a model name in the dialog and confirm.
OpenCtrl+O or File → OpenOpens My Models list showing all saved models, sorted by last modified date.
RenameFile → RenameRename the current cloud model file (copies to new name, deletes old).
DeleteMy Models listEach model in the list has a delete button for removing unwanted models.
Cloud saves include the diagram layout (node positions). When you open a cloud model, nodes appear exactly where you left them.

Autocomplete

The editor provides live autocomplete suggestions as you type. Suggestions include variable names, system constants, functions, keywords, and timescripts.

Suggestion Categories

IconCategoryExamples
VUser variablePOP, BIRTH, RATIO — names from your model equations
SSystem constantDT, TIME, LENGTH, PRTPER, PLTPER
FFunctionSQRT, TABLE, CLIP, DELAY1, STEP, PULSE, etc. (opens parenthesis on accept)
KKeywordL, R, A, C, N, S, T, U, SPEC, PRINT, PLOT, RUN, NOTE, MACRO
TTimescript.K, .J, .KL, .JK — appears after typing a dot (.)

Usage

  • Start typing to see suggestions — minimum 1 character triggers the popup.
  • Use / arrow keys to navigate the list.
  • Press Tab or Enter to accept the highlighted suggestion.
  • Press Escape to dismiss the popup.
  • After a dot (.), timescript suggestions appear ranked by variable type (e.g., levels show .K/.J first, rates show .KL first).
  • Accepting a function inserts the name followed by an opening parenthesis.

Shortcuts + Tips

ShortcutAction
Ctrl+EnterRun model
Space (inside SimRun)Play / pause replay
Ctrl+ZUndo
Ctrl+Y / Ctrl+Shift+ZRedo
Ctrl+NNew model
Ctrl+OOpen model (cloud load)
Ctrl+SSave
Ctrl+Shift+SSave As
TabInsert 6 spaces / accept autocomplete
EnterAccept autocomplete selection
EscapeClose dialog or SimRun / cancel draw mode / deselect node / dismiss autocomplete
DeleteDelete selected diagram element
Shift+DragQuick wire placement between nodes
↑ / ↓Navigate autocomplete suggestions

Editor Tips

  • Use ghost variables to reduce long wires across the diagram.
  • Use Fit View when the diagram pans far from center.
  • Autocomplete suggestions appear as you type variable and function names. Timescript suggestions appear after a dot.
  • The column-72 ruler (dashed red line) marks the S.I.M.P.L.E. code line length limit. Use X continuation lines for longer statements.
  • Code issues appear in three synchronized places: editor underline, diagram node glow, and node tooltip.
  • The editor enforces uppercase style for all code. Variable names and units are normalized automatically.

Diagram Tips

  • Double-click a node to open its context panel for editing.
  • Right-click a node to access quick actions.
  • Use the Lasso tool to select and move or hide multiple nodes at once.
  • Zoom with the +/− buttons or fit the entire model with Fit View.
  • Wires show information flow (dashed lines). Pipes show material flow (solid lines).
  • Hidden nodes can be restored from the "Hidden" dropdown in the Run toolbar section.

Model Tips

  • A model needs at minimum: one equation, a SPEC card, and a RUN card.
  • Add U declarations for unit checking. Use D declarations for documentation.
  • Use Sensitivity Analysis to find which parameters have the most impact.
  • Use Feedback Loops to understand the causal structure of your model.
  • Use Dimensional Analysis to catch unit errors early.
  • Save frequently to the cloud. Your diagram layout is preserved with the model.
Unified S.I.M.P.L.E. code documentation

🚀 Welcome to S.I.M.P.L.E. SD

Choose how to get started:

New Run
⚙ Model Settings
Element Properties

Running model...

This may take a moment for large models