Multidimensional SD DSL
Two worked examples of arrayed System Dynamics models: an aging chain over a vector and a portfolio over a matrix.
Keywords
system dynamics, bptk, bptk-py, python, computational modeling, simulation, arrays, vectors, matrices, multidimensional
Multidimensional SD DSL
Two models that put the arrayed SD DSL to work. Both write each equation once and let it hold for every index, and both are small enough to read in one sitting.
- Workforce Aging Chain – a named vector over three seniority levels. People are hired, promoted and lost at every level, and the page shows what an aging chain does that a single stock cannot: the level with the smallest outflow sets the pace of the whole firm. Four sliders over the hiring, promotion and attrition rates, and the chain responds while you watch.
- Regional Product Portfolio – a matrix of products across regions. Revenue, cost and margin are element-wise products over two dimensions, the aggregations turn the matrix back into single numbers, and
dotcollapses one dimension: the quantity matrix against a price vector gives revenue per region, and a second matrix beside it gives revenue and cost per region in one equation.
The operators themselves, what each one returns and what is deliberately not supported are on the reference page, Multidimensional SD Models.