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

Maximize-class

The Maximize class.


Description

This class represents an optimization objective for maximization.

Usage

Maximize(expr)

## S4 method for signature 'Maximize'
canonicalize(object)

## S4 method for signature 'Maximize'
is_dcp(object)

## S4 method for signature 'Maximize'
is_dgp(object)

Arguments

expr

A scalar Expression to maximize.

object

A Maximize object.

Methods (by generic)

  • canonicalize: Negates the target expression's objective.

  • is_dcp: A logical value indicating whether the objective is concave.

  • is_dgp: A logical value indicating whether the objective is log-log concave.

Slots

expr

A scalar Expression to maximize.

Examples

x <- Variable(3)
alpha <- c(0.8,1.0,1.2)
obj <- sum(log(alpha + x))
constr <- list(x >= 0, sum(x) == 1)
prob <- Problem(Maximize(obj), constr)
result <- solve(prob)
result$value
result$getValue(x)

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.