Forcing Multiple Recalc using Scripting

3.67K viewsScripting


I have a model that has very long circular formulas that need to be recalculated multiple times before the values become stable. It seems like a script that runs recalc multiple times would be useful. I am tired of hitting recalc and coming back 2 hrs later and hitting F9, and repeat several times!

I saw one of the posts was using “model.ensureCalculated()” to recalculate the model when it is in uncalculated state. But, this doesn’t seem to work in my case because after the first recalc, the model is in the recalculated mode even though the values being calculated by circular formulas have not stabilized yet.

Is there another action that would force a recalc even though the model is already in the calculated mode? Thanks.



Hi Ben:

Thanks for the info. But, I am not sure if Quantrix is actually doing the iterations. I checked the setting and it is set to 10,000 and the “value change is less than:” is set to 1.0E-04.

It is currently taking about 2 hours for a single recalc. And, it takes about 9 recalc’s to get the values to converge.

Any thoughts on what is going on? Thanks.

Best regards,


You are viewing 1 out of 4 answers, click here to view all answers.