Learn R Programming

convexjlr (version 0.8.1)

problem_creating: Create optimization problem

Description

Create different kinds of optimization problems with targets and constraints.

Usage

minimize(...)

maximize(...)

satisfy(...)

Arguments

...

optimization targets and constraints.

Examples

Run this code
# NOT RUN {
    convex_setup()
    x <- Variable(4)
    b <- J(c(1:4))
    p <- minimize(sum((x - b) ^ 2), x >= 0, x <= 3)
    p <- maximize(-sum((x - b) ^ 2), x >= 0, x <= 3)
    p <- satisfy(sum((x - b) ^ 2) <= 1, x >= 0, x <= 3)
# }

Run the code above in your browser using DataLab