[Ipopt] Small numbers in constraint

Anthony D. Kelman kelman at berkeley.edu
Wed Jun 7 05:37:49 EDT 2017


Where does the division occur? If it's in an equality constraint,
reformulating the constraint by multiplying both sides by the denominator
is usually better behaved numerically. Otherwise you can try rescaling, or
bounding the denominator variables strictly away from 0.

On Jun 7, 2017 2:29 AM, "Thomas Braam" <thomas.braam at gmail.com> wrote:

> Hello everyone,
>
> We are doing some modelling of plant metabolism. For this we use Flux
> Balance Analysis which represents metabolic networks as a series of linear
> differential equations. However, recently we have introduced an
> additional equation into the model that describes the exchange of gases
> (CO2 and water vapour) between the plant and the atmosphere. This creates a
> non-linearity and we have to use a more complex optimisation approach. We
> are following the methods described in: https://doi.org/10.1371/jo
> urnal.pone.0151722 which uses IPOPT with the HSL-MA97 solver, implemented
> in Python (PyIpopt).
>
> Our problem is that when we try to implement the scripts with our
> gas-exchange equation included, we get a generic numpy error of the type
> caused by attempting to divide by 0. The gas-exchange equation (below) does
> contain some small numbers, so our first thought is that maybe the error is
> caused by IPOPT or PyIpopt rounding down.
>
> Could you confirm if this is something that is not supported by IPOPT (or
> something I should generally avoid) or if this is error is possibly
> introduced by PyIpopt? Or do you have any ideas for changing the equation
> into something I can work with (I am not a mathematician).
>
> Link to equation: https://drive.google.com/file/d/
> 0ByNhotKkxQHMMEZqTkFrT21xUlBYMElvOVllWGxPcEphb1VV/view?usp=sharing
> The variables CwvIn, CwOut, RH & Temp are static (they have equality
> bounds), JCO2 has bounds 0 to 1000. The values for the equality bounds that
> we use cause the result of the equation to be between 2*JCO2 and 4*JCO2 (if
> that makes sense) so the result of the equation is that small.
>
> Many thanks,
>
> Thomas Braam
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> https://list.coin-or.org/mailman/listinfo/ipopt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20170607/e05cc7c6/attachment.html>


More information about the Ipopt mailing list