Biflow

BPTK API Documentation for the Biflow class
Keywords

system dynamics, bptk, bptk-py, python, business prototyping

Biflow

Biflow Constructor

Biflow(model, name, function_string=None)

Biflow in an SD DSL model

A biflow is a flow that may run in either direction: positive values increase the stock it feeds, negative values decrease it. Use one where a single quantity can go both ways — net migration, net cash flow, a temperature difference — instead of modelling an inflow and an outflow that are never both active.

Create one through the model: model.biflow("net_migration").

Biflow.equation

property equation

The rate for one timestep, of either sign. Read, it returns the equation as originally set - an SD DSL Element or Operator.

net_migration = model.biflow("net_migration")
net_migration.equation = immigration_rate - emigration_rate

At a non-negative stock a biflow can come out lower than its equation: the stock cuts it back while it drains it, and leaves it alone while it fills it.

Inherited from Element

Everything else — function_string, plot() and the arrayed-element API — comes from Element, where it is documented once for all element types.