checkAddOptCut: Method for checking/adding optimality cuts to master-problem

Description Usage Arguments Value Author(s) Examples

Description

Additional arguments to the checkAddOptCut-method pertinent to the defined S4-classes in this package are detailed below.

Usage

1
2
## S4 method for signature 'CDEPD'
checkAddOptCut(object, x, theta, Rhs = NULL)  

Arguments

object

CDEPD: ordinarily returned by a call to DEP().

x

vector: The values for the decision variables of the master problem

theta

numeric: The value of the recourse function.

Rhs

NULL or matrix: By default the rhs-constraints are computed for a given value of \mathbf{x} by invoking createRhsSubLP(). Otherwise, a suitable matrix object.

Value

list: Returns a list-object with named elements DEP for the "CDEPD" object, SubLPOpt a list itself with the solved sub-problems and status taking a value of 1 if an optimality has been added to the master-problem, or 0 if not.

Author(s)

Bernhard Pfaff

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
##
## Birge & Louveaux
## Chapter 5, Section 1.a, 
##
## Master problem
obj <- c(100, 150)
A <- matrix(c(1, 1,
              1, 0,
              0, 1),
            ncol = 2, nrow = 3, byrow = TRUE)
dir <- c("<=", ">=", ">=")
rhs <- c(120, 40, 20)
MLP <- LPD(obj, A, dir, rhs)
MLP
## Defining vectors and matrices for second stage
W <- matrix(c(6, 10,
              8, 5,
              1, 0,
              0, 1),
            ncol = 2, byrow = TRUE)
Tech <- matrix(c(-60, 0,
               0, -80,
               0, 0,
               0, 0),
             ncol = 2, byrow = TRUE)
## scenario 1
ss1obj <- c(-24, -28)
h1 <- c(0, 0, 500, 100)
## scenario 2
ss2obj <- c(-28, -32)
h2 <- c(0, 0, 300, 300)
## probabilities
p <- c(0.4, 0.6)
## combining objective and absolute rhs values
q <- rbind(ss1obj, ss2obj)
h <- rbind(h1, h2)
## Creating DEP object
OC <- DEP(MP = MLP, q = q, W = W, h = h, Tech = Tech, prob = p)
OC <- addTheta(OC)
x <- getDecVar(solveLPD(MLP))
OC1Cut <- checkAddOptCut(OC, x = x, theta = -Inf)
getMP(OC1Cut$DEP)

TSSP documentation built on May 2, 2019, 4:56 p.m.

Related to checkAddOptCut in TSSP...