reno.components#

This module contains the various math and system dynamics object components necessary to make up a model and construct its equations.

Classes

Distribution(*operands[, per_timestep])

Represents a probability distribution or set that is drawn from for each sample (n) in a simulation.

EquationPart([sub_equation_parts])

The base object that represents some portion/subtree of a compute or equation tree.

ExtendedOperation(operands, implicit_components)

An operation defined in terms of other operations, and may require population before use.

Flag([eq, label])

Boolean value tracked for each step and sample in the simulation.

Flow([eq, label, doc, min, max, dim, group, ...])

A flow is a rate, a movement of some material/thing/quantity per some unit of time.

Function(f, *args[, inject_mathlib, ...])

Represents a call to a python function _outside_ of a model/system of equations.

HistoricalValue(tracked_ref, index_eq)

A wrapper class for a reference, specifically for getting a previous value indexed by some other equation.

Metric([eq, label])

Metrics run in a separate after-simulation analysis.

Operation(*operands)

Parent class to represent a mathematical operation in an equation.

Piecewise(equations, conditions)

A conditional allowing evaluation of two or more condition equations to determine which output equation to use.

Reference([label, doc])

A symbolic reference to some other equation component, e.g. a stock, flow, or variable.

Scalar(value)

A static, single value equation part, representing some simple value that doesn't need to be computed.

Stock([label, init, doc, min, max, dim, ...])

A stock represents some bucket or quantity of material/thing that can accumulate (in_flows) or deplete (out_flows) over time.

TimeRef()

A reference to the current simulation timestep that can be used in equations.

TrackedReference([eq, label, doc, min, max, ...])

A reference that keeps a matrix of all its values over a simulation for caching and reporting purposes.

Variable([eq, label, doc, min, max, dim, ...])

A variable is a static value(s) or function that can be used as part of other equations, e.g. flow definitons.