Now we are ready to specify initial values of stocks.
We want to set total population (our TotalPopulation parameter) as the initial value of PotentialAdopters stock.
To create a link
- Double-click the Link.
- Right after that, go to the graphical editor and click the element that is mentioned in initial value (TotalPopulation).
- Finally, click the
It is important to draw the link in the right direction — from the independent variable to dependent.
- You will see the link in the graphical editor.
Analogous to the flow, when it is selected, its end points should be indicated with little green circles. Otherwise, if there is a white circle on some its end, it means that this particular end point was not connected correctly. To establish the valid connection, please drag this end point onto the variable you want to connect.
Now, when you created the link, you can specify the initial value mentioning the connected parameter.
Define the initial number of potential adopters
- Select the PotentialAdopters stock.
- In the stock’s Properties, type TotalPopulation in the Initial value edit box. Use code completion master to avoid typing the whole names of variables and functions. To open the master, click at the desired position in the edit box, and then press Ctrl + Space (Alt + Space on Mac).
The list of model variables and functions available in the current context appears. Scroll to the name you want to add, or type the first letters of the name until it becomes visible in the list. Press Enter to insert the name.
Finally you should get TotalPopulation specified as the stock’s initial value:
We do not need to set up the initial value for the Adopters stock explicitly since there are no adopters initially and the stock is already initialized with zero by default.
How can we improve this article?