Newbie, trouble creating a simple model ...

Use this forum to post Vensim related questions.
Post Reply
tomgoodell
Junior Member
Posts: 3
Joined: Sat Nov 15, 2014 5:17 pm
Vensim version: PLE+

Newbie, trouble creating a simple model ...

Post by tomgoodell »

Hi, I've read about modeling quite a lot over the years, but am new to actually doing it, and of course am learning it's not as simple as it seems when you just read about it. I's using Vensim PLE Plus.

I've been through several of the tutorials and read a lot of the documentation, but haven't been able to see why my model behaves the way it does. I started with trying to build a simple model of getting hungry and eating, from scratch: two stocks (available calories and hunger). I've attached the model.

I can't figure out why hunger never goes to 0, but instead reaches a steady state of 1542.3 calories. Since it is calculated as "desired internal calorie level" (a constant of 2000) minus "available calories" (a stock that increases exponentially), this doesn't make sense to me. I use an IF THEN ELSE statement to set it to 0 if the calculation goes below 0, otherwise it is set to the value of the calculation. I'm sure I'm misunderstanding something obvious about how Vensim works, but I can't figure it out. If anyone could provide some guidance it would be much appreciated.
Attachments
Hunger 2.mdl
(3.24 KiB) Downloaded 474 times
bppro
Junior Member
Posts: 14
Joined: Wed Nov 06, 2013 2:06 pm
Vensim version: DSS

Re: Newbie, trouble creating a simple model ...

Post by bppro »

Hi,

There are some issues with your model.

a) Variable types

« Hunger » should be an auxiliary variable, not a stock. Stocks can only change through their flows. Stocks may only affect auxiliary or flow variables.

b) Variable names

« Food eaten » could be named « eating », and « metabolism » could be named « calorie burning ». Better yet, you could use « energy intake » and « energy expenditure » as they have been used in previous research. See Abdel-Hamid (2002). Modeling the Dynamics of Human Energy Regulation and its Implications for Obesity Treatment. System Dynamics Review, 18(4), 431-471.

c) Units

Your units do not match. For instance, « food eaten » in your model depends on « hunger » which have units of calories. Where does the quarter hour come from? Units would check if you added a time constant to the flow. You should always check for units to ensure model consistency.

d) Use of « IF THEN ELSE » function

It is considered best to avoid IF THEN ELSE formulations whenever possible. See Sterman (2000). Business Dynamics : Modeling for a Complex World. Irwin/McGraw-Hill, p. 547. It introduces sharp discontinuities in models and makes them difficult to understand.

I have formulated a new starting model. I doubt its perfect, but I think its a good start. Happy modeling!

BP
Attachments
metabolism.mdl
(2.47 KiB) Downloaded 472 times
tomgoodell
Junior Member
Posts: 3
Joined: Sat Nov 15, 2014 5:17 pm
Vensim version: PLE+

Re: Newbie, trouble creating a simple model ...

Post by tomgoodell »

Hi BP - thanks so much for your help! Your comments clarified several areas of confusion for me, and the model you sent is super helpful for understanding what you're saying, and for going further with my explorations. I don't think I would have been able to plow through this without your help; I'm grateful.

Best,

Tom
Post Reply