KNITRO + JuMP: linear --> nonlinear constraints?

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

KNITRO + JuMP: linear --> nonlinear constraints?

Alan Crawford
This is probably an old issue - but i wondered why linear constraints are being converted in to nonlinear constraints when called through JuMP?

For reference i am using Julia v0.5 with Knitro 10.0.1. Also 

julia> Pkg.status("JuMP")

 - JuMP                          0.14.1


julia> Pkg.status("KNITRO")

 - KNITRO                        0.2.0

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

Re: KNITRO + JuMP: linear --> nonlinear constraints?

Miles Lubin
Not sure what you mean exactly, but possibly see https://github.com/JuliaOpt/KNITRO.jl/commit/67a6e8379d1b39476282abb56a6e65598e2896c6 which hasn't been tagged yet.

On Wednesday, November 30, 2016 at 10:14:09 AM UTC-5, Alan Crawford wrote:
This is probably an old issue - but i wondered why linear constraints are being converted in to nonlinear constraints when called through JuMP?

For reference i am using Julia v0.5 with Knitro 10.0.1. Also 

julia> Pkg.status("JuMP")

 - JuMP                          0.14.1


julia> Pkg.status("KNITRO")

 - KNITRO                        0.2.0

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

Re: KNITRO + JuMP: linear --> nonlinear constraints?

Miles Lubin
If you use that you should update to Knitro 10.1.2 otherwise you may silently get incorrect answers on "rare" occasions.

On Wednesday, November 30, 2016 at 10:16:24 AM UTC-5, Miles Lubin wrote:
Not sure what you mean exactly, but possibly see <a href="https://github.com/JuliaOpt/KNITRO.jl/commit/67a6e8379d1b39476282abb56a6e65598e2896c6" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaOpt%2FKNITRO.jl%2Fcommit%2F67a6e8379d1b39476282abb56a6e65598e2896c6\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTJozoTyism49lpcxYNRl8bgc74A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaOpt%2FKNITRO.jl%2Fcommit%2F67a6e8379d1b39476282abb56a6e65598e2896c6\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTJozoTyism49lpcxYNRl8bgc74A&#39;;return true;">https://github.com/JuliaOpt/KNITRO.jl/commit/67a6e8379d1b39476282abb56a6e65598e2896c6 which hasn't been tagged yet.

On Wednesday, November 30, 2016 at 10:14:09 AM UTC-5, Alan Crawford wrote:
This is probably an old issue - but i wondered why linear constraints are being converted in to nonlinear constraints when called through JuMP?

For reference i am using Julia v0.5 with Knitro 10.0.1. Also 

julia> Pkg.status("JuMP")

 - JuMP                          0.14.1


julia> Pkg.status("KNITRO")

 - KNITRO                        0.2.0

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

Re: KNITRO + JuMP: linear --> nonlinear constraints?

Alan Crawford
Thanks Miles. To clarify:

In my jump model i get the following summary information:

Minimization problem with:

 * 5000 linear constraints

 * 3784 variables

Solver is Knitro



Then when i solve the model I get that knitro output telling me i have 1000 nonlinear constraints:


=======================================

           Academic License

       (NOT FOR COMMERCIAL USE)

         Artelys Knitro 10.0.1

=======================================


Knitro presolve eliminated 0 variables and 0 constraints.


outlev:               1

Knitro changing algorithm from AUTO to 1.

Knitro changing bar_initpt from AUTO to 3.

Knitro changing bar_murule from AUTO to 4.

Knitro changing bar_penaltycons from AUTO to 1.

Knitro changing bar_penaltyrule from AUTO to 2.

Knitro changing bar_switchrule from AUTO to 2.

Knitro changing linsolver from AUTO to 5.


Problem Characteristics                    ( Presolved)

-----------------------

Objective goal:  Minimize

Number of variables:                  3784 (      3784)

    bounded below:                       0 (         0)

    bounded above:                       0 (         0)

    bounded below and above:             0 (         0)

    fixed:                               0 (         0)

    free:                             3784 (      3784)

Number of constraints:                5000 (      5000)

    linear equalities:                   0 (         0)

    nonlinear equalities:                0 (         0)

    linear inequalities:                 0 (         0)

    nonlinear inequalities:           5000 (      5000)

    range:                               0 (         0)

Number of nonzeros in Jacobian:      94750 (     94750)

Number of nonzeros in Hessian:     7161220 (   7161220)


EXIT: Locally optimal solution found.


Final Statistics

----------------

Final objective value               =  -3.50504042566882e-01

Final feasibility error (abs / rel) =   9.60e-11 / 9.60e-11

Final optimality error  (abs / rel) =   2.64e-10 / 2.64e-10

# of iterations                     =         19 

# of CG iterations                  =          0 

# of function evaluations           =         21

# of gradient evaluations           =         21

# of Hessian evaluations            =         19

Total program time (secs)           =     170.44518 (   170.338 CPU time)

Time spent in evaluations (secs)    =     106.45541


===============================================================================

 


On Wednesday, 30 November 2016 15:18:11 UTC, Miles Lubin wrote:
If you use that you should update to Knitro 10.1.2 otherwise you may silently get incorrect answers on "rare" occasions.

On Wednesday, November 30, 2016 at 10:16:24 AM UTC-5, Miles Lubin wrote:
Not sure what you mean exactly, but possibly see <a href="https://github.com/JuliaOpt/KNITRO.jl/commit/67a6e8379d1b39476282abb56a6e65598e2896c6" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaOpt%2FKNITRO.jl%2Fcommit%2F67a6e8379d1b39476282abb56a6e65598e2896c6\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTJozoTyism49lpcxYNRl8bgc74A&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FJuliaOpt%2FKNITRO.jl%2Fcommit%2F67a6e8379d1b39476282abb56a6e65598e2896c6\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTJozoTyism49lpcxYNRl8bgc74A&#39;;return true;">https://github.com/JuliaOpt/KNITRO.jl/commit/67a6e8379d1b39476282abb56a6e65598e2896c6 which hasn't been tagged yet.

On Wednesday, November 30, 2016 at 10:14:09 AM UTC-5, Alan Crawford wrote:
This is probably an old issue - but i wondered why linear constraints are being converted in to nonlinear constraints when called through JuMP?

For reference i am using Julia v0.5 with Knitro 10.0.1. Also 

julia> Pkg.status("JuMP")

 - JuMP                          0.14.1


julia> Pkg.status("KNITRO")

 - KNITRO                        0.2.0

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

Re: KNITRO + JuMP: linear --> nonlinear constraints?

Alan Crawford
In reply to this post by Alan Crawford
I checked out the master of KNITRO.jl and downloaded the KNITRO v 10.1.2, I ran the example from KNITRO.jl 

using KNITRO, JuMP
m = Model(solver=KnitroSolver())
@variable(m, x[1:3]>=0)
@objective(m, Min, 9.0 - 8.0*x[1] - 6.0*x[2] - 4.0*x[3]
                        + 2.0*x[1]^2 + 2.0*x[2]^2 + x[3]^2
                        + 2.0*x[1]*x[2] + 2.0*x[1]*x[3])
@constraint(m, x[1] + x[2] + 2.0*x[3] <= 3)
solve(m)

KNITRO now correctly picks up problem structure. 


 

On Wednesday, 30 November 2016 15:14:09 UTC, Alan Crawford wrote:
This is probably an old issue - but i wondered why linear constraints are being converted in to nonlinear constraints when called through JuMP?

For reference i am using Julia v0.5 with Knitro 10.0.1. Also 

julia> Pkg.status("JuMP")

 - JuMP                          0.14.1


julia> Pkg.status("KNITRO")

 - KNITRO                        0.2.0

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