Quantcast

Getting Contraint Violations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Getting Contraint Violations

Huckleberry Febbo
I am solving a nonlinear optimization problem using JuMP with IPOPT and I am running into a problem where the solver says:
"WARNING: Not solved to optimality, status: Infeasible"

It is very similar to a problem that is feasible and I am not sure what the issue is with this problem. So, I started to try and look at the constraints violation at this infeasible point, but I could not figure it out with a nonlinear constraint. Frist I tried the ``getvalue()'' function but that did not work and the documentation did not say that ``getvalue()`` works with nonlinear expressions.

 I tried a few other things as well that did not pan out. Is there an easy way query to evaluate the nonlinear constraint expressions at the current solution?

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting Contraint Violations

Huckleberry Febbo
Any insight on this would be helpful. Thanks!

On Thursday, October 27, 2016 at 5:14:23 PM UTC-4, Huckleberry Febbo wrote:
I am solving a nonlinear optimization problem using JuMP with IPOPT and I am running into a problem where the solver says:
"WARNING: Not solved to optimality, status: Infeasible"

It is very similar to a problem that is feasible and I am not sure what the issue is with this problem. So, I started to try and look at the constraints violation at this infeasible point, but I could not figure it out with a nonlinear constraint. Frist I tried the ``getvalue()'' function but that did not work and the documentation did not say that ``getvalue()`` works with nonlinear expressions.

 I tried a few other things as well that did not pan out. Is there an easy way query to evaluate the nonlinear constraint expressions at the current solution?

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting Contraint Violations

Miles Lubin
You can ask for the value of each constraint at any given point by using eval_g. See http://www.juliaopt.org/JuMP.jl/0.14/nlp.html#querying-derivatives-from-a-jump-model.

On Tue, Nov 15, 2016 at 12:49 PM, Huckleberry Febbo <[hidden email]> wrote:
Any insight on this would be helpful. Thanks!


On Thursday, October 27, 2016 at 5:14:23 PM UTC-4, Huckleberry Febbo wrote:
I am solving a nonlinear optimization problem using JuMP with IPOPT and I am running into a problem where the solver says:
"WARNING: Not solved to optimality, status: Infeasible"

It is very similar to a problem that is feasible and I am not sure what the issue is with this problem. So, I started to try and look at the constraints violation at this infeasible point, but I could not figure it out with a nonlinear constraint. Frist I tried the ``getvalue()'' function but that did not work and the documentation did not say that ``getvalue()`` works with nonlinear expressions.

 I tried a few other things as well that did not pan out. Is there an easy way query to evaluate the nonlinear constraint expressions at the current solution?

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting Contraint Violations

Huckleberry Febbo
Great, thanks.

Is there a list of the variables in the order that they where added?

I would like to avoid having to do this:

values = zeros(2)
values[linearindex(x)] = 2.0
values[linearindex(y)] = 3.0

since I have close to 1000 variables that are changing depending on my problem, I would like to do this automatically. For instance, let's call the total design variable ``DV`` and so in this case:

DV = [2,3]

Then, one could use this like:

objval = MathProgBase.eval_f(d, DV)

I imagine that you had to convert the variables into a single vector in order to use IPOPT for instance. Is this vector of values available at the JuMP or MathProg interface level in julia?

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Getting Contraint Violations

Joey Huchette
You can recover the i-th variable with Variable(model, i).

Joey





On Wed, Nov 16, 2016 at 5:59 PM -0600, "Huckleberry Febbo" <[hidden email]> wrote:

Great, thanks.

Is there a list of the variables in the order that they where added?

I would like to avoid having to do this:

values = zeros(2)
values[linearindex(x)] = 2.0
values[linearindex(y)] = 3.0

since I have close to 1000 variables that are changing depending on my problem, I would like to do this automatically. For instance, let's call the total design variable ``DV`` and so in this case:

DV = [2,3]

Then, one could use this like:

objval = MathProgBase.eval_f(d, DV)

I imagine that you had to convert the variables into a single vector in order to use IPOPT for instance. Is this vector of values available at the JuMP or MathProg interface level in julia?

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Loading...