maximum: Maximum - Accessor and Mutator Functions

Description Usage Arguments Value Examples

View source: R/maximum.R View source: R/maximum.R

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

1
2
3
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

1
2
3
4
5
6
7
8
## 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)

Example output

ROI: R Optimization Infrastructure
Registered solver plugins: nlminb, clp, glpk, neos, qpoases.
Default solver: auto.
[1] TRUE

ROI documentation built on Aug. 29, 2020, 3:01 p.m.

Related to maximum in ROI...