reno.diagrams#
Functions for generating stock & flow diagrams.
Diagrams are graphviz dot diagrams, and notably don’t follow the exact format typically used with SFDs, namely sources and sinks aren’t explicitly represented.
Module Attributes
When |
|
Container background colors for nested models/submodels, each subsquent level will go one color farther into this array. |
|
Background color to use for variable nodes. |
Functions
|
Add flows and edges from variables to the passed graphviz graph. |
|
Edge with attributes for heavily highlighting in flows and outflows from stocks. |
|
De-emphasize stock variable/flow connections if they're only used in min/max constraints. |
|
Add nodes and edges for all passed stocks to the passed graph. |
|
Non-stock-inflow/outflow-related edges that point to flows are slightly de-emphasized. |
|
Edges pointing at variables are de-emphasized (usually these are auxiliary variables - variables calculated based on other variables.) |
|
Add variables and edges between variables to the passed graphviz graph. |
|
Switch between edge types correctly based on the types of src/dst nodes. |
|
Take a list of variables and a list of names of variables to remove from the list. |
|
Set themeing constants for the diagrams appropriately for dark/light theme. |
|
Generate a graphviz dot graph for all the stocks and flows of the passed model, optionally including sparklines if a simulation has been run. |