Help with Vensim Equations

Use this forum to post Vensim related questions.
Post Reply
Hans Gruber
Junior Member
Posts: 3
Joined: Fri Dec 17, 2010 10:16 pm

Help with Vensim Equations

Post 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.
Attachments
ven.JPG
ven.JPG (16.19 KiB) Viewed 7753 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with Vensim Equations

Post 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?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Hans Gruber
Junior Member
Posts: 3
Joined: Fri Dec 17, 2010 10:16 pm

Re: Help with Vensim Equations

Post by Hans Gruber »

Its wrong because the result show be the same as the attached image. I just dont see where Im going wrong!
Attachments
graph.JPG
graph.JPG (20.23 KiB) Viewed 7741 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Help with Vensim Equations

Post 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?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Help with Vensim Equations

Post by LAUJJL »

post the whole model.
Regards.
JJ
Hans Gruber
Junior Member
Posts: 3
Joined: Fri Dec 17, 2010 10:16 pm

Re: Help with Vensim Equations

Post 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:
Attachments
Ven1.JPG
Ven1.JPG (41.39 KiB) Viewed 7731 times
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Help with Vensim Equations

Post 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
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Re: Help with Vensim Equations

Post by karankhosla »

Hi Han, could you please post your vensim model file?
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Help with Vensim Equations

Post 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
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Help with Vensim Equations

Post 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
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Re: Help with Vensim Equations

Post 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.
Post Reply