Open odow opened 2 years ago
Most are expected because the underlying problem is non-convex. However, 007_020
is incorrect:
using Pavito, JuMP, GLPK, Ipopt
mip_solver = MOI.OptimizerWithAttributes(
GLPK.Optimizer,
"msg_lev" => 0,
"tol_int" => 1e-9,
"tol_bnd" => 1e-7,
"mip_gap" => 0.0,
)
cont_solver = MOI.OptimizerWithAttributes(Ipopt.Optimizer, MOI.Silent() => true)
optimizer = MOI.OptimizerWithAttributes(
Pavito.Optimizer,
"timeout" => 120.0,
"mip_solver_drives" => true,
"mip_solver" => mip_solver,
"cont_solver" => cont_solver,
"log_level" => 1,
)
model = Model(optimizer; add_bridges = false)
@variable(model, -2 <= x <= 3, Int)
@variable(model, y, Bin)
@NLconstraint(model, (x - 0.5)^2 + (4 * y - 2)^2 <= 3)
julia> optimize!(model)
MINLP has a linear objective, 2 continuous variables, 2 integer variables, 1 nonlinear constraints, and 0 quadratic constraints
Pavito started, using MIP-solver-driven method...
┌ Warning: Infeasible NLP problem terminated with primal status: UNKNOWN_RESULT_STATUS
└ @ Pavito ~/.julia/dev/Pavito/src/optimize.jl:693
┌ Warning: Integer-infeasible solution in lazy callback
└ @ Pavito ~/.julia/dev/Pavito/src/optimize.jl:173
Pavito finished...
Status LOCALLY_SOLVED
Objective value Inf
Objective bound 0.00000
Objective gap Inf
Callbacks 2
Total time 0.01550 sec
MIP total time 0.00000 sec
NLP total time 0.01469 sec
julia> solution_summary(model)
* Solver : Pavito
* Status
Termination status : LOCALLY_SOLVED
Primal status : FEASIBLE_POINT
Dual status : NO_SOLUTION
Message from the solver:
"LOCALLY_SOLVED"
* Candidate solution
Objective value : Inf
Objective bound : 0.0
* Work counters
Solve time (sec) : 0.01550
Yes I think some bugs have crept in as the package has become more complex. I don't have time to look at these issues before I graduate because Pavito isn't part of my thesis but hopefully someone can! Ideally the package would be simplified again, e.g. by removing all of the messy quadratic stuff in favor of a QP to NLP bridge.
To update this, only 007_020
remains an issue:
https://github.com/jump-dev/Pavito.jl/blob/820a1f029a05407f1e3f71fb040efa769f502f40/test/jump_tests.jl#L49-L62
Pinging @ccoffrin in case he has any thoughts
@chriscoey it looks to me that Pavito claims to find a "feasible" solution when none exists. The objective value of Inf
might be suspect (or just a JuMP default?), we can over look this as no objective function is defined for this problem.
Can someone post the solution vector returned by Pavito on this case? This should provide some additional insights into what might be wrong.
I fixed the issue for the iterative algorithm in #60, but not for the MSD algorithm. The "solution" is NaNs. The MIP solver thinks it is feasible and we just use that status. There are some icky things going on in MSD, like us not adding cuts when the MIP solution is integer-infeasible. Also Ipopt fails on the subproblem.
MINLP has a linear objective, 2 continuous variables, 2 integer variables, 1 nonlinear constraints, and 0 quadratic constraints
Pavito started, using MIP-solver-driven method...
┌ Warning: Infeasible NLP problem terminated with primal status: UNKNOWN_RESULT_STATUS
└ @ Pavito ~/.julia/dev/Pavito/src/optimize.jl:694
┌ Warning: Integer-infeasible solution in lazy callback
└ @ Pavito ~/.julia/dev/Pavito/src/optimize.jl:173
Pavito finished...
Status LOCALLY_SOLVED
Objective value Inf
Objective bound 0.00000
Objective gap Inf
Callbacks 2
Total time 0.02041 sec
MIP total time 0.00000 sec
NLP total time 0.01976 sec
model.incumbent = [NaN, NaN]
nlp_mi_007_020: Test Failed at /Users/coey/.julia/packages/MINLPTests/iuxu3/src/MINLPTests.jl:56
Expression: JuMP.termination_status(model) == termination_target[problem_type]
Evaluated: MathOptInterface.LOCALLY_SOLVED == MathOptInterface.LOCALLY_INFEASIBLE
We shouldn't be failing MINLPTests. They're intended to be "easy" to solve: https://github.com/jump-dev/Pavito.jl/blob/5805d1d652250c4c27b99c80041a323b8e9d7888/test/jump_tests.jl#L49-L58