Learn R Programming

convexjlr (version 0.8.1)

cvx_optim: Solve optimization problem

Description

cvx_optim solves optimization problem using Convex.jl.

Usage

cvx_optim(p, solver = c("SCS", "ECOS"), ...)

Arguments

p

optimization problem to be solved.

solver

convex problem solver to be used. Currently convexjlr supports SCS and ECOS, with SCS solver as the default.

...

the optional solver options, like the maximal iteration times. For the solver options, you can see http://www.cvxpy.org/tutorial/advanced/index.html#setting-solver-options for reference.

Value

status of optimized problem.

Examples

Run this code
# NOT RUN {
    convex_setup()
    x <- Variable()
    b <- 1
    p <- minimize(sum((x - b) ^ 2))
    cvx_optim(p)
# }

Run the code above in your browser using DataLab