Systems Dynamics Modelling and simulation toolkit based on the Stock and Flow methodology.
Core functionality:
- Creation and iterative design of stock and flow models.
- Simulation of systems dynamics models.
Current:
- Stock and Flow model
- Simple arithmetic expressions (formulas)
- Built-in functions: abs, floor, ceiling, round, power, sum, min, max
- Whole editing history is preserved.
- Editing is non-destructive and can be reversed using undo and redo commands.
- Exports:
See also: PoieticCore.
Planned:
- More useful built-in functions and variables for the Stock and Flow model.
- Sub-systems.
Available platforms: MacOS 14 (and later), Linux
To install the poietic
command-line tool, run the following command in the
project's top-level directory:
./install
The tool will be installed in the Swift Package Manager's' ~/.swiftpm/bin
directory. Make sure you have the directory in your PATH
, if you do not, then
add the following to the end of your ~/.zshrc
or ~/.bashrc
file:
export PATH=~/.swiftpm/bin:$PATH
The examples are located in the Examples repository. Follow instructions how to run them in the documentation contained within the repository.
- Stock and Flow package: PoieticFlows
- Object Graph modelling package: PoieticCore
The Poietic Flows includes a command-line tool to create, edit and run
Stock and Flow models called poietic
.
See the Command Line Tool documentation.
Command summary:
new
: Create an empty design.info
: Get information about the designlist
: List design content objects.show
: Describe an object.edit
: Edit an object or a selection of objects.set
: Set an attribute valueundo
: Undo last changeredo
: Redo undone changeadd
: Create a new nodeconnect
: Create a new connection (edge) between two nodesremove
: Remove an object – a node or a connectionauto-parameters
: Automatically connect parameter nodes: connect required, disconnect unusedlayout
: Lay out objectsalign
: Align objects on canvas
import
: Import a frame into the design.run
: Run the simulation and generate outputwrite-dot
: Write a Graphviz DOT file.metamodel
: Show the metamodelcreate-library
Create a library of multiple models.
Use --help
with a desired command to learn more.
Think of this tool as ed but for data represented as a graph. At least for now.
The tool is designed in a way that it is by itself interactive for a single-user.
For interactivity in a shell, set the POIETIC_DATABASE
environment variable to
point to a file where the design is stored.
Example session:
poietic new
poietic info
poietic edit add Stock name=water formula=100
poietic edit add Flow name=outflow formula=10
poietic edit connect Drains water outflow
poietic list formulas
poietic edit add Stock name=unwanted formula=0
poietic list formulas
poietic edit undo
poietic list formulas
poietic run