| ECOS_setup | R Documentation |
Creates an ECOS workspace that can be solved, updated with new numerical data, and solved again without repeating the expensive symbolic analysis phase. This is useful for parametric optimization, model predictive control, and other settings where the problem structure stays the same but data changes.
ECOS_setup(
c,
G,
h,
dims = list(l = integer(0), q = NULL, e = integer(0)),
A = NULL,
b = numeric(0),
control = ecos.control()
)
c |
the coefficients of the objective function; the length of
this determines the number of variables |
G |
the inequality constraint matrix in one of three forms: a
plain matrix, simple triplet matrix, or compressed column
format, e.g. dgCMatrix-class. Can also be
|
h |
the right hand side of the inequality constraint. Can be empty numeric vector. |
dims |
is a list of three named elements: |
A |
the optional equality constraint matrix in one of three
forms: a plain matrix, simple triplet matrix, or compressed
column format, e.g. dgCMatrix-class. Can be
|
b |
the right hand side of the equality constraint, must be
specified if |
control |
is a named list that controls various optimization parameters; see ecos.control. |
an external pointer of class "ecos_workspace".
Must eventually be freed via ECOS_cleanup or R
garbage collection.
ECOS_solve, ECOS_update,
ECOS_cleanup, ECOS_csolve
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.