Maximize-class {CVXR}R Documentation

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)

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)

[Package CVXR version 1.0-14 Index]