Overflowerror: (34, 'numerical Result Out Of Range') While Solving And Optimizing A System Of Ode's Using Pyomo?
In my attempt to optimize a process modeled by a system of ODE's, whenever I try to add a temperature dependance on parameter, I continue to get errors. How can I fix this code to
Solution 1:
I think you're seeing that error because of your g.KGeq
constraint. If you initialize g.T
to T_int=20
, the exponent in that equation is roughly 1711 which leads to a Python overflow error. You might have a typo with a negative sign.
Another thing I see is that you're dividing by g.T
and g.KG + g.G
in a few of your constraints but you never initialize or bound these variables. The default initialization in IPOPT is to set them all to 0 which will cause evaluation errors.
There is also a mistake in how you're applying the discretization transformation. It should be:
TransformationFactory('dae.finite_difference').apply_to(g, nfe=200, scheme='BACKWARD')
Post a Comment for "Overflowerror: (34, 'numerical Result Out Of Range') While Solving And Optimizing A System Of Ode's Using Pyomo?"