Page 1 of 1
Help with Vensim Equations
Posted: Sat Dec 18, 2010 3:12 pm
by Hans Gruber
Im new to using Vensim and Im having trouble with a Model. The graph Im getting for my order rate is completely different to what I should be getting. Here is what I have done:
Order Rate=
Expected Demand+Order
Units: **undefined**
Wholesaler Stock= INTEG (
Order Rate,
100000)
Units: **undefined**
As I said Im new to this so I dont know if I have provided enough. Could someone offer a solution?
Thanks Guys.
Re: Help with Vensim Equations
Posted: Sat Dec 18, 2010 4:36 pm
by Administrator
Start by defining units for everything in the model. It may point out why the graph is not displaying what you are expecting.
And why is the graph wrong? Can you give some more detail?
Re: Help with Vensim Equations
Posted: Sat Dec 18, 2010 11:56 pm
by Hans Gruber
Its wrong because the result show be the same as the attached image. I just dont see where Im going wrong!
Re: Help with Vensim Equations
Posted: Sun Dec 19, 2010 9:15 am
by Administrator
You haven't exactly given us much to work on. Without access to the equations, there is little anyone can advise you on.
Why exactly does the graph look wrong? What happens at time = 10?
Re: Help with Vensim Equations
Posted: Sun Dec 19, 2010 10:38 am
by LAUJJL
post the whole model.
Regards.
JJ
Re: Help with Vensim Equations
Posted: Sun Dec 19, 2010 3:34 pm
by Hans Gruber
My Equations:
(01) AT = A FUNCTION OF( )
Units: **undefined**
(02) Change in Expected Demand = A FUNCTION OF( AT,Fail)
Units: **undefined**
(03) Customer Demand=
20+STEP(30,10)
Units: **undefined**
(04) Discrepancy=
Target Stock-Retailer Stock
Units: **undefined**
(05) Expected Demand = A FUNCTION OF( Change in Expected Demand)
Expected Demand= INTEG (
CED,
20)
Units: **undefined**
(06) Fail = A FUNCTION OF( Customer Demand,Expected Demand)
Units: **undefined**
(07) FINAL TIME = 40
Units: Month
The final time for the simulation.
(08) INITIAL TIME = 0
Units: Month
The initial time for the simulation.
(09) Order=
Discrepancy/SAT
Units: **undefined**
(10) Order Rate=
Expected Demand+Order
Units: **undefined**
(11) Retailer Stock= INTEG (
Order Rate-Shipments,
200)
Units: **undefined**
(12) SAT=
5
Units: **undefined**
(13) SAVEPER =
TIME STEP
Units: Month [0,?]
The frequency with which output is stored.
(14) Shipments=
Retailer Stock/Customer Demand
Units: **undefined**
(15) Target Stock=
200
Units: **undefined**
(16) TIME STEP = 1
Units: Month [0,?]
The time step for the simulation.
(17) Total Sales= INTEG (
Shipments,
0)
Units: **undefined**
(18) Wholesaler Stock= INTEG (
Order Rate,
100000)
Units: **undefined**
This is the entire model:
Re: Help with Vensim Equations
Posted: Sun Dec 19, 2010 4:39 pm
by LAUJJL
Hi Hans
Before asking any help, you should try puting dimension units for every equations of your model.
And to do that you must first understand how to enter units for each equation.
If you do not know how to do that, than you must learn it.
To learn it, just study very simple models in the user guide or the model samples, and try to understand the unit dimensions of the model.
Once you have done that, add units to your model and post it as .mdl file. There is no need to post a sketch or the equations.
Posting only the equations, to run the model it is necessary to build the model again from the list of equations which is tedious.
To my opinion, it would be better for you to build first a model with only one level, one or two rates, and up to four constants and auxiliaries variables.
No more than 7 elements and preferably less and spend a considerable time (several days or even weeks) using the model and THINKING about its results, using all possible Vensim tools available to do that, and only after that IF NECESSARY increase the utility of the model by adding some more elements (preferably less than 4 or 5) etc..
After more than 8 years of SD experience, this is the way I start with every model.
Best regards.
JJ
Re: Help with Vensim Equations
Posted: Mon Dec 20, 2010 4:41 am
by karankhosla
Hi Han, could you please post your vensim model file?
Re: Help with Vensim Equations
Posted: Mon Dec 20, 2010 11:07 pm
by tomfid
I think JJ's advice about units is sound.
For example, you have:
(14) Shipments=
Retailer Stock/Customer Demand
Presumably Retailer Stock has units like 'widgets' and Customer Demand has units like 'widgets/week'. That would give Shipments units of 'week' which doesn't make sense, indicating a problem with this formulation. One can also see by thought experiment that with this equation, increasing Customer Demand makes Shipments smaller, which doesn't make sense.
What variable does the graph attached above represent?
Tom
Re: Help with Vensim Equations
Posted: Tue Dec 21, 2010 11:08 pm
by tomfid
I think you might get a lot out of some of the sample models that install in the Vensim directory. For example:
models\sample\extra\deliv.mdl
models\sample\extra\corpgrth.mdl
models\mguide\5cap\prod3.mdl
In deliv.mdl, for example, the formulation for Shipments is much like what you need here (replacing capacity with demand in your case).
Tom
Re: Help with Vensim Equations
Posted: Wed Dec 22, 2010 4:56 am
by karankhosla
Hans, if you haven't already, you may also want to take a look at Business Dynamics Chapters 17 and 18 which deal with instability and oscillations using the example of a manufacturing supply chain.