Ipopt warm start in Pyomo

706 views
Skip to first unread message

acastillo

unread,
Jul 2, 2015, 3:39:21 PM7/2/15
to pyomo...@googlegroups.com
How do I initialize Ipopt?  The "warm_start_init_point" requires both primal and dual variable values. However, its not clear to me how to initialize this with a *.dat file (especially, it isn't clear how to initialize the dual variables). Is there any supplemental instructions online on how to do this?

Also, is it possible to initialize only the primal variables (or a subset of the primal variables) instead of initializing the entire solution?  (This may be more of an Ipopt related question). I am currently passing in data which I then use to initialize variables, but it seems to not have any effect on the objective value in the first iteration. Does this make sense, or have you experienced and/or expect different behavior? I'm comparing an initialization near a local optimal to an uninitialized simulation.


Thanks! Anya


Initialized:

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls

   0  2.3829976e+01 5.20e+00 1.00e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0

   1  2.6050363e+01 5.15e+00 5.75e+00  -1.0 4.20e+00    -  6.29e-02 9.80e-03f  1

   2  2.6090132e+01 5.15e+00 6.24e+01  -1.0 1.24e+01    -  8.92e-04 1.05e-04h  1

   3  2.6214926e+01 5.15e+00 5.60e+01  -1.0 2.54e+02    -  4.54e-05 5.55e-05h  1

   4  2.7215165e+01 5.15e+00 6.89e+01  -1.0 3.65e+02    -  7.43e-05 3.74e-04f  1

   5  3.0889479e+01 5.14e+00 7.99e+01  -1.0 3.65e+02    -  4.24e-04 1.32e-03f  1

   6  3.0999561e+01 5.14e+00 1.20e+02  -1.0 3.64e+02    -  3.57e-04 3.89e-05h  1

   7  3.3149161e+01 5.13e+00 1.13e+02  -1.0 3.64e+02    -  1.14e-04 7.33e-04f  1

   8  3.3328998e+01 5.13e+00 1.13e+02  -1.0 3.64e+02    -  2.78e-04 5.89e-05h  1

   9  3.5313867e+01 5.13e+00 1.13e+02  -1.0 3.64e+02    -  2.12e-04 6.28e-04f  1

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls

  10  3.8676596e+01 5.13e+00 1.13e+02  -1.0 3.64e+02    -  8.49e-04 1.05e-03h  1

  11  3.8890561e+01 5.13e+00 1.20e+02  -1.0 3.63e+02    -  3.30e-04 5.48e-05h  1

  12  4.2660003e+01 5.12e+00 1.13e+02  -1.0 3.63e+02    -  1.38e-04 7.64e-04f  1

  13  5.6484622e+01 5.11e+00 1.13e+02  -1.0 3.63e+02    -  9.22e-04 2.74e-03f  1

  14  6.6947747e+01 5.10e+00 1.13e+02  -1.0 3.62e+02    -  3.80e-03 2.08e-03f  1

  15  6.7737501e+01 5.10e+00 1.13e+02  -1.0 3.61e+02    -  4.57e-04 1.56e-04h  1

  16  7.8705386e+01 5.08e+00 1.12e+02  -1.0 3.61e+02    -  4.64e-04 2.16e-03f  1




Uninitialized:
iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls

   0  2.3829976e+01 1.54e+03 1.14e+00  -1.0 0.00e+00    -  0.00e+00 0.00e+00   0

   1  2.6049118e+01 1.53e+03 1.13e+00  -1.0 9.92e+02    -  9.98e-03 9.80e-03f  1

   2  2.6074174e+01 1.53e+03 6.15e+01  -1.0 9.90e+02    -  3.05e-03 1.01e-04h  1

   3  2.6141333e+01 1.53e+03 6.31e+01  -1.0 9.90e+02    -  4.73e-05 4.57e-05h  1

   4  2.6901016e+01 1.53e+03 9.82e+01  -1.0 9.90e+02    -  6.27e-05 4.09e-04f  1

   5  2.9392910e+01 1.53e+03 1.13e+02  -1.0 9.90e+02    -  4.37e-04 1.29e-03f  1

   6  2.9445175e+01 1.53e+03 1.34e+02  -1.0 9.89e+02    -  4.88e-04 2.66e-05h  1

   7  3.0948141e+01 1.53e+03 1.25e+02  -1.0 9.89e+02    -  1.03e-04 7.27e-04f  1

   8  3.1019845e+01 1.53e+03 1.25e+02  -1.0 9.88e+02    -  3.21e-04 3.36e-05h  1

   9  3.3352254e+01 1.52e+03 1.25e+02  -1.0 9.88e+02    -  1.70e-04 1.05e-03f  1

iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls

  10  3.4861027e+01 1.52e+03 1.25e+02  -1.0 9.87e+02    -  1.20e-03 6.74e-04f  1

  11  3.4974994e+01 1.52e+03 1.25e+02  -1.0 9.86e+02    -  3.26e-04 4.57e-05h  1

  12  3.6993431e+01 1.52e+03 1.25e+02  -1.0 9.86e+02    -  1.55e-04 7.07e-04f  1

  13  5.0832116e+01 1.51e+03 1.24e+02  -1.0 9.85e+02    -  8.75e-04 4.81e-03f  1

  14  5.1026924e+01 1.51e+03 1.24e+02  -1.0 9.81e+02    -  1.58e-03 6.78e-05h  1

  15  5.7404111e+01 1.51e+03 1.24e+02  -1.0 9.81e+02    -  3.00e-04 2.18e-03f  1

  16  5.7634630e+01 1.51e+03 1.24e+02  -1.0 9.78e+02    -  8.32e-04 7.87e-05h  1


Gabriel Hackebeil

unread,
Jul 2, 2015, 4:48:06 PM7/2/15
to pyomo...@googlegroups.com
Dual variable require you add a Suffix object named “dual” to the model and update that with values. E.g.,

model.dual = Suffix(direction=Suffix.EXPORT) # send to solver but don’t collect from solver

or

model.dual = Suffix(direction=Suffix.IMPORT_EXPORT) # do both

The "warm_start_init_point" requires both primal and dual variable values. However, its not clear to me how to initialize this with a *.dat file (especially, it isn't clear how to initialize the dual variables).

There is currently no way to initialize suffix information from a .dat file.

Is there any supplemental instructions online on how to do this?

There is an example showing how to warmstart Ipopt in examples/suffixes/ipopt_warmstart.py. (assuming examples were distributed with your installation). It shows the various command-line options that are required as well as the various suffixes you need to add to the model beyond just dual (e.g., you need to pass in variable bound dual multipliers using different suffixes). In that example, these values are collected from a previous solve.

Also, is it possible to initialize only the primal variables (or a subset of the primal variables) instead of initializing the entire solution?  (This may be more of an Ipopt related question).

If you don’t explicitly initialize all variables on the model, the solver will choose a value for you. What value it chooses is solver dependent, but Ipopt and most others pick zero.

Gabe

On Jul 2, 2015, at 3:39 PM, acastillo <anya.c...@gmail.com> wrote:

How do I initialize Ipopt?  It appears that my initialization is being ignored on the initial iteration.

The "warm_start_init_point" requires both primal and dual variable values. However, its not clear to me how to initialize this with a *.dat file (especially, it isn't clear how to initialize the dual variables).

Is there any supplemental instructions online on how to do this?

Also, is it possible to initialize only the primal variables (or a subset of the primal variables) instead of initializing the entire solution?  (This may be more of an Ipopt related question).

Thanks! Anya

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gabriel Hackebeil

unread,
Jul 2, 2015, 4:49:14 PM7/2/15
to pyomo...@googlegroups.com
If you don’t explicitly initialize all variables on the model, the solver will choose a value for you. What value it chooses is solver dependent, but Ipopt and most others pick zero.

And I believe it sets those dual variables that are not specified to 1.
Reply all
Reply to author
Forward
0 new messages