Skip to content

Instantly share code, notes, and snippets.

@iamed2
Last active August 29, 2015 14:09
Show Gist options
  • Save iamed2/d15ee9c32c2ec322af01 to your computer and use it in GitHub Desktop.
Save iamed2/d15ee9c32c2ec322af01 to your computer and use it in GitHub Desktop.
Mosek.jl SOCP misidentification
(asub+aptrb[0]) = 0 (1.00e+00)
(asub+aptrb[1]) = 0 (-1.00e+00)
(asub+aptrb[2]) = 0 (-1.00e+00)
(asub+aptrb[3]) = 1 (-1.00e+00)
(asub+aptrb[4]) = 5 (-1.00e+00)
Computer
Platform : MACOSX/64-X86
Cores : 4
Problem
Name :
Objective sense : min
Type : LO (linear optimization problem)
Constraints : 9
Cones : 0
Scalar variables : 5
Matrix variables : 0
Integer variables : 0
Optimizer started.
Interior-point optimizer started.
Presolve started.
Eliminator - tries : 0 time : 0.00
Eliminator - elim's : 0
Lin. dep. - tries : 0 time : 0.00
Lin. dep. - number : 0
Presolve terminated. Time: 0.00
Interior-point optimizer terminated. Time: 0.00.
Optimizer terminated. Time: 0.00
ERROR: MosekMathProgModelError("No solution available")
in getsolution at /Users/eric/.julia/v0.3/Mosek/src/MosekSolverInterface.jl:443
in solve! at /Users/eric/.julia/v0.3/Convex/src/solution.jl:47
in socptest1 at none:7
using Mosek
using Convex
solver = MosekSolver()
x = Variable(2)
a = [0;1]
b = [1;1]
F = [norm(x - a, 2) <= 1, norm(x - b, 2) <= 1]
problem = minimize(sum(x), F)
solve!(problem, solver)
x = sdpvar(2,1);
a = [0;1];
b = [1;1];
F = norm(x-a)<=1;
F = F+[norm(x-b) <= 1];
sol = solvesdp(F,sum(x),ops);
Optimizer started.
Conic interior-point optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator - tries : 0 time : 0.00
Eliminator - elim's : 0
Lin. dep. - tries : 1 time : 0.02
Lin. dep. - number : 0
Presolve terminated. Time: 0.11
Optimizer - threads : 4
Optimizer - solved problem : the primal
Optimizer - Constraints : 2
Optimizer - Cones : 2
Optimizer - Scalar variables : 6 conic : 6
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 3 after factor : 3
Factor - dense dim. : 0 flops : 4.60e+01
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 1.0e+00 3.0e+00 0.00e+00 2.000000000e+00 0.000000000e+00 1.0e+00 0.27
1 2.3e-01 2.3e-01 6.8e-01 3.33e-01 3.882451506e-01 -1.001050138e-01 2.3e-01 0.69
2 2.9e-02 2.9e-02 8.8e-02 8.18e-01 -4.797121447e-01 -5.547656745e-01 2.9e-02 0.72
3 3.1e-03 3.1e-03 9.3e-03 9.89e-01 -5.734740870e-01 -5.815161459e-01 3.1e-03 0.74
4 2.2e-04 2.2e-04 6.5e-04 1.00e+00 -5.848293206e-01 -5.853912416e-01 2.2e-04 0.75
5 1.1e-05 1.1e-05 3.4e-05 1.00e+00 -5.857366986e-01 -5.857660626e-01 1.1e-05 0.76
6 1.6e-08 1.6e-08 4.9e-08 1.00e+00 -5.857863920e-01 -5.857864345e-01 1.6e-08 0.81
Interior-point optimizer terminated. Time: 0.81.
Optimizer terminated. Time: 1.25
Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -5.8578639205e-01 Viol. con: 2e-08 var: 0e+00 cones: 0e+00
Dual. obj: -5.8578643448e-01 Viol. con: 0e+00 var: 2e-08 cones: 0e+00
Optimizer summary
Optimizer - time: 1.25
Interior-point - iterations : 6 time: 0.81
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Clean primal-dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Primal-dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment