forked from bodono/scs-matlab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scs_direct.m
39 lines (39 loc) · 1.34 KB
/
scs_direct.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function [x, y, s, info] = scs_direct(data, cone, params)
% Operator-splitting method for solving cone problems (direct)
%
% This implements a cone solver. It solves:
%
% min. c'x
% subject to Ax + s = b
% s \in K
%
% where x \in R^n, s \in R^m
%
% this uses the direct linear equation solver version of SCS
%
% K is product of cones in this particular order:
% free cone, lp cone, second order cone(s), semi-definite cone(s), primal
% exponential cones, dual exponential cones
%
% data must consist of data.A, data.b, data.c, where A,b,c used as above.
%
% cone struct must consist of:
% cone.f, length of free cone (for equality constraints)
% cone.l, length of lp cone
% cone.q, array of SOC lengths
% cone.s, array of SD lengths
% cone.ep, number of primal exp cones
% cone.ed, number of dual exp cones
%
% Optional fields in the params struct are:
% alpha : over-relaxation parameter, between (0,2).
% rho_x : momentum of x term (1e-3 works well)
% max_iters : maximum number of ADMM iterations.
% eps : accuracy of solution
% verbose : verbosity level (0 or 1)
% normalize : heuristic data rescaling (0 or 1, off or on)
% scale : rescales data up by this factor (only used if normalize=1)
%
% to warm-start the solver add guesses for (x, y, s) to the data struct
%
error ('scs_direct mexFunction not found') ;