Closed mlubin closed 6 years ago
When s < tol_zero
then I would take the feasibility to be the violation of t <= 0
.
OK I will try that. If I can get it to return a correct answer, should I add it to the tests?
Yes, this problem should be in the unit tests.
should i just hard-code in a constant the zero tolerance we use for the s in the exp cone?
Hard-coding 1e-10
should be fine until we have some reason to make it a parameter.
Well, it should be closer to the solver's integrality tolerance, maybe 1e-6
.
ok, so 1e-6 for now
Now the output for subp cuts alg is:
Starting iterative algorithm
(r_dual,s_dual,t_dual) = (-19975.384522011205,437327.4118080733,2.2806266823598686e-6)
Iter. | Best feasible | Best bound | Rel. gap | Time (s)
1 | -1.232274e-08 | -4.827854e-01 | >1000 | 8.269e-03
WARNING: Repeated integer solution without converging
Iter. | Best feasible | Best bound | Rel. gap | Time (s)
2 | -1.232274e-08 | -4.827854e-01 | >1000 | 1.003e-02
WARNING: Pajarito failed to converge to the desired relative gap; try turning off the MIP solver's presolve functionality
Iterative algorithm summary:
- Status = Suboptimal
- Best feasible = -1.232274e-08
- Best bound = -4.827854e-01
- Relative opt. gap = 4.822e+04
- Total time (s) = 1.04e-02
Timers (s):
- Setup = 4.19e-04
-- Transform data = 1.10e-04
-- Create conic data = 2.29e-04
-- Create MIP data = 8.07e-05
- Algorithm = 9.95e-03
-- Solve relaxation = 1.31e-03
-- Get relaxation cuts = 6.48e-06
-- Solve MIP models = 2.10e-03
-- Solve subproblems = 4.69e-04
-- Get subproblem cuts = 1.61e-04
-- Get primal cuts = 7.53e-06
Counters:
- Iterations = 2
-- Integer repeats = 1
-- Conic subproblems = 1
--- Infeasible = 0
--- Optimal = 1
--- Suboptimal = 0
--- UserLimit = 0
--- ConicFailure = 0
--- Other status = 0
-- Feasible solutions = 1
--- From subproblems = 1
--- From MIP solve = 0
Solution returned by conic solver
Outer-approximation cuts added:
Cone | Relax. | Violated | Nonviol.
Primal expon. | 0 | 1 | 0
0 numerically unstable cone duals encountered
Distance to feasibility (negative indicates strict feasibility):
Cone | Variable | Constraint
Linear | NA | -5.00e-01
Primal expon. | 1.23e-08 | NA
Distance to integrality of integer/binary variables:
binary | 0.00e+00
stat = :Suboptimal
x_sol = [1.23227e-8,0.0,18.1137]
objval = -1.2322744242737645e-8
-1.2322744242737645e-8
when scaling is turned off:
Starting iterative algorithm
(r_dual,s_dual,t_dual) = (-0.9999999838736358,21.893315959633913,1.1417185201459285e-10)
Iter. | Best feasible | Best bound | Rel. gap | Time (s)
1 | -1.232274e-08 | -4.827854e-01 | >1000 | 6.862e-02
WARNING: Repeated integer solution without converging
Iter. | Best feasible | Best bound | Rel. gap | Time (s)
2 | -1.232274e-08 | -4.827854e-01 | >1000 | 7.001e-02
WARNING: Pajarito failed to converge to the desired relative gap; try turning off the MIP solver's presolve functionality
Iterative algorithm summary:
- Status = Suboptimal
- Best feasible = -1.232274e-08
- Best bound = -4.827854e-01
- Relative opt. gap = 4.822e+04
- Total time (s) = 7.03e-02
Timers (s):
- Setup = 7.78e-04
-- Transform data = 5.35e-05
-- Create conic data = 5.74e-04
-- Create MIP data = 1.50e-04
- Algorithm = 6.95e-02
-- Solve relaxation = 1.78e-03
-- Get relaxation cuts = 1.23e-05
-- Solve MIP models = 1.53e-03
-- Solve subproblems = 3.71e-04
-- Get subproblem cuts = 1.52e-04
-- Get primal cuts = 6.78e-06
Counters:
- Iterations = 2
-- Integer repeats = 1
-- Conic subproblems = 1
--- Infeasible = 0
--- Optimal = 1
--- Suboptimal = 0
--- UserLimit = 0
--- ConicFailure = 0
--- Other status = 0
-- Feasible solutions = 1
--- From subproblems = 1
--- From MIP solve = 0
Solution returned by conic solver
Outer-approximation cuts added:
Cone | Relax. | Violated | Nonviol.
Primal expon. | 0 | 1 | 0
0 numerically unstable cone duals encountered
Distance to feasibility (negative indicates strict feasibility):
Cone | Variable | Constraint
Linear | NA | -5.00e-01
Primal expon. | 1.23e-08 | NA
Distance to integrality of integer/binary variables:
binary | 0.00e+00
using cut_zero_tol=1e-8
and rounding to 0 rather than discarding the cut:
solve(PajaritoSolver(mip_solver=CplexSolver(CPX_PARAM_SCRIND=0),cont_solver=ECOSSolver(verbose=0),prim_cuts_assist=false,cut_zero_tol=1e-8,log_level=3))
...
Starting iterative algorithm
Iter. | Best feasible | Best bound | Rel. gap | Time (s)
1 | -1.232274e-08 | +0.000000e+00 | -1.231e-03 | 2.467e+00
WARNING: Solution value (-1.2322744242737645e-8) is smaller than best bound (0.0): check solution feasibility (tightening primal feasibility tolerance of conic solver may help)
Pajarito will print diagnostic information
Iterative algorithm summary:
- Status = Optimal
- Best feasible = -1.232274e-08
- Best bound = +0.000000e+00
- Relative opt. gap =* -1.231e-03*
- Total time (s) = 2.50e+00
Timers (s):
- Setup = 3.47e-01
-- Transform data = 1.16e-04
-- Create conic data = 3.47e-01
-- Create MIP data = 7.68e-05
- Algorithm = 2.16e+00
-- Solve relaxation = 1.28e+00
-- Get relaxation cuts = 7.06e-01
-- Solve MIP models = 1.56e-03
-- Solve subproblems = 5.61e-04
-- Get subproblem cuts = 2.31e-02
-- Get primal cuts = 1.71e-05
Counters:
- Iterations = 1
-- Integer repeats = 0
-- Conic subproblems = 1
--- Infeasible = 0
--- Optimal = 1
--- Suboptimal = 0
--- UserLimit = 0
--- ConicFailure = 0
--- Other status = 0
-- Feasible solutions = 2
--- From subproblems = 1
--- From MIP solve = 1
Solution returned by conic solver
Outer-approximation cuts added:
Cone | Relax. | Violated | Nonviol.
Primal expon. | 1 | 0 | 1
0 numerically unstable cone duals encountered
Distance to feasibility (negative indicates strict feasibility):
Cone | Variable | Constraint
Linear | NA | -5.00e-01
Primal expon. | 1.23e-08 | NA
Distance to integrality of integer/binary variables:
binary | 0.00e+00
stat = :Optimal
x_sol = [1.23227e-8,0.0,18.1137]
objval = -1.2322744242737645e-8
-1.2322744242737645e-8
Ok, that's correct.
We can set cut_zero_tol=1e-8
when testing this example.
OK will add as a test. then for sep cuts only i still need to add the code for the special sep cut. and then this example should work with sep cuts only as well, so I will add that as a test also.
Primal only happy returns an infeasible solution
Subp only returns an infeasibile solution but reports issues:
First thing is to fix the feasibility detection, second is to add the new separation cuts.