Chapter 13: Linear Optimization

Exercise 1:

Valencia Products makes automobile radar detectors and assembles two models: LaserStop and SpeedBuster. The firm can sell all it produces. Both models use the same electronic components. Two of these can be obtained only from a single supplier. For the next month, the supply of these is limited to 4,000 of component A and 3,500 of component B. The number of each component required for each product and the profit per unit are given in the table.

Components Required/Unit
A B profit/unit
LaserStop 18 6 $24
SpeedBuster 12 10 $40
  1. Identify the decision variables, objective function, and constraints in simple verbal statements.

  2. Mathematically formulate a linear optimization model.


Step 1: Formulate the Linear programming Model

X1: LaserStop

X2: SpeedBuster

Maximize:

Z = 24X1 + 40X2

SUBJECT TO:

18X1 + 12X2 <= 4000

6X1 + 10x2 <= 3500

Step 2: Using lpSolve package of R to solve

library(lpSolve)
obj.fun <- c(24, 40) 
constr <- matrix(c(18, 12, 6, 10), ncol = 2, byrow= TRUE) 
constr.dir <- c("<=", "<=") 
rhs <- c(4000, 3500)

prod.sol <- lp("max", obj.fun, constr, constr.dir, rhs, compute.sens = TRUE, all.int=TRUE)
prod.sol
## Success: the objective function is 13320
prod.sol$solution #decision variables values
## [1]   0 333

Conclusion: should not produce LaserStop & produce 333 SpeedBusters. Maximum is 13320.