jump-dev / Pajarito.jl

A solver for mixed-integer convex optimization
Mozilla Public License 2.0
131 stars 22 forks source link

transition to cbf for conic tests #318

Closed chriscoey closed 7 years ago

chriscoey commented 7 years ago

fixes #317 clean up tests and remove convex.jl dependency

chriscoey commented 7 years ago

issue now is that for two of the new cbf tests (old problems -Optimal SOCRot, and Zero cones), the solution is permuted from what it should be given the initial model. these tests were fine before moving to cbf. so maybe cbf is permuting the indices of variables?

chriscoey commented 7 years ago

OK I've put the SOC tests in CBF. Still need to add more small nontrivial problems from cblib, especially with rotated soc.

Then I'll do exp tests, and add some easy ones from cblib.

Then SDP tests. Will put A,D,E opt problems in CBF. But probably want maybe a polynomial problem or a couple of faster SCIP SDP benchmark instances if any are fast.

chriscoey commented 7 years ago

If we identify issues with conicbenchmarkutilities this way, then we should fix those and then release CBU, because I use a jump to cbf function that is only on master.

mlubin commented 7 years ago

so maybe cbf is permuting the indices of variables?

There are two things going on:

  1. We don't have a way to map between Convex.jl variables and variables in the cbf file. I wouldn't recommend trying to do that.
  2. The cbf exponential cone is defined in a different order from the MPB exponential cone, so we perform a permutation for Exp variable cones. This doesn't affect convex.jl models because convex.jl doesn't use variable cones.

The best thing to do at the moment is to take the solution vector and give it to a function that processes the total infeasibilities from the CBF model, like here and test for small violations in a generic way. We should probably put this function into CBU.

codecov[bot] commented 7 years ago

Codecov Report

Merging #318 into master will increase coverage by 5.62%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #318      +/-   ##
==========================================
+ Coverage   85.28%   90.91%   +5.62%     
==========================================
  Files           4        4              
  Lines        1740     1761      +21     
==========================================
+ Hits         1484     1601     +117     
+ Misses        256      160      -96
Impacted Files Coverage Δ
src/nonlinear_algorithm.jl 93.67% <100%> (+4.12%) :arrow_up:
src/conic_algorithm.jl 90.62% <100%> (+6.48%) :arrow_up:
src/solver.jl 81.57% <0%> (-2.64%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d5a898a...de45605. Read the comment docs.

chriscoey commented 7 years ago

some tests fail on MSD, but too bad

chriscoey commented 7 years ago

also Gurobi fails on a few tests where no other solvers fail

chriscoey commented 7 years ago

lots of CPLEX MSD errors, eg Hijazi problem coming back optimal. Seems that the incumbent callback is pretty important if you want to use MSD with CPLEX

chriscoey commented 7 years ago

OK problem now is in the pajarito-in-pajarito MISOCP OA tests, on the first one, there is an immediate failure because JuMP seems to be making a LinearQuadratic model instead of a conic one. @mlubin

Starting iterative outer approximation algorithm
ExpSOC SOC in MIP: Error During Test
  Got an exception of type ErrorException outside of a @test
  Continuous solver specified is not a nonlinear solver recognized by MathProgBase

   in NonlinearModel(::Pajarito.PajaritoSolver) at /home/coey/.julia/v0.5/Pajarito/src/solver.jl:157
   in LinearQuadraticModel(::Pajarito.PajaritoSolver) at /home/coey/.julia/v0.5/Pajarito/src/solver.jl:173
   in #build#114(::Bool, ::Bool, ::JuMP.ProblemTraits, ::Function, ::JuMP.Model) at /home/coey/.julia/v0.5/JuMP/src/solvers.jl:405
   in (::JuMP.#kw##build)(::Array{Any,1}, ::JuMP.#build, ::JuMP.Model) at ./<missing>:0
   in #solve#109(::Bool, ::Bool, ::Bool, ::Array{Any,1}, ::Function, ::JuMP.Model) at /home/coey/.julia/v0.5/JuMP/src/solvers.jl:166
   in (::JuMP.#kw##solve)(::Array{Any,1}, ::JuMP.#solve, ::JuMP.Model) at ./<missing>:0
   in solve_iterative!(::Pajarito.PajaritoConicModel) at /home/coey/.julia/v0.5/Pajarito/src/conic_algorithm.jl:1330
mlubin commented 7 years ago

It's probably because the sub-model has no SOC constraints added when you call solve().

chriscoey commented 7 years ago

OK, so how do I tell it that this is supposed to be a conic model, before any SOC cuts get added?

mlubin commented 7 years ago

You can't at the moment besides adding a dummy SOC constraint. I'd skip this test and open a JuMP issue.

chriscoey commented 7 years ago

@mlubin do you know where this 0.6 dep warning comes from WARNING: deprecated syntax "_ as an rvalue".

chriscoey commented 7 years ago

iterative tests are passing for me (except on Gurobi, a couple of weird failures), but lots of MSD tests fail with CPLEX and Gurobi

mlubin commented 7 years ago

do you know where this 0.6 dep warning comes from

Don't name variables _.

It would be nice to understand why MSD is failing. Did the tests used to pass?

chriscoey commented 7 years ago

The msd tests used to pass on glpk only

On Mar 24, 2017 1:05 PM, "Miles Lubin" notifications@github.com wrote:

do you know where this 0.6 dep warning comes from

Don't name variables _.

It would be nice to understand why MSD is failing. Did the tests used to pass?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mlubin/Pajarito.jl/pull/318#issuecomment-289082890, or mute the thread https://github.com/notifications/unsubscribe-auth/AJq0k7K39RZ5qtqPdOtM_XUnTboh1IjVks5ro_fxgaJpZM4Ml-M5 .

chriscoey commented 7 years ago

i've re-enabled GLPK MSD because it was only one minor unimportant test that it failed on

chriscoey commented 7 years ago

i added in cbc solver, but it fails on dozens of tests. quite unreliable.

chriscoey commented 7 years ago

tests pass, including MSD with glpk 💯