44 this short chapter shows how to plug in MOSEK (free for academics) for the cases
55 where a commercial conic solver helps. The solve chunk is `eval: false` on purpose
66 so the chapter renders without MOSEK installed. The captured output is genuine:
7- a 5x5 nearest-PSD SDP solved with MOSEK 11.1.2 on 2026-06-10. The CVXR summary is
8- real psolve(verbose=TRUE) output; MOSEK's native log is real Rmosek verbose=10
9- output (CVXR will stream it inline under verbose in a future release --- see
10- new_design/features/TODO.md). -->
7+ a 5x5 nearest-PSD SDP solved with CVXR 1.9.2 + MOSEK 11.1.2 on 2026-08-24. The
8+ CVXR summary is real psolve(verbose=TRUE) output; MOSEK's native log is real
9+ Rmosek verbose=10 output (CVXR will stream it inline under verbose in a future
10+ release --- see new_design/features/TODO.md). To regenerate: flip eval to true,
11+ render locally with MOSEK installed, paste the output back, flip eval off. -->
1112
1213::: callout-note
1314## What you'll be able to do
@@ -122,17 +123,18 @@ the chosen solver is `MOSEK`, and that compile time and solver time are tracked
122123separately (@sec-dpp ):
123124
124125```
125- ────────────────────────────── CVXR v1.9.1 ──────────────────────────────
126+ ────────────────────────────── CVXR v1.9.2 ──────────────────────────────
126127ℹ Problem: 1 variable, 0 constraints (DCP)
127128ℹ Compilation: "MOSEK" via CVXR::Dcp2Cone -> CVXR::CvxAttr2Constr ->
128- CVXR::ConeMatrixStuffing -> CVXR::Mosek_Solver
129- ℹ Compile time: 0.21s
129+ CVXR::ExactCone2Cone -> CVXR::ConeMatrixStuffing ->
130+ CVXR::Mosek_Solver
131+ ℹ Compile time: 0.091s
130132─────────────────────────── Numerical solver ────────────────────────────
131133──────────────────────────────── Summary ────────────────────────────────
132134✔ Status: optimal
133135✔ Optimal value: 3.6305
134- ℹ Compile time: 0.21s
135- ℹ Solver time: 0.019s
136+ ℹ Compile time: 0.091s
137+ ℹ Solver time: 0.024s
136138```
137139
138140MOSEK also keeps its ** own** detailed log of the solve --- the problem type, the
@@ -147,6 +149,8 @@ Problem
147149 Type : CONIC (conic optimization problem)
148150 Constraints : 0
149151 Affine conic cons. : 2 (42 rows)
152+ Disjunctive cons. : 0
153+ Cones : 0
150154 Scalar variables : 16
151155 Matrix variables : 1 (scalarized: 1)
152156 Integer variables : 0
@@ -169,16 +173,16 @@ ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU
1691736 4.0e-06 2.5e-06 1.1e-08 1.00e+00 3.630469253e+00 3.630462235e+00 2.5e-06 0.00
1701747 4.0e-07 2.5e-07 3.7e-10 1.00e+00 3.630493170e+00 3.630492590e+00 2.5e-07 0.00
1711758 1.2e-08 7.5e-09 2.0e-12 1.00e+00 3.630495992e+00 3.630495975e+00 7.5e-09 0.00
172- Optimizer terminated. Time: 0.00
176+ Optimizer terminated. Time: 0.01
173177
174178Interior-point solution summary
175179 Problem status : PRIMAL_AND_DUAL_FEASIBLE
176180 Solution status : OPTIMAL
177- Primal. obj: 3.6304959921e+00 nrm: 4e+00 Viol. var: 0e+00 barvar: 0e+00
178- Dual. obj: 3.6304959749e+00 nrm: 2e+00 Viol. var: 2e-11 barvar: 1e-24
181+ Primal. obj: 3.6304959921e+00 nrm: 4e+00 Viol. var: 0e+00 barvar: 0e+00 acc: 3e-08
182+ Dual. obj: 3.6304959749e+00 nrm: 2e+00 Viol. var: 2e-11 barvar: 1e-24 acc: 7e-09
179183Optimizer summary
180- Optimizer - time: 0.00
181- Interior-point - iterations : 8 time: 0.00
184+ Optimizer - time: 0.01
185+ Interior-point - iterations : 8 time: 0.01
182186 Simplex - iterations : 0 time: 0.00
183187 Mixed integer - relaxations: 0 time: 0.00
184188```
0 commit comments