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

maximum

Maximum - Accessor and Mutator Functions


Description

The maximum of a given optimization problem (OP) can be accessed or mutated via the method 'maximum'. If 'maximum' is set to TRUE the OP is maximized, if 'maximum' is set to FALSE the OP is minimized.

Usage

maximum(x)

maximum(x) <- value

Arguments

x

an object used to select the method.

value

an R object.

Value

a logical giving the direction.

Examples

## maximize: x + y
## subject to: x + y <= 2
## x, y >= 0
x <- OP(objective = c(1, 1), 
        constraints = L_constraint(L = c(1, 1), dir = "<=", rhs = 2),
        maximum = FALSE)
maximum(x) <- TRUE
maximum(x)

ROI

R Optimization Infrastructure

v1.0-0
GPL-3
Authors
Kurt Hornik [aut], David Meyer [aut], Florian Schwendinger [aut], Stefan Theussl [aut, cre], Diethelm Wuertz [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.