Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

problem-parts

Parts of a Problem


Description

Get and set the objective, constraints, or size metrics (get only) of a problem.

Usage

objective(object)

objective(object) <- value

constraints(object)

constraints(object) <- value

size_metrics(object)

Arguments

object

A Problem object.

value

The value to assign to the slot.

Value

For getter functions, the requested slot of the object. x <- Variable() prob <- Problem(Minimize(x^2), list(x >= 5)) objective(prob) constraints(prob) size_metrics(prob)

objective(prob) <- Maximize(sqrt(x)) constraints(prob) <- list(x <= 10) objective(prob) constraints(prob)


CVXR

Disciplined Convex Optimization

v1.0-10
Apache License 2.0 | file LICENSE
Authors
Anqi Fu [aut, cre], Balasubramanian Narasimhan [aut], David W Kang [aut], Steven Diamond [aut], John Miller [aut], Stephen Boyd [ctb], Paul Kunsberg Rosenfield [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.