blockCLevel

General System Dynamics controlling level
Diagram of CLevel

Information

This is the continuous controlling Level model of the System Dynamics methodology with a single inflow and a single outflow. It computes the level by integrating over the difference between inflow and outflow rates.

Once the level reaches its maximum allowed value, it sends a Boolean signal to its inflow rate element to tell it to stop sending more stuff. Once it reaches its minimum allowed value, it sends a Boolean signal to its outflow rate element to tell it to stop demanding more stuff.

Parameters

TypeNameDefaultDescription
RealinfModelica.Constants.inf
Realx00Initial condition
RealminLevel0Smallest allowed value of stock
RealmaxLevelinfLargest allowed value of stock

Connectors

TypeNameDefaultDescription
SystemDynamics.Interfaces.MassInPortu1Inflow variable
SystemDynamics.Interfaces.MassInPortu2Outflow variable
SystemDynamics.Interfaces.MassOutPortyState variable
SystemDynamics.Interfaces.MassOutPorty1State variable
SystemDynamics.Interfaces.MassOutPorty2State variable
Modelica.Blocks.Interfaces.BooleanOutputs1Inflow control signal
Modelica.Blocks.Interfaces.BooleanOutputs2Outflow control signal

Components

TypeNameDefaultDescription
ReallevelContinuous state variable
Modelica.Blocks.Continuous.IntegratorIntegrator1
Modelica.Blocks.Logical.LessThresholdLessThreshold1
Modelica.Blocks.Math.AddAdd1
Modelica.Blocks.Logical.GreaterThresholdGreaterThreshold1