Examples for 'boot::simplex'


Simplex Method for Linear Programming Problems

Aliases: simplex

Keywords: optimize

### ** Examples

# This example is taken from Exercise 7.5 of Gill, Murray and Wright (1991).
enj <- c(200, 6000, 3000, -200)
fat <- c(800, 6000, 1000, 400)
vitx <- c(50, 3, 150, 100)
vity <- c(10, 10, 75, 100)
vitz <- c(150, 35, 75, 5)
simplex(a = enj, A1 = fat, b1 = 13800, A2 = rbind(vitx, vity, vitz),
        b2 = c(600, 300, 550), maxi = TRUE)
Linear Programming Results

Call : simplex(a = enj, A1 = fat, b1 = 13800, A2 = rbind(vitx, vity, 
    vitz), b2 = c(600, 300, 550), maxi = TRUE)

Maximization Problem with Objective Function Coefficients
  x1   x2   x3   x4 
 200 6000 3000 -200 


Optimal solution has the following values
  x1   x2   x3   x4 
 0.0  0.0 13.8  0.0 
The optimal value of the objective  function is 41400.

[Package boot version 1.3-28.1 Index]