This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
This is a restricted reservoir of the system dynamics methodology, which accumulates material (i.e., countable entities, some form of matter) transported by flow components connected to the component's StockPorts. The MaterialStock can never become negative – we are not collecting "antimatter" – and will prevent connected flow components from draining its value below zero.
The value of the stock will be set to zero if the calculated value x is less than a very small positive amount and if reinitializeStock = true is chosen in the Advanced tab:
if reinitializeStock then
when x < 0 then
reinit(x, 0);
end when;
end if;
MaterialStock components will prevent connected flows from draining the stock via their →StockPort connectors' Boolean flags, should the calculated value x be less than a very small positive amount:
inflow.stopOutflow = not x > small; outflow.stopOutflow = inflow.stopOutflow;
inflow and outflow →StockPorts are only indicative; in general the reservoir may be filled or drained by flows connected to either port.maxValue and minValue allow to define an admissable range. It can be monitored by an assert using useAssert = true in the Advanced tab. The switch causeError controls whether an error or a warning is to be raised.init in the Advanced tab allows to select →InitializationOptions:initialValue to determine the initial value.der(x) = 0 in order to find an initial value that establishes equilibrium. initialValue -- in this case used as a start value for numerical iteration -- should be set to a value different from zero.)InformationLevel, CapacityRestrictedStock