The Maximize class.
This class represents an optimization objective for maximization.
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)
expr |
A scalar Expression to maximize. |
object |
A Maximize object. |
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.
expr
A scalar Expression to maximize.
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.