[Ipopt] variable and objective function scaling
Arjan van Mulukom
arjan.van.mulukom at btbjansky.nl
Tue Oct 3 04:27:03 EDT 2017
Filip,
Thanks for sharing. Have you also experienced a dependency between the ‘tol’ parameter and the objective function scaling factor?
For example, when I decreased my objective function scaling factor from 1E6 to 1E3, I needed to decrease ‘tol’ from 1E-8 to 1E-5 to get the same convergence. Note the same decrease factor for both. Interestingly enough I was able to bring my objective function scaling factor back to 1, with the ‘tol’ value at 1E-2.
This is from the documentation for the ’tol’ parameter, note the words ‘relative’ and ‘scaled’:
Desired convergence tolerance (relative).
Determines the convergence tolerance for the algorithm. The algorithm terminates successfully, if the (scaled) NLP error becomes smaller than this value
I guess the (scaled) NLP error is influenced by the objective function scaling factor.
rgds
Arjan
> On 03 Oct 2017, at 09:30, Filip Jorissen <filip.jorissen at kuleuven.be> wrote:
>
> I experienced similar scaling issues, although I do not get the same absolute magnitudes that work. Also, my objective needs to be smaller than the constraints. It’s hard to generalise but I have the impression that ‘larger’ models required a lower absolute value of the objective.
>
> Filip
>
> From: Ipopt <ipopt-bounces at coin-or.org <mailto:ipopt-bounces at coin-or.org>> on behalf of Arjan van Mulukom <arjan.van.mulukom at btbjansky.nl <mailto:arjan.van.mulukom at btbjansky.nl>>
> Date: Monday, 2 October 2017 at 13:19
> To: "ipopt at list.coin-or.org <mailto:ipopt at list.coin-or.org>" <ipopt at list.coin-or.org <mailto:ipopt at list.coin-or.org>>
> Subject: [Ipopt] variable and objective function scaling
>
> Hi all,
>
> I have a question about the scaling of variables and the objective function that has been puzzling me for a while now.
>
> I have a problem of a few hundred variables, which values are quite a bit apart in order of magnitude (10e6 to 10e-4).
>
> I scale these x values in the problem, so they are all in the same order of magnitude. I am not using the x scaling feature of IpOpt (nlp_scaling_method = none).
>
> I also set a scaling factor for the objective function, which I set as an option to IpOpt. (obj_scaling_factor).
>
> To be more precise: each variable is divided by itself (that makes it 1) and then multiplied, in my case, by 1000. That makes all scaled x values 1000. Let me call the x scaling Sc_i, i is the index of the variable.
>
> Here is how I implemented the variable scaling in the problem. In my objective-, objective gradient-, Jacobian- and constraint evaluations I unscale x by Sc_i before any calculations. Once calculated, the Jacobian and objective function gradient entries are then scaled again by Sc_i.
>
> It works and it works pretty well. But…. the only way to get good convergence on my problem is when I set variable scaling such that all variables are in the order of magnitude of 1000, and the objective function scaling to 1E6. Deviations from that combination means difficult or no convergence (restoration failed).
>
> I don’t understand fully why I need such large numbers and why they are so specific.
>
> Sc_i obviously scales the objective function gradients and the Jacobian. With 1000 as order of magnitude for the x values, my objective function gradients come out in the range of 0-10. I read in an earlier post that this is a good range. So that could the reason why I need to scale my x values to 1000.
>
> But then I am stumped to why the objective function scaling must be so large. Would it not even further reduce the objective function gradients? IpOpt must be looking at very small objective gradients here. What is the need for objective function scaling if not for bringing the gradients into a decent range?
>
> I think I am overlooking something here, but no clue what. I’d be grateful for some guidance on the matter.
>
> cheers
>
> Sander
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20171003/882f3279/attachment.html>
More information about the Ipopt
mailing list