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

get_problem_data

Get Problem Data


Description

Get the problem data used in the call to the solver.

Usage

get_problem_data(object, solver, gp)

Arguments

object

A Problem object.

solver

A string indicating the solver that the problem data is for. Call installed_solvers() to see all available.

gp

(Optional) A logical value indicating whether the problem is a geometric program.

Value

A list containing the data for the solver, the solving chain for the problem, and the inverse data needed to invert the solution.

Examples

a <- Variable(name = "a")
data <- get_problem_data(Problem(Minimize(exp(a) + 2)), "SCS")[[1]]
data[["dims"]]
data[["c"]]
data[["A"]]

x <- Variable(2, name = "x")
data <- get_problem_data(Problem(Minimize(p_norm(x) + 3)), "ECOS")[[1]]
data[["dims"]]
data[["c"]]
data[["A"]]
data[["G"]]

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.