Floating Point Error

Use this forum to post Vensim related questions.
Post Reply
TheJusticeAvenger
Newbie
Posts: 1
Joined: Sat Mar 23, 2024 1:38 pm
Vensim version: PLE

Floating Point Error

Post by TheJusticeAvenger »

Hi,
I'm using Vensim for a University course and am currently facing some urgent issues.
In the model below, I'm facing a floating point error whenever I try to run SyntheSim, with the error seemingly being the Death Rate. However, when I attempt to diagnose the error, the equations and units seem to be accurate.
Any help would be greatly appreciated!
Attachments
Coal Model 1.2.mdl
(8.2 KiB) Downloaded 20 times
LAUJJL
Senior Member
Posts: 1427
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Re: Floating Point Error

Post by LAUJJL »

Hi
Checking the units and equation does not prove that your model is correct.
The floating-point error comes from the environmental pollution index strange values, getting beyond the values that Vensim can handle.
There must be some wrong equations formulations in your model.
To understand them, put the final time to say 0.5, less than 1.125, and run the synthesim. It will then work.
Then study the behavior of your model, step by step, starting at time 0, and verify the results and see if they make sense. probably not.
You can too, launch a simple simulation, setting too the final time to 0.5 or something less than 1.125.
By the way, you can too, set the units testing to strict testing and you will seem some additional unit errors appearing.
Regards.
JJ
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Floating Point Error

Post by Administrator »

You do have units errors in your model.

Start with "base burning rate". That should not be measured in 1/year, I'm pretty certain it will be tonnes/year. Same for "base discovery rate". Correct the units for these, and you'll see where the error is.
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
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Floating Point Error

Post by Administrator »

To give you a little more help, try this

burning of coal = min ( available coal resources / time step , base burning rate )

This equation burns the "base burning rate" until all the "available coal resources" are used up. This equation takes "base burning rate" from the stock, or everything in the stock ( available coal resources / time step ) which will prevent it going negative.
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
Post Reply