How can I fix this problem ?

Use this forum to post Vensim related questions.
Post Reply
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

How can I fix this problem ?

Post by japrap »

Hi,
I want to balance a complex model but I think there is a problem in my vensim. in fact,Apparently Vensim doesn't consider little differences between the arrival rate and departure rate from a box variable. for a better understanding I attached the sample model. please look at the image below and tell me why the value of the variable 2” doesn’t decrease while its arrival rate is less than its discharge rate ?
Image




Best Regards
Attachments
213.mdl
(4.05 KiB) Downloaded 194 times
Last edited by japrap on Thu Aug 27, 2015 8:03 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: How can I fix this problem ?

Post by Administrator »

I must be missing something here. When I run it, the arrival and discharge rates are almost identical.
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
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

Re: How can I fix this problem ?

Post by japrap »

thanks for your reply

for me it is very important that variable "3" return back to a balanced state. as you can see while both the variable "1" and "2" return back to balanced states , variable "3" never gets balanced and that's why I want to figure out what is the problem.

as you can see the arrival rate of variable "3" = the arrival rate of "1" + the arrival rate of "2" and its departure rate is the sum of departure rates of variables "1" and "2" . so what is the problem in variable "3" and why it never gets balanced ???
Last edited by japrap on Thu Aug 20, 2015 10:17 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: How can I fix this problem ?

Post by Administrator »

I suggest you start by adding units to all your variables and make sure the model passes the unit check. It may be that you have an error, this basic check can often uncover these.
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
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

Re: How can I fix this problem ?

Post by japrap »

Administrator wrote:I suggest you start by adding units to all your variables and make sure the model passes the unit check. It may be that you have an error, this basic check can often uncover these.
you know everything is fine and I checked the complex model three times before. I just made this simple model to tell you about my problem. I just can't understand why vensim doesn't consider the little differences between the arrival and discharge rates of variable "1" and "2" in their own values while it considers the sum of these differences in the value of the variable "3"
Attachments
1.mdl
(4.35 KiB) Downloaded 207 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How can I fix this problem ?

Post by tomfid »

This is a limitation of single-precision number representation. In Vensim DSS double precision, the model comes exactly into equilibrium.
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

Re: How can I fix this problem ?

Post by japrap »

Dear Tom thanks for your reply.
you know I'm just a MS student and I just use the Vensim for academical purposes . so I would be appreciate if you tell me that is there a way to solve this problem in Vensim PLE ??

Best Regards
Last edited by japrap on Thu Aug 27, 2015 8:03 am, edited 1 time in total.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How can I fix this problem ?

Post by tomfid »

I don't think there's a way to make the exact technical problem go away in general; I'd have to know something about the specific problem to suggest a practical solution.
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

Re: How can I fix this problem ?

Post by japrap »

the problem is that while the vensim doesn't consider the differences between the arrival and discharge rates of variables "1" and "2" in their values how can I balance the variable "3" , which its arrival rate = arrival rate of variable "1" + arrival rate of variable "2" and its departure rate = discharge rate of variable "1" + dischrge rate of variable "2", in the attached model. so is there any way that I make the model to come exactly into equilibrium??
Attachments
1.mdl
(4.34 KiB) Downloaded 195 times
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How can I fix this problem ?

Post by tomfid »

The only simple, general answer is to switch to a double precision Vensim version. You would have exactly the same problem if you were working in a programming language using floats instead of doubles.

But why does this matter in practice? It would be very unusual for a real system to be free of disturbances over such a long period relative to its time constants, and in policy models it's rare to know anything to the 3rd decimal, let alone the 5th.
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

Re: How can I fix this problem ?

Post by japrap »

Dear Tom many many thanks for your reply

as I told you before in the complex model it's very important for me that the aggregate variables ,such as "3" in the sample model , come exactly into equilibrium.so can I ask you a favor ? is it possible for you to run my model in a DSS version and just give me back the results (balanced values) of its three aggregate variables ?
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: How can I fix this problem ?

Post by tomfid »

Here's a double precision .vdf:
double1.vdf
(43.62 KiB) Downloaded 212 times
japrap
Member
Posts: 20
Joined: Wed Jan 14, 2015 1:54 pm
Vensim version: PLE

Re: How can I fix this problem ?

Post by japrap »

Dear Tom you've been a great help to me, many many thanks.

sorry man can I ask you a favor again? would you please run the attached models in DSS double precision version and give me back their results so I can figure out what to do in the complex model?


Best Regards
A.m
Attachments
2.mdl
(8.68 KiB) Downloaded 204 times
1.mdl
(8.33 KiB) Downloaded 189 times
Post Reply