maximize · 1 variable · 2 constraints

Original Problem

maximizeμw+γwC4×4w\underset{}{\operatorname{maximize}} \quad {{{\boldsymbol{\mu}}^\top} {\mathbf{w}}} + {-{{\gamma} \odot {{\mathbf{w}}^\top {C_{4\times 4}} {\mathbf{w}}}}}
subject to\text{subject to}
budget:1w=1\text{budget:}\quad \mathbf{1}^\top {\mathbf{w}} = 1
long only:0w\text{long only:}\quad 0 \leq \mathbf{w}
Problem is DCP compliant.
1 variable, 2 constraints
t6=t2+t5t_{6} = {t_{2}} + {t_{5}}
concave?1×1\text{concave} \cdot ? \cdot 1×1
t2=t1wt_{2} = {t_{1}} {\mathbf{w}}
affine?1×1\text{affine} \cdot ? \cdot 1×1
t5=t4t_{5} = -{t_{4}}
concaveR1×1\text{concave} \cdot \mathbb{R}_- \cdot 1×1
t1=μt_{1} = {\boldsymbol{\mu}}^\top
constant?1×4\text{constant} \cdot ? \cdot 1×4
w\mathbf{w}
affine?4×1\text{affine} \cdot ? \cdot 4×1
t4=γt3t_{4} = {\gamma} \odot {t_{3}}
convexR+1×1\text{convex} \cdot \mathbb{R}_+ \cdot 1×1
μ\boldsymbol{\mu}
constant?4×1\text{constant} \cdot ? \cdot 4×1
γ\gamma
constantR+1×1\text{constant} \cdot \mathbb{R}_+ \cdot 1×1
t3=φquad(w,C4×4)t_{3} = \varphi^{\text{quad}}({\mathbf{w}}, {C_{4\times 4}})
convexR+1×1\text{convex} \cdot \mathbb{R}_+ \cdot 1×1
w\mathbf{w}
affine?4×1\text{affine} \cdot ? \cdot 4×1
C4×4C_{4\times 4}
constantR+4×4\text{constant} \cdot \mathbb{R}_+ \cdot 4×4
Scroll to zoom · Drag to pan · Click node to collapse

Constraints

[1] Equality 1×1 (budget)
t7=φΣ(w)t_{7} = \varphi^{\Sigma}({\mathbf{w}})[affine, 1×1]
w\mathbf{w}[affine, 4×1]
11[constant, 1×1]
[2] Inequality 4×1 (long only)
00[constant, 1×1]
w\mathbf{w}[affine, 4×1]

Smith Form

maximizet6\operatorname{maximize} \quad t_{6}
subject to:
(1)
t1=μt_{1} = {\boldsymbol{\mu}}^\top
(2)
t2=t1wt_{2} = {t_{1}} {\mathbf{w}}
(3)
t3=φquad(w,C4×4)t_{3} = \varphi^{\text{quad}}({\mathbf{w}}, {C_{4\times 4}})
(4)
t4=γt3t_{4} = {\gamma} \odot {t_{3}}
(5)
t5=t4t_{5} = -{t_{4}}
(6)
t6=t2+t5t_{6} = {t_{2}} + {t_{5}}
(7)
t7=φΣ(w)t_{7} = \varphi^{\Sigma}({\mathbf{w}})
constraints:
[1]
Equality1×1\text{Equality} \quad 1\times 1
[2]
Inequality4×1\text{Inequality} \quad 4\times 1

Relaxed Smith Form

maximizet6\operatorname{maximize} \quad t_{6}
subject to:
(1)
t1=μt_{1} = {\boldsymbol{\mu}}^\top
(2)
t2=t1wt_{2} = {t_{1}} {\mathbf{w}}
(3)
t3φquad(w,C4×4)t_{3} \geq \varphi^{\text{quad}}({\mathbf{w}}, {C_{4\times 4}})
(4)
t4=γt3t_{4} = {\gamma} \odot {t_{3}}
(5)
t5=t4t_{5} = -{t_{4}}
(6)
t6=t2+t5t_{6} = {t_{2}} + {t_{5}}
(7)
t7=1wt_{7} = \mathbf{1}^\top {\mathbf{w}}
constraints:
[1]
Equality1×1\text{Equality} \quad 1\times 1
[2]
Inequality4×1\text{Inequality} \quad 4\times 1

Conic Form

maximizet6\operatorname{maximize} \quad t_{6}
subject to:
(1)
t1=μt_{1} = {\boldsymbol{\mu}}^\top
(2)
t2=t1wt_{2} = {t_{1}} {\mathbf{w}}
(3)
t3P1/2w22 via eigendecompositionSOCt_{3} \geq \lVert P^{1/2} {\mathbf{w}} \rVert_2^2 \text{ via eigendecomposition} \to \text{SOC}
(4)
t4=γt3t_{4} = {\gamma} \odot {t_{3}}
(5)
t5=t4t_{5} = -{t_{4}}
(6)
t6=t2+t5t_{6} = {t_{2}} + {t_{5}}
(7)
t7=1wt_{7} = \mathbf{1}^\top {\mathbf{w}}
constraints:
[1]
Equality1×1\text{Equality} \quad 1\times 1
[2]
Inequality4×1\text{Inequality} \quad 4\times 1

Standard Cone Form

minx  12xPx+qxs.t.Aeqx=beq,    Fxg\min_{\mathbf{x}} \; \tfrac{1}{2}\mathbf{x}^\top P\mathbf{x} + \mathbf{q}^\top\mathbf{x} \quad \text{s.t.} \quad A_{\text{eq}}\mathbf{x} = \mathbf{b}_{\text{eq}}, \;\; F\mathbf{x} \leq \mathbf{g}
QuantityValue
Variables (n)4
Constraints (m)1
nnz(A)4
Density100.0%
nnz(P)16

Variable Mapping

Solver indicesNameOrigin
x[1:4]wuser variable (4x1)

Block Structure of A

rows 1–11 rows · equalities{0}1\{0\}^{1}
rows 2–54 rows · inequalitiesR+4\mathbb{R}_+^{4}

Solver Data

Data as seen by OSQP
12xPx+qxs.t.Aeqx=beq,    Fxg\tfrac{1}{2}\mathbf{x}^\top P\mathbf{x} + \mathbf{q}^\top\mathbf{x} \quad \text{s.t.} \quad A_{\text{eq}}\mathbf{x} = \mathbf{b}_{\text{eq}}, \;\; F\mathbf{x} \leq \mathbf{g}

Matrix Summaries

P
Shape: 4 × 4
nnz: 16 (100.0%)
q
Type: vector, length 4
nnz: 4
Range: [-0.1200, -0.03000]
A_eq
Shape: 1 × 4
nnz: 4 (100.0%)
b_eq
Type: vector, length 1
nnz: 1
Range: [1.000, 1.000]
F_ineq
Shape: 4 × 4
nnz: 4 (25.0%)
g_ineq
Type: vector, length 4
nnz: 0
Range: [0.000, 0.000]

Sparsity Pattern of A