Equation Problems?

Use this forum to post Vensim related questions.
Post Reply
Daniel
Junior Member
Posts: 2
Joined: Tue Dec 02, 2008 2:03 pm

Equation Problems?

Post by Daniel »

Dear Guys.

I have problems to run my simulation using Vensim.
I think all equations are correct but the result is not what I expected.
This is a simple one that I structured as a proof of concept for my research.
The variables ("Prairie Power Plant" and "Company B") should have "1" for their vulnerabilities, however, the result shows "0.21619" instead of "1.":(
You can look at this attached file.
Please let me know what I did wrong.
Thanks a lot

Daniel:(:(
Attachments
DSS_proof of concept.mdl
(9.27 KiB) Downloaded 291 times
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

I would start by fixing the unit errors. I don't trust the results from any models unless they are dimensionally correct.

And it makes it very difficult to debug models where there are so many nested "if then else" statements. I would calculate the rate outside of the level, and also break up all of the nested statements.

Hope this helps.

Tony.
Daniel
Junior Member
Posts: 2
Joined: Tue Dec 02, 2008 2:03 pm

Post by Daniel »

Thanks a lot.
I'll look at the unit errors.
By the way, I used "Level of Vulnerability" for all stock variables and other stock variables, such as Levee A, Levee B, and Community A, seemed to be okay because they result correctly.
I don't know how I handle the units. Is it too long?
LAUJJL
Senior Member
Posts: 1477
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

equations problems

Post by LAUJJL »

Hi

It is not because there is no problem using the same unit for your levels that it is necessary right. Using the same unit must make sense, independantly of the way the model runs or the equations are written.
The corollary is that units must be built and checked independantly of the equations and preferably at the qualitative diagram level or causal loop diagram and should help equations writing the software unit checking being only an after test.
The order being causal loop diagramming plus units building for every variable or constant of the diagram and only afterwards equation building.
Regards.
JJ
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Originally posted by Daniel
Thanks a lot.
I'll look at the unit errors.
By the way, I used "Level of Vulnerability" for all stock variables and other stock variables, such as Levee A, Levee B, and Community A, seemed to be okay because they result correctly.
I don't know how I handle the units. Is it too long?
If you start by working out the rate outside of the level equation, you will see that the level is being calculated correctly.

IF THEN ELSE(creek water flood stage=1, 1, IF THEN ELSE(vulnerability from lb to ppp=1, 1, IF THEN ELSE(FUNCTIONAL DEFECTS OF PPP=1, 1, IF THEN ELSE(DETERIORATION OF PPP=1, 1, (PRECIPITATION/3+creek water flood stage+FUNCTIONAL DEFECTS OF PPP+DETERIORATION OF PPP+vulnerability from lb to ppp
)/5))))

Does calculate correctly to 1 at t=1, but you will not see the effect in the level until t=2. And if you run until t=2, you will have a value of 1.21619, as you are not draining the level.

You might also want to have a look at
http://www.public.asu.edu/~kirkwood/sysdyn/VenPLE.pdf
If you build the "Savings", "Interest" and "interest rate" model on page 23 and look at the resulting numbers, that should demonstrate why you are not seeing what you expect to see in this model.

Tony.
Post Reply