Академический Документы
Профессиональный Документы
Культура Документы
Chapter 10 of Modeling the Environment describes the Conveyor stock, a special type of stock variable that Stella makes available within the stock
dialog box. Simply change the stock designation from reservoir to conveyor, and Stella will assign the slats image and expect you to follow the advice in
chapter 10. These notes explain how conveyor-like stocks (and their flows) may be implemented in Vensim.
Figure 1 shows a Stella conveyor stock that delays the inflow by 12 months. The transit time of the conveyor is controlled by a separate converter
(called the lag time) which is set to 12 months. The initial value of the stock is set to zero. The inflow is controlled by a time-dependent graph function. The
graph causes the inflow to jump to 100 in the 6th month. The DT is set to 0.25 months, and the inflow delivers 100 units into the stock. The contents of the stock
are removed 12 months later. The shape of the outflow is identical to the inflow. Figure 2 shows the same flows in Vensim. The stock is initialized at zero.
The equation for the outflow uses the DELAY FIXED function: outflow = DELAY FIXED(inflow,lag time,0)
Figure 1. Stella conveyor stock with a 12 month transit time and the contents
set to zero at the start of the simulation.
Figure 2. Vensim accomplishes the same 12 month delay in the flow with the
DELAY FIXED function.
Exercise #3 in Chapter 10 of Modeling the Environment asks you to practice with setting the initial value of a conveyor stock in Stella. In the example
on page 114, the stock of overwintering eggs has a 6-month transit time, so the user has the option of setting the initial value for each of the 6 slats in the
conveyor. This allows the eggs hatching flow in the first few months of a simulation to occur in the desired month.
When building the same model in Vensim, we leave the
initial value of the stock at zero. To create an early outflow
from the stock, we simply include an extra variable for the
flow in the initial months of the simulation. Figure 3 shows
the Vensim diagram for the model needed in exercise #4 on
page 114. The stocks are colored in yellow to remind us that
these are serving as the Vensim version of a conveyor stock.
The flows in pink make use of Vensims DELAY FIXED
equations to achieve the tightly controlled flows. For
example,
new eggs hatching =
DELAY FIXED(eggs deposited,incubation period,0)
maturation =
DELAY FIXED(births, maturation period,0)
deaths =
DELAY FIXED(maturation,adult period,0)
th
monthly counter
fraction female
eggs per female
incubation period
New
OverWintering
Eggs
eggs deposited
<Time>
Adults
deaths
maturation
adult period
Juveniles
births
maturation period
100
50
0
0
12
15
18
21 24 27
Time (Month)
30
33
36
39
42
45
48
monthly counter
fraction female
incubation period
New
OverWintering
Eggs
egg loss
fraction
deaths
adult period
<Time>
initial eggs to hatch
in 4th month
Adults
maturation
Juveniles
maturation period
births