Command-line tool for manipulating and exploring Poietic Models, with support for Stock and Flow simulation.
See also: Full documentation with all the commands.
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
Recommended (optional): Graphviz for visualising the design graph and Gnuplot for charts. The tool can generate output for both.
On MacOS with Homebrew:
brew install graphviz gnuplot
The examples are located in the Examples repository. Follow instructions how to run them in the documentation contained within the repository.
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
: Describe the metamodel (supports: text, markdown and HTML output)create-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_DESIGN
environment variable to
point to a file where the design is stored.
Example session, creates a simple bank account model:
poietic new
poietic info
poietic edit add Stock name=account formula=100
poietic edit add Auxiliary name=rate formula=0.02
poietic edit add Flow name=interest formula="account*rate"
poietic edit connect Fills interest account
poietic edit connect Parameter rate interest
poietic edit connect Parameter account interest
poietic info
poietic list formulas
Run the simulation:
poietic run
Make some mistakes:
poietic edit add Stock name=unwanted formula=0
poietic list formulas
poietic edit undo
poietic list formulas
If you have Graphviz installed, then you can run the
following and then open the diagram.png
image:
poietic write-dot --output diagram.dot -l name
dot -Tpng -odiagram.png diagram.dot
Discover more design possibilities by exploring the metamodel in a HTML file:
poietic metamodel -f html > metamodel.html
The above command will create a metamodel.html
file with full description of
currently available metamodel for the given design.
- Preserved history – Editing is non-destructive, can be reversed using undo and redo commands.
- Exports to different formats:
- Stock, Flow, Auxiliary, Graphical function and more kinds of nodes. See Metamodel.
- Arithmetic expressions with built-in functions. See Formulas.
Underlying packages:
- Poietic Core: repository, documentation
- Poietic Flows: repository, documentation