Dear all, my questions are about using IPOPT for optimization of large-scale systems.
1. Which MATLAB version do you have such that IPOPT works? (on their website it is said that there are some problems with R2014a of Matlab - i was wondering if it is still the case...) 2. Does IPOPT handle large-scale systems better than PDIPM or MIPS? I would appreciate any help regarding this issue! Kind regards, Irina Boiarchuk On 16 February 2015 at 22:49, Ray Zimmerman <[email protected]> wrote: > Absolutely. > > Ray > > On Feb 16, 2015, at 12:11 PM, Bouchekara Houssem < > [email protected]> wrote: > > Iam not using runopf but I have implemented my one OPF using MATPOWER > functions. > Another question, I guess that providing the Jacobian structure, Hessian > and Hessian structure will speed up the convergence? > > > On 2/16/2015 3:21 PM, Ray Zimmerman wrote: > > Again, it is not clear to me whether you are simply using MATPOWER’s OPF > (i.e. runopf) or implementing your own. It would seem you’re implementing > your own since the IPOPT output indicates that the Jacobian structure, > Hessian and Hessian structure are not supplied. With MATPOWER’s OPF > implementation that should not be the case. Here’s what I get … > > >> mpopt = mpoption('out.all', 0, 'verbose', 2, 'opf.ac.solver', 'IPOPT'); > >> runopf('case30', mpopt) > > MATPOWER Version 5.1-dev, 06-Feb-2015 -- AC Optimal Power Flow > This is Ipopt version 3.10.3, running with linear solver mumps. > > Number of nonzeros in equality constraint Jacobian...: 454 > Number of nonzeros in inequality constraint Jacobian.: 324 > Number of nonzeros in Lagrangian Hessian.............: 254 > > Total number of variables............................: 71 > variables with only lower bounds: 0 > variables with lower and upper bounds: 42 > variables with only upper bounds: 0 > Total number of equality constraints.................: 60 > Total number of inequality constraints...............: 82 > inequality constraints with only lower bounds: 0 > inequality constraints with lower and upper bounds: 0 > inequality constraints with only upper bounds: 82 > > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 0 4.9036963e+02 1.21e+00 1.06e+01 0.0 0.00e+00 - 0.00e+00 > 0.00e+00 0 > 1 5.2670003e+02 4.79e-01 1.87e+02 0.1 1.28e+00 - 3.77e-01 > 5.58e-01h 1 > 2 5.7233174e+02 1.44e-02 8.54e+01 -0.4 6.07e-01 - 1.00e+00 > 1.00e+00h 1 > 3 5.7307970e+02 1.39e-02 5.98e+01 -1.0 9.22e-02 - 9.99e-01 > 2.91e-01h 1 > 4 5.7635279e+02 5.84e-03 1.90e+02 -1.3 1.49e-01 - 1.00e+00 > 1.00e+00h 1 > 5 5.7698733e+02 9.81e-04 6.93e+00 -2.0 6.20e-02 - 1.00e+00 > 1.00e+00h 1 > 6 5.7693657e+02 7.09e-05 5.84e+00 -2.9 1.30e-02 - 1.00e+00 > 1.00e+00h 1 > 7 5.7689674e+02 1.42e-05 6.89e-01 -3.8 7.65e-03 - 1.00e+00 > 1.00e+00h 1 > 8 5.7689223e+02 9.17e-06 5.46e-02 -5.3 6.06e-03 - 1.00e+00 > 1.00e+00h 1 > 9 5.7689227e+02 1.58e-06 1.08e-02 -6.8 2.65e-03 - 1.00e+00 > 1.00e+00h 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 10 5.7689232e+02 2.06e-07 1.63e-03 -8.3 9.69e-04 - 1.00e+00 > 1.00e+00h 1 > 11 5.7689233e+02 1.32e-08 1.19e-04 -9.3 2.47e-04 - 1.00e+00 > 1.00e+00h 1 > 12 5.7689233e+02 1.13e-10 1.08e-06 -11.0 2.29e-05 - 1.00e+00 > 1.00e+00h 1 > 13 5.7689233e+02 1.36e-14 9.86e-11 -11.0 2.15e-07 - 1.00e+00 > 1.00e+00h 1 > > Number of Iterations....: 13 > > (scaled) (unscaled) > Objective...............: 1.3985268672263120e+02 > 5.7689233273085370e+02 > Dual infeasibility......: 9.8586584428882276e-11 > 4.0666966076913940e-10 > Constraint violation....: 1.3558539391522494e-14 > 1.3558539391522494e-14 > Complementarity.........: 1.0529404232602505e-11 > 4.3433792459485328e-11 > Overall NLP error.......: 9.8586584428882276e-11 > 4.0666966076913940e-10 > > > Number of objective function evaluations = 14 > Number of objective gradient evaluations = 14 > Number of equality constraint evaluations = 14 > Number of inequality constraint evaluations = 14 > Number of equality constraint Jacobian evaluations = 14 > Number of inequality constraint Jacobian evaluations = 14 > Number of Lagrangian Hessian evaluations = 13 > Total CPU secs in IPOPT (w/o function evaluations) = 0.035 > Total CPU secs in NLP function evaluations = 0.046 > > EXIT: Optimal Solution Found. > >> > > > Regarding the issue of the objective function decreasing with each > iteration, that is not necessarily to be expected with primal-dual interior > point solvers such as the one used by IPOPT. The objective function may > need to increase in order to improve feasibility. > > Ray > > > > > On Feb 14, 2015, at 2:33 PM, Bouchekara Houssem < > [email protected]> wrote: > > Dear all > I am trying to solve the OPF using the IPOPT solver (application on the > IEEE 30 bus test system). > However, I have some issues. > > The first one is that this solver takes many iterations and at the end, I > receive the message "Maximum Number of Iterations Exceeded.". if I increase > the number of iterations I obtain the same message on the time of > simulation !!! > > The second issue or question is that the objective function keep changing > but not always decreasing as you can see in the herewith results. I have > run the same problem using the fmincon function the objective function does > not increase at all it decreases all the time until convergence !!! > > Regards > > Results > > %------------------------------------------------------------------------------------------------------------------- > ------------------------------------------------------ > Nonlinear Program (NLP) Optimization > min f(x) > s.t. lb <= x <= ub > cl <= c(x) <= cu > ------------------------------------------------------ > Problem Properties: > # Decision Variables: 24 > # Constraints: 233 > # Bounds: 48 > # Nonlinear Inequality: 185 > ------------------------------------------------------ > Solver Parameters: > Solver: IPOPT > Objective Gradient: @(x)mklJac(prob.fun,x,1) [numdiff] > Constraint Jacobian: @(x)mklJac(prob.nlcon,x,nnl) [numdiff] > Jacobian Structure: Not Supplied > Lagrangian Hessian: Not Supplied > Hessian Structure: Not Supplied > ------------------------------------------------------ > > > ****************************************************************************** > This program contains Ipopt, a library for large-scale nonlinear > optimization. > Ipopt is released as open source code under the Eclipse Public License > (EPL). > For more information visit http://projects.coin-or.org/Ipopt > > ****************************************************************************** > > This is Ipopt version 3.11.7, running with linear solver ma57. > > Number of nonzeros in equality constraint Jacobian...: 0 > Number of nonzeros in inequality constraint Jacobian.: 2712 > Number of nonzeros in Lagrangian Hessian.............: 0 > > Total number of variables............................: 24 > variables with only lower bounds: 0 > variables with lower and upper bounds: 24 > variables with only upper bounds: 0 > Total number of equality constraints.................: 0 > Total number of inequality constraints...............: 113 > inequality constraints with only lower bounds: 0 > inequality constraints with lower and upper bounds: 72 > inequality constraints with only upper bounds: 41 > > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 0 8.2505796e+002 3.92e+001 2.39e+000 0.0 0.00e+000 - 0.00e+000 > 0.00e+000 0 > 1 8.2333913e+002 3.43e+001 2.88e+001 0.0 3.26e+000 - 4.40e-001 > 7.91e-002f 2 > 2 8.1521317e+002 0.00e+000 6.48e+001 -0.4 5.64e+000 - 8.84e-001 > 1.00e+000f 1 > 3 8.0493896e+002 0.00e+000 6.52e+001 0.0 3.96e+001 - 8.87e-001 > 4.80e-001f 2 > 4 8.0277302e+002 0.00e+000 2.39e+001 -0.1 3.95e+000 - 9.88e-001 > 1.00e+000h 1 > 5 8.0079336e+002 0.00e+000 3.27e+001 -0.8 5.65e+000 - 9.86e-001 > 1.00e+000f 1 > 6 7.9975232e+002 0.00e+000 1.50e+001 -1.3 1.64e+000 - 9.99e-001 > 7.80e-001f 1 > 7 7.9977509e+002 0.00e+000 1.70e+001 -1.1 1.52e+000 - 1.00e+000 > 1.00e+000h 1 > 8 7.9947341e+002 0.00e+000 2.73e+000 -1.7 7.49e-001 - 9.98e-001 > 1.00e+000h 1 > 9 7.9933411e+002 0.00e+000 1.06e+001 -2.2 2.68e+000 - 9.99e-001 > 1.00e+000h 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 10 7.9931298e+002 0.00e+000 1.50e+001 -1.9 4.96e+000 - 1.00e+000 > 1.00e+000H 1 > 11 7.9945021e+002 0.00e+000 2.00e+001 -1.6 9.10e+000 - 1.00e+000 > 4.53e-001f 2 > 12 7.9940918e+002 0.00e+000 5.80e+000 -1.7 2.61e+000 - 7.69e-001 > 1.00e+000h 1 > 13 7.9935727e+002 0.00e+000 9.48e+000 -1.7 5.58e+000 - 8.33e-001 > 2.62e-001h 2 > 14 7.9970882e+002 0.00e+000 1.04e+001 -1.7 4.50e+000 - 1.00e+000 > 1.00e+000H 1 > 15 7.9936389e+002 0.00e+000 1.04e+001 -1.7 3.89e+000 - 1.00e+000 > 1.00e+000H 1 > 16 7.9932908e+002 0.00e+000 2.52e+000 -1.7 1.06e+001 - 5.30e-001 > 8.14e-002h 3 > 17 7.9940245e+002 0.00e+000 9.01e+000 -1.7 9.80e-001 - 1.00e+000 > 1.00e+000h 1 > 18 8.0110400e+002 0.00e+000 2.25e+001 -1.7 1.04e+001 - 5.27e-001 > 1.00e+000H 1 > 19 7.9946399e+002 0.00e+000 4.25e+000 -1.7 1.20e+001 - 1.00e+000 > 1.00e+000F 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 20 7.9948550e+002 0.00e+000 1.00e+001 -1.3 1.24e+001 - 1.00e+000 > 2.28e-001f 2 > 21 7.9975197e+002 0.00e+000 1.65e+001 -1.5 3.80e+000 - 7.44e-001 > 1.00e+000h 1 > 22 8.0029390e+002 0.00e+000 4.95e+001 -1.5 4.78e+000 - 1.00e+000 > 7.66e-001H 1 > 23 7.9969885e+002 0.00e+000 3.75e+001 -1.5 7.79e+000 - 4.43e-001 > 7.55e-001F 1 > 24 8.0153952e+002 0.00e+000 5.42e+001 -1.5 6.09e+000 - 3.71e-001 > 1.00e+000H 1 > 25 8.0083849e+002 0.00e+000 5.53e+001 -1.5 9.48e+000 - 3.14e-001 > 1.60e-001f 3 > 26 8.0055898e+002 0.00e+000 5.68e+001 -1.5 7.24e+001 - 1.35e-001 > 2.09e-002f 3 > 27 7.9993130e+002 0.00e+000 2.14e+001 -1.5 1.56e+001 - 1.22e-001 > 1.16e-001f 2 > 28 7.9966609e+002 0.00e+000 2.34e+001 -1.5 1.13e+001 - 1.91e-001 > 2.55e-001h 1 > 29 7.9951187e+002 0.00e+000 4.68e+000 -1.5 1.61e+001 - 7.25e-002 > 2.62e-001f 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 30 8.0267261e+002 0.00e+000 2.31e+001 -1.5 9.14e+000 - 6.12e-001 > 9.49e-001H 1 > 31 8.0226367e+002 0.00e+000 1.04e+001 -1.5 1.01e+001 - 3.30e-001 > 8.99e-002f 3 > 32 8.0192666e+002 0.00e+000 1.32e+001 -1.5 2.47e+001 - 8.06e-002 > 2.93e-002f 4 > 33 8.0132986e+002 0.00e+000 9.01e+000 -1.5 1.40e+001 - 5.76e-001 > 1.32e-001f 1 > 34 8.0105092e+002 0.00e+000 6.84e+000 -1.5 7.34e+000 - 8.30e-001 > 9.60e-002f 3 > 35 7.9977021e+002 0.00e+000 3.28e+001 -1.5 9.26e+000 - 3.27e-001 > 8.37e-001F 1 > 36 8.0033089e+002 0.00e+000 4.86e+001 -1.5 4.62e+000 - 1.00e+000 > 1.00e+000H 1 > 37 7.9996104e+002 0.00e+000 1.06e+001 -1.5 5.43e+000 - 1.96e-001 > 1.75e-001f 2 > 38 7.9951421e+002 0.00e+000 9.42e+000 -1.5 1.59e+001 - 2.53e-001 > 1.96e-001f 2 > 39 7.9967929e+002 0.00e+000 3.01e+001 -1.5 3.16e+000 - 9.19e-001 > 7.79e-001H 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 40 7.9962530e+002 0.00e+000 2.19e+001 -1.5 6.91e+000 - 1.80e-001 > 1.78e-001h 3 > 41 7.9951740e+002 0.00e+000 1.26e+000 -1.5 1.88e+000 - 1.00e+000 > 1.00e+000h 1 > 42 8.0007055e+002 0.00e+000 9.26e+000 -1.5 3.65e+000 - 1.00e+000 > 1.00e+000H 1 > 43 7.9994265e+002 0.00e+000 7.74e+000 -1.5 7.16e+000 - 5.93e-001 > 9.68e-002h 4 > 44 7.9969538e+002 0.00e+000 6.51e+000 -1.5 7.45e+000 - 6.32e-001 > 1.92e-001h 2 > 45 7.9957525e+002 0.00e+000 4.13e+000 -1.5 1.30e+001 - 4.92e-001 > 5.31e-002h 3 > 46 7.9993363e+002 0.00e+000 2.71e+001 -1.5 4.17e+000 - 4.89e-001 > 1.00e+000H 1 > 47 7.9973977e+002 0.00e+000 1.60e+001 -1.5 5.74e+000 - 6.88e-001 > 3.02e-001h 2 > 48 7.9989765e+002 0.00e+000 2.33e+001 -1.5 4.88e+000 - 1.00e+000 > 1.00e+000H 1 > 49 7.9983511e+002 0.00e+000 2.31e+001 -1.5 1.74e+001 - 6.39e-001 > 5.01e-002h 5 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 50 7.9970425e+002 0.00e+000 1.59e+001 -1.5 2.09e+001 - 2.33e-001 > 8.10e-002h 3 > 51 7.9955418e+002 0.00e+000 5.09e+000 -1.5 1.94e+001 - 2.51e-001 > 6.63e-002f 2 > 52 7.9950139e+002 0.00e+000 3.11e+000 -1.5 6.47e+000 - 4.13e-001 > 8.04e-002h 4 > 53 7.9944413e+002 0.00e+000 1.92e+000 -1.5 3.36e+000 - 8.24e-001 > 2.06e-001h 3 > 54 8.0126819e+002 0.00e+000 3.56e+001 -1.5 8.76e+000 - 6.44e-001 > 1.00e+000H 1 > 55 7.9945686e+002 0.00e+000 2.26e+000 -1.5 9.10e+000 - 1.00e+000 > 1.00e+000F 1 > 56 7.9950057e+002 0.00e+000 1.04e+001 -1.5 1.95e+000 - 1.00e+000 > 1.00e+000H 1 > 57 7.9942217e+002 0.00e+000 1.84e+001 -1.7 1.70e+000 - 1.00e+000 > 1.00e+000h 1 > 58 8.0023640e+002 0.00e+000 6.79e+001 -1.8 2.88e+000 - 2.83e-001 > 1.00e+000H 1 > 59 8.0004652e+002 0.00e+000 5.87e+001 -1.8 6.11e+000 - 5.91e-001 > 9.88e-002h 4 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 60 7.9981714e+002 0.00e+000 5.01e+001 -1.8 2.04e+001 - 7.88e-002 > 4.40e-002f 4 > 61 7.9975653e+002 0.00e+000 4.73e+001 -1.8 9.31e+000 - 8.23e-001 > 2.59e-002h 4 > 62 7.9970454e+002 0.00e+000 4.19e+001 -1.8 3.96e+000 - 4.82e-001 > 3.85e-002h 5 > 63 7.9962939e+002 0.00e+000 3.88e+001 -1.8 4.97e+000 - 2.21e-001 > 5.05e-002h 5 > 64 7.9953788e+002 0.00e+000 3.19e+001 -1.8 1.07e+001 - 3.03e-001 > 1.32e-001h 2 > 65 7.9939133e+002 0.00e+000 1.33e+001 -1.8 1.27e+001 - 2.71e-001 > 1.24e-001h 2 > 66 7.9939690e+002 0.00e+000 4.01e+000 -1.8 7.99e+000 - 3.71e-001 > 4.06e-001h 2 > 67 7.9936697e+002 0.00e+000 4.73e+000 -1.8 4.44e+001 - 3.91e-001 > 3.41e-002h 4 > 68 7.9936784e+002 0.00e+000 1.89e+000 -1.8 1.39e+001 - 9.19e-001 > 1.23e-001h 4 > 69 7.9943394e+002 0.00e+000 1.13e+001 -1.8 7.41e+000 - 3.90e-001 > 3.38e-001w 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 70 8.0333982e+002 3.88e-001 6.64e+001 -1.8 1.21e+001 - 4.03e-001 > 9.33e-001w 1 > 71 8.0004084e+002 2.01e+000 2.23e+001 -1.8 9.50e+000 - 1.75e-001 > 8.22e-001w 1 > 72 7.9932137e+002 0.00e+000 4.72e+000 -1.8 8.14e+001 - 3.90e-001 > 1.69e-001h 1 > 73 7.9933546e+002 0.00e+000 1.20e+001 -1.8 2.20e+000 - 1.00e+000 > 4.15e-001h 2 > 74 7.9930951e+002 0.00e+000 8.03e+000 -1.8 2.31e+001 - 2.28e-001 > 5.44e-002h 4 > 75 8.0016365e+002 0.00e+000 6.14e+001 -1.9 2.00e+000 - 9.59e-001 > 1.00e+000H 1 > 76 7.9955770e+002 0.00e+000 4.24e+001 -2.0 5.35e+000 - 7.40e-001 > 4.29e-001f 1 > 77 7.9939342e+002 0.00e+000 1.45e+001 -2.0 2.40e+001 - 1.52e-001 > 9.57e-002h 2 > 78 7.9925263e+002 0.00e+000 1.21e+001 -2.0 1.69e+001 - 1.18e-001 > 1.51e-001h 2 > 79 7.9941302e+002 0.00e+000 1.24e+001 -1.3 1.89e+001 - 9.77e-001 > 1.77e-001h 2 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 80 8.0134560e+002 0.00e+000 3.00e+001 -1.4 4.81e+000 - 6.41e-001 > 1.00e+000h 1 > 81 7.9998500e+002 0.00e+000 1.73e+001 -1.4 7.31e+000 - 9.05e-001 > 8.39e-001f 1 > 82 7.9953189e+002 0.00e+000 4.34e+000 -1.4 2.20e+001 - 7.03e-001 > 1.77e-001f 2 > 83 7.9959732e+002 0.00e+000 1.07e+001 -1.4 3.78e+000 - 6.33e-001 > 1.00e+000h 1 > 84 8.0004713e+002 0.00e+000 3.44e+001 -1.4 4.05e+000 - 1.00e+000 > 1.00e+000H 1 > 85 7.9988950e+002 0.00e+000 3.31e+001 -1.4 3.13e+001 - 5.62e-001 > 9.57e-002f 2 > 86 7.9955465e+002 0.00e+000 1.76e+001 -1.4 1.50e+000 - 1.00e+000 > 1.00e+000h 1 > 87 7.9949662e+002 0.00e+000 7.54e+000 -1.4 3.70e+000 - 2.85e-001 > 1.85e-001h 3 > 88 7.9959288e+002 0.00e+000 1.71e+001 -1.4 1.39e+000 - 1.00e+000 > 1.00e+000h 1 > 89 8.0006272e+002 0.00e+000 1.37e+001 -1.4 5.26e+000 - 1.00e+000 > 1.00e+000h 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 90 7.9980392e+002 0.00e+000 1.44e+001 -1.4 6.97e+000 - 4.93e-001 > 2.01e-001h 2 > 91 7.9963251e+002 0.00e+000 8.20e+000 -1.4 9.82e+000 - 5.22e-001 > 1.65e-001h 3 > 92 7.9959672e+002 0.00e+000 2.45e+000 -1.4 3.24e+001 - 7.30e-001 > 1.55e-001h 2 > 93 7.9951429e+002 0.00e+000 3.42e+000 -1.4 3.75e+000 - 8.01e-001 > 1.00e+000h 1 > 94 7.9972009e+002 0.00e+000 1.76e+001 -1.4 2.53e+000 - 1.00e+000 > 1.00e+000H 1 > 95 7.9971154e+002 0.00e+000 2.36e+001 -1.4 2.37e+000 - 7.73e-001 > 1.00e+000H 1 > 96 7.9958228e+002 0.00e+000 1.80e+001 -1.4 1.65e+001 - 4.70e-001 > 1.12e-001h 2 > 97 7.9950114e+002 0.00e+000 7.95e+000 -1.4 3.83e+000 - 1.00e+000 > 2.99e-001h 2 > 98 7.9964810e+002 0.00e+000 1.43e+001 -1.4 2.33e+000 - 9.82e-001 > 1.00e+000H 1 > 99 7.9958083e+002 0.00e+000 9.04e+000 -1.4 2.42e+000 - 1.00e+000 > 1.00e+000H 1 > iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du > alpha_pr ls > 100 7.9957133e+002 0.00e+000 5.14e+000 -1.4 1.19e+001 - 4.74e-001 > 1.06e-001h 3 > > Number of Iterations....: 100 > > (scaled) (unscaled) > Objective...............: 7.9957132849034247e+002 > 7.9957132849034247e+002 > Dual infeasibility......: 5.1351489054861581e+000 > 5.1351489054861581e+000 > Constraint violation....: 0.0000000000000000e+000 > 0.0000000000000000e+000 > Complementarity.........: 6.3178225777153776e-002 > 6.3178225777153776e-002 > Overall NLP error.......: 5.1351489054861581e+000 > 5.1351489054861581e+000 > > > Number of objective function evaluations = 331 > Number of objective gradient evaluations = 101 > Number of equality constraint evaluations = 0 > Number of inequality constraint evaluations = 331 > Number of equality constraint Jacobian evaluations = 0 > Number of inequality constraint Jacobian evaluations = 101 > Number of Lagrangian Hessian evaluations = 0 > Total CPU secs in IPOPT (w/o function evaluations) = 2.533 > Total CPU secs in NLP function evaluations = 125.944 > > EXIT: Maximum Number of Iterations Exceeded. > > %------------------------------------------------------------------------------------------------------------------- > > > > > >
