julia> Pkg.status("JuMP")
- JuMP 0.14.1
julia> Pkg.status("KNITRO")
- KNITRO 0.2.0
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
===============================================================================
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)