My model has residuals of the static equations near to zero
Equation number 73 : -1.5752e-05
Equation number 74 : -1.8448e-05
Equation number 294 : 6.2063e-07
Is there some method for working with these residuals? or some option to set the tolerance?
Yes, see the
tolf option in the reference manual. Did you try to increase the number of iterations?
Thanks a lot dear Stepan-a
I am using a steady state file. Does
tolf work in this case too?
I attach my model
mymodel.zip (193.5 KB)
No, it will not work if you have a steady state file. Instead, I would change the tolerance parameter of the
fsolvecalled on line 224 of
prometheo_steadystate.m (see the Mathworks documentation for fsolve) and maybe the maximum number of iterations. Also you do not test the exit value of
fsolve. So we do not know if the the solver has converged to a solution. It is good practice to test for the exitflag of
fsolve and return from the steady state file with
check equal to 1 (if
exitflag is not positive).
Thanks a lot dear Stéphane