[Ipopt] variable and objective function scaling

Arjan van Mulukom arjan.van.mulukom at btbjansky.nl
Mon Oct 2 07:19:27 EDT 2017


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/20171002/2c49bfe3/attachment.html>


More information about the Ipopt mailing list