Page 1 of 1
Dynamo equations question
Posted: Tue Dec 28, 2021 2:47 pm
by alvinpoon
I am replicating the sales model from Prof John Morecroft's paper of Ratoinality & structure in behavioral model in business system.
I translate the dynamo into vensim
I am not sure how to set the constant of MIO and MIP (highlight in green) under the the inital value of IMI = MIO * MIP whereas they are already set as Aux with the lookup (highlight in yellow). What values I should use for MIO and MIP as the initial?
Thank you for advice.
Re: Dynamo equations question
Posted: Tue Dec 28, 2021 3:46 pm
by tomfid
These are lookups. In Vensim, the table name is used like a function, rather than using the TABLE function.
So, first create the TMIO and TMIP lookups, which will look like:
See Chapter 8 of the User Guide
https://www.vensim.com/documentation/20540.html and the lookup docs
https://www.vensim.com/documentation/lookups.html
There are actually two different syntaxes for a lookup:
LOOKUP NAME([(Xmin, Ymin)-(Xmax, Ymax), ... cription |
The lookup editor normally generates the first one, but for Dynamo, it may be desirable to use the second, because it's closer to what the Dynamo listing contains.
So, for TMIO, you could write
TMIO (.8,.9,1,1.1,1.2,1.3,1.4,1.5, 1,1,1,1,.9,.7,.4,.3)
where the first half of the values are the X axis from the TABLE call (.8, 1.5, .1 are xmin, xmax and interval). The second half are the numbers from TMIO, but delimited with commas rather than slashes.
Finally, make MIO and MIP auxiliaries, like
MIO = TMIO(MOT) ~ dmnl
Hope this helps.
Re: Dynamo equations question
Posted: Wed Dec 29, 2021 2:35 pm
by alvinpoon
Hi Tom
Thanks your gudiance about lookup.
Actually I know how to convert dynamo table functions into vensim lookup
what i do not know is how to formulate the IMI (initial motivation index), the paper said IMI=MIO * MIP, which to me is the constant. but the MIO.K and MIP.K.
For easy understanding how to fix this in the actual model, I posted the model I created and highlighted the IMI in red and see how you may formulate accordance to the paper equation.
Thanks
Re: Dynamo equations question
Posted: Wed Dec 29, 2021 4:04 pm
by tomfid
Just make IMI an INITIAL.
Re: Dynamo equations question
Posted: Fri Dec 31, 2021 1:56 pm
by alvinpoon
Tom
thanks. I have done it in the model,
realized that linking the aux to set the initial value of stock, that vensim will only capture the initial value of the aux only. ( i tested it myself)
I just share the model to other members for their reference
Re: Dynamo equations question
Posted: Mon Jan 03, 2022 3:35 pm
by tomfid
That's correct - anything in the initial value field of a stock has no effect on the dynamics.
So
y = INITIAL(x)
and
y = INTEG(0,x)
are equivalent.