IPOPT in Pyomo returns non-zero return code

106 views Asked by At

I am working on a complex non-linear model for power grid analysis I cannot post here. As decision variables it is supposed to set the storage power for all time steps of a time series. The model is working for:

  • a low number of storages in the grid and any time horizon
  • a higher number of storages for a short time horizon only

For a high number of storages and a longer time horizon it returns the error message:

ERROR: Solver (ipopt) returned non-zero return code (3221225501)

the storage power variable is defined as an array of the size (n_storages x t_steps). So increasing the number of storages or the time horizon only changes the array size, but isn't directly influencing the calculations as a variable itself.

What I concluded so far is that:

  • it isn't a problem of the model constraints, since it doesn't tell me the problem is unbounded/infeasible. Also the error persists when I keep variable constraints.
  • variables were initially not initialised. Initialising them improved the size of the solvable time horizon. This matches the recommendation of the Pyomo Docs.
  • the problem isn't solvable with the scip sovler either, it returns another error. Unsure about the meaning of this one, as of now.
FileNotFoundError: [Errno 2] No such file or directory: '...\\AppData\\Local\\Temp\\2\\tmp84kvz_rd.pyomo.sol‘ 

The log of the ipopt solver with the highest output level is below. I edited it to shorten the matrices. The log stops in the middle of the Right hand side 0 in TSymLinearSolver:


List of options:

                                    Name   Value                # times used
                        file_print_level = 12                        1
                             output_file = ipopt_log.txt             1
                                     tol = 0.001                     2

******************************************************************************
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
******************************************************************************

NOTE: You are using Ipopt by default with the MUMPS linear solver.
      Other linear solvers might be more efficient (see Ipopt documentation).


This is Ipopt version 3.11.1, running with linear solver mumps.

Number of nonzeros in equality constraint Jacobian...:    82747
Number of nonzeros in inequality constraint Jacobian.:     6912
Number of nonzeros in Lagrangian Hessian.............:    18624

Scaling parameter for objective function = 1.000000e+000
objective scaling factor = 1
No x scaling provided
c scaling provided
No d scaling provided
DenseVector "c scaling vector" with 20640 elements:
c scaling vector[    1]=4.8028646739442593e-001
c scaling vector[    2]=4.8028646739442593e-001
    ...
c scaling vector[20639]=1.0000000000000000e+000
c scaling vector[20640]=1.0000000000000000e+000
DenseVector "original x_L unscaled" with 4032 elements:
original x_L unscaled[    1]=9.0000000000000002e-001
original x_L unscaled[    2]=9.0000000000000002e-001
    ...
original x_L unscaled[ 4031]=0.0000000000000000e+000
original x_L unscaled[ 4032]=0.0000000000000000e+000
DenseVector "original x_U unscaled" with 4032 elements:
original x_U unscaled[    1]=1.1000000000000001e+000
original x_U unscaled[    2]=1.1000000000000001e+000
    ...
original x_U unscaled[ 4031]=2.7400000000000002e-001
original x_U unscaled[ 4032]=2.7400000000000002e-001
DenseVector "original d_L unscaled" with 0 elements:
DenseVector "original d_U unscaled" with 3456 elements:
original d_U unscaled[    1]=6.2500000000000000e+002
original d_U unscaled[    2]=6.2500000000000000e+002
    ...
original d_U unscaled[ 3455]=6.3504000000000005e-002
original d_U unscaled[ 3456]=6.3504000000000005e-002
DenseVector "modified x_L scaled" with 4032 elements:
modified x_L scaled[    1]=8.9999998999999997e-001
modified x_L scaled[    2]=8.9999998999999997e-001
    ...
modified x_L scaled[ 4031]=-1.0000000000000000e-008
modified x_L scaled[ 4032]=-1.0000000000000000e-008
DenseVector "modified x_U scaled" with 4032 elements:
modified x_U scaled[    1]=1.1000000110000001e+000
modified x_U scaled[    2]=1.1000000110000001e+000
    ...
modified x_U scaled[ 4031]=2.7400001000000002e-001
modified x_U scaled[ 4032]=2.7400001000000002e-001
DenseVector "modified d_L scaled" with 0 elements:
DenseVector "modified d_U scaled" with 3456 elements:
modified d_U scaled[    1]=6.2500000624999996e+002
modified d_U scaled[    2]=6.2500000624999996e+002
    ...
modified d_U scaled[ 3455]=6.3504010000000000e-002
modified d_U scaled[ 3456]=6.3504010000000000e-002
DenseVector "initial x unscaled" with 21120 elements:
initial x unscaled[    1]=1.0000000000000000e+000
initial x unscaled[    2]=1.0000000000000000e+000
    ...
initial x unscaled[21119]=-1.0000000000000000e+000
initial x unscaled[21120]=-1.0000000000000000e+000
Moved initial values of x sufficiently inside the bounds.
DenseVector "original vars" with 21120 elements:
original vars[    1]=1.0000000000000000e+000
original vars[    2]=1.0000000000000000e+000
    ...
original vars[21119]=-1.0000000000000000e+000
original vars[21120]=-1.0000000000000000e+000
DenseVector "new vars" with 21120 elements:
new vars[    1]=1.0000000000000000e+000
new vars[    2]=1.0000000000000000e+000
    ...
new vars[21119]=-1.0000000000000000e+000
new vars[21120]=-1.0000000000000000e+000
Initial values of s sufficiently inside the bounds.

CompoundVector "RHS[ 0]" with 4 components:

Component 1:
  DenseVector "RHS[ 0][ 0]" with 21120 elements:
  RHS[ 0][ 0][    1]=0.0000000000000000e+000
  RHS[ 0][ 0][    2]=0.0000000000000000e+000
    ...
  RHS[ 0][ 1][ 3456]=-1.0000000000000000e+000

Component 3:
  DenseVector "RHS[ 0][ 2]" with 20640 elements:
  Homogeneous vector, all elements have value 0.0000000000000000e+000

Component 4:
  DenseVector "RHS[ 0][ 3]" with 3456 elements:
  Homogeneous vector, all elements have value 0.0000000000000000e+000

CompoundSymMatrix "KKT" with 4 rows and columns components:
Component for row 0 and column 0:

  SumSymMatrix "KKT[0][0]" of dimension 21120 with 2 terms:
  Term 0 with factor 0.0000000000000000e+000 and the following matrix:

    SymTMatrix "Term: 0" of dimension 21120 with 18624 nonzero elements:
    Uninitialized!
  Term 1 with factor 1.0000000000000000e+000 and the following matrix:

    DiagMatrix "Term: 1" with 21120 rows and columns, and with diagonal elements:
      DenseVector "Term: 1" with 21120 elements:
      Homogeneous vector, all elements have value 1.0000000000000000e+000
Component for row 1 and column 0:
This component has not been set.
Component for row 1 and column 1:

  DiagMatrix "KKT[1][1]" with 3456 rows and columns, and with diagonal elements:
    DenseVector "KKT[1][1]" with 3456 elements:
    Homogeneous vector, all elements have value 1.0000000000000000e+000
Component for row 2 and column 0:

  ScaledMatrix "KKT[2][0]" of dimension 20640 x 21120:
    DenseVector "KKT[2][0]_row_scaling" with 20640 elements:
    KKT[2][0]_row_scaling[    1]=4.8028646739442593e-001
    KKT[2][0]_row_scaling[    2]=4.8028646739442593e-001
    KKT[2][0]_row_scaling[    3]=4.8028646739442593e-001
    ...
    KKT[2][0]_unscaled_matrix[12192,21120]=1.0000000000000000e+000  (82746)
    ColumnScaling is NULL
Component for row 2 and column 1:
This component has not been set.
Component for row 2 and column 2:

  DiagMatrix "KKT[2][2]" with 20640 rows and columns, and with diagonal elements:
    DenseVector "KKT[2][2]" with 20640 elements:
    Homogeneous vector, all elements have value 0.0000000000000000e+000
Component for row 3 and column 0:

  GenTMatrix "KKT[3][0]" of dimension 3456 by 21120 with 6912 nonzero elements:
  KKT[3][0][    1, 3073]=2.0000000000000000e+000  (0)
  KKT[3][0][    2, 3074]=2.0000000000000000e+000  (1)
  KKT[3][0][    3, 3075]=2.0000000000000000e+000  (2)
  KKT[3][0][    4, 3076]=2.0000000000000000e+000  (3)
    ...
(160409) KKT[48671][48671] =  0.000000000000000e+000
(160410) KKT[48672][48672] =  0.000000000000000e+000
Right hand side 0 in TSymLinearSolver:
Trhs[    0,    0] = 0.0000000000000000e+000
...
Trhs[    0,48634] = 0.0000000000000000e+000
Trhs[    0,48635] = 0.0000000000000000e+000
Trhs[    0,48636] = 0.0000000000000000e+000
Trhs[    0,48637] = 0.0000000000000000e+000
Trhs[    0,48638] = 0.0000000000000000e+000
Trhs[    0,48639] = 0.0000000000000000e+000
Trhs[    0,48640] = 0.0000000000000000e+000
Trhs[    0,48641] = 0.0000000000000000e+000
Trhs[    0,48642] = 0.0000000000000000e+000
Trhs[    0,48643] = 0.0000000000000000e+000
Trhs[    0

My questions are:

  • Is there any way to obtain more information about the error cause?
  • What other possibilities do I have to debug the error?

I am aware that it's a broad questions, so thank you for your answers in advance!

1

There are 1 answers

0
downbydawn On BEST ANSWER

I tried to solve the model with ipopt 3.14 on MacOS (intel-chip) and it converges. It turns out that the chip can be a problem. My problem occurs on a AMD chip (for further details.). It can be resolved by using the 32 bit version of ipopt instead of the 64-bit version. I did not try the 3.14 on windows yet, because it is not available with anaconda. Thank you for your help!