Page 1 of 1

Vensim: How to I add value annually

Posted: Mon Apr 28, 2025 12:37 pm
by edyel1
I am currently working on a recycling project. The simulation will be conducted over a period of 8 years. Every year, I want to input an addition of 1.1 million waste into my system. I tried to input 1.1 million into my system but my graph turns out to be a flat line. Any help is appreciated!

Re: Vensim: How to I add value annually

Posted: Mon Apr 28, 2025 12:40 pm
by Administrator
Would PULSE TRAIN do what you need? That can be used to introduce a fixed amount at various intervals.

Re: Vensim: How to I add value annually

Posted: Mon Apr 28, 2025 12:50 pm
by edyel1
Administrator wrote: Mon Apr 28, 2025 12:40 pm Would PULSE TRAIN do what you need? That can be used to introduce a fixed amount at various intervals.
I have tried using pulse train but the graph are showing a flat line with a value of 0 which doesn't make sense

Re: Vensim: How to I add value annually

Posted: Mon Apr 28, 2025 12:56 pm
by Administrator
You've got the "initial" value set to a pulse train. The initial value is used to initialize the stock, not increase it during a simulation.

Create a new variable called "yearly inflow" (or something better), make the equation PULSE TRAIN (0,0.01,1,8). Now in your equation above, add "yearly inflow" as a flow in.

Re: Vensim: How to I add value annually

Posted: Mon Apr 28, 2025 1:05 pm
by tomfid
Putting PULSE TRAIN in the Initial Value field, as in your second example, won't work because the initial value doesn't change - it just initializes the stock.

In your first example, if "Input" is constant at 1.1M and "Recycled Plastic & Monomer Feedstock" is constant, that may be correct behavior - it just implies that the outflow from the feedstock is also 1.1M. You could test this by setting the input to a test input, either using a synthesim override, or setting the equation to something like:
1.1e6 + STEP( 1e5, 2 )