Page 1 of 1

Active vs. Initial Problem/Bug?

Posted: Thu Dec 26, 2024 9:03 pm
by hazhir
Hi,
In simulating the attached model I get weird behaviors, where some 'Initial' variables are simulated incorrectly (and I get warnings for Active/Initial difference). Specifically, check out:
1- 'Sum Initial Buildings' vs. 'Desired Current Buildings' at time zero. The two should be the same but they are not.
2- 'Utility of Alternative Locations' vs. 'Average Realized Utility'. Again, the two should be the same but they are not.
I don't know what is happening, it has been a pain, and it is the first time I am seeing this type of inconsistency. Any insights on what may be going on and how to fix it?

Thanks a lot!
Hazhir

Re: Active vs. Initial Problem/Bug?

Posted: Fri Dec 27, 2024 6:34 am
by Administrator
I'm not back in the office until the new year. Here is some additional debug information in case it helps.

DEBUG:ERROR: Math error (underflow) computing : #Perceived Weighted Product Price>DELAY1I>LV1#[BService].
DEBUG:ERROR: Check causes and uses of #Perceived Weighted Product Price>DELAY1I>LV1#[BService] for division by zero or overflow.

There is an "underflow" error (https://stackoverflow.com/questions/422 ... flow-occur) when calculating "Perceived Weighted Product Price". I'd suggest replicating the DELAY1I macro manually to see if one of the calculations is too small. Once the active/initial problems have been eradicated, I'm sure all will be ok.

Re: Active vs. Initial Problem/Bug?

Posted: Fri Dec 27, 2024 4:54 pm
by aliakhavan89
I think the initial value for 'Impact of Affordability on Housing Demand' is causing an issue. I used the values at time=0 as initial, and 'Sum Initial Buildings' and 'Desired Current Buildings' match at the beginning of the simulation, though there's a change in model behavior.
Screenshot 2024-12-27 at 11.53.42 AM.png
Screenshot 2024-12-27 at 11.53.42 AM.png (541.82 KiB) Viewed 4013 times

Re: Active vs. Initial Problem/Bug?

Posted: Fri Dec 27, 2024 10:24 pm
by hazhir
Thanks so much Alireza; that initial value was not needed and removing it indeed solved the problem!