Initializing variables indexed with ContinousSet

203 views
Skip to first unread message

Jaime Vera

unread,
Aug 21, 2017, 3:11:40 PM8/21/17
to Pyomo Forum
Hi everybody!!

I'm getting the following error from IpOpt solver when trying to solve a dynamic model in DAE toolbox:

******************************************************************************
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.12.3, running with linear solver ma27.

Number of nonzeros in equality constraint Jacobian...:    56159
Number of nonzeros in inequality constraint Jacobian.:        0
Number of nonzeros in Lagrangian Hessian.............:    15606

Error in an AMPL evaluation. Run with "halt_on_ampl_error yes" to see details.
Error evaluating Jacobian of equality constraints at user provided starting point.
  No scaling factors for equality constraints computed!
Total number of variables............................:    20604
                     variables with only lower bounds:        0
                variables with lower and upper bounds:        0
                     variables with only upper bounds:        0
Total number of equality constraints.................:    20455
Total number of inequality constraints...............:        0
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:        0

Error in an AMPL evaluation. Run with "halt_on_ampl_error yes" to see details.

Number of Iterations....: 0

Number of objective function evaluations             = 0
Number of objective gradient evaluations             = 1
Number of equality constraint evaluations            = 1
Number of inequality constraint evaluations          = 0
Number of equality constraint Jacobian evaluations   = 1
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations             = 0
Total CPU secs in IPOPT (w/o function evaluations)   =      0.125
Total CPU secs in NLP function evaluations           =     -0.000

EXIT: Invalid number in NLP function or derivative detected.

As i understand, this is a problem with the variable initialization (or i'm wrong?). So, how can i initialize the variables with the continous set? Is in the same way that a discrete set?

Thanks in advance!!

Jaime

Nicholson, Bethany L.

unread,
Aug 22, 2017, 1:24:00 PM8/22/17
to pyomo...@googlegroups.com

Hi Jamie,

 

Yes, initializing a model with a ContinuousSet can be done using the same techniques as a discrete Set. You can specify an initialize rule for variables or set the values of variables manually after discretization. I’m working on some new tools for doing automatic model initialization using an ODE/DAE simulator or solving the discretized model forward in time. You can find prototypes of these tools on the dae-simulator and dae-element-initializer branches in the main github repo. Both of these tools should be merged into master in the next month or two.

 

I would also recommend that you get your dynamic model converging before trying to solve an optimization problem with it (i.e. discretize your model and solve a square problem). This can be useful for debugging the dynamic model itself and you can always save the solution and use it to initialize your optimization problem.

 

Bethany

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

Reply all
Reply to author
Forward
0 new messages