Operations Research and Analysis

466 Views Asked by At

A sports manufacturer produces two products: footballs and baseballs. These products can be produced either during the morning shift or the evening shift. The cost of manufacturing the football and the baseball in the morning shift is \$20 each and the cost of manufacturing the football and the baseball in the evening shift is \$25 each. The amounts of labor, leather, inner plastic lining, and demand requirements are given as follows:

Resource Football Baseball

        Labor (hours/unit)                               0.75                      2    

        Leather (pounds/unit)                         7                         15    

        Inner plastic lining (pounds/unit)       0.5                        2    

        Total demand (units)                         1500                1200   

Based on the information about the company, we know that the maximum labor hours available in the morning shift and evening shifts are $5000$ hours and $2000$ hours, respectively, per month. The maximum amount of leather available for the morning shift is $15000$ pounds per month and $14000$ pounds per month for the evening shift. The maximum amount of inner plastic lining available for the morning shift is $2000$ pounds per month and $1500$ pounds per month for the evening shift.

Solve the given problem scenario so as to minimize the production cost and determine the number of footballs and baseballs made by this company

**************My attempt:

I got the answer as $0$ for the footballs on the morning shift.

1

There are 1 best solutions below

0
On BEST ANSWER

Such problems can be efficiently solved via mixed integer programming:

Let $x_1$ be the number of footballs produced in the morning shift, $x_2$ the number of baseball in the morning shift, $x_3$ the number of football in the evening shift and $x_4$ the number of baseball in the evening shift. These are our decision variables in our mixed-integer linear program.

Our aim is to minimize the following objective function:

$$\min_{x_1,x_2,x_3,x_4} 20(x_1+x_2) +25(x_3+x_4)$$

Since the number of labor hours is limited for both shifts, we have to add the following constraints:

$$0.75x_1 +2 x_2 \leq 5000$$ $$0.75x_3 +2 x_4 \leq 2000$$

Moreover, the amount of leather available in the shifts is also limited. We, hence, need to add the following constraints:

$$7x_1 +15x_2 \leq 15000$$ $$7x_3 +15x_4 \leq 14000$$

Likewise, we need to add constraints for the use of inner plastic lining:

$$0.5x_1 +2x_2 \leq 2000$$ $$0.5x_3 +2x_4 \leq 1500$$

Even though you did not mention it in the text, there is information about the total demands of baseballs and footballs which have to be produced. This can be modeled via the following two constraints:

$$x_1+x_3 \geq 1500$$ $$x_2+x_4 \geq 1200$$

This will make sure that the demands are at least met. If you would want them to be met exactly you can replace $\geq$ with =. Since we are minimizing the produciton costs, however, writing $\geq$ is just as good as writing =.

Lastly, we do not want to produce fractions of baseballs or footballs but we only want to produce integer numbers. So, we add

$$x_1,x_2,x_3,x_4 \in \mathbb{Z}.$$

The whole program thus is:

$$\min_{x_1,x_2,x_3,x_4} 20(x_1+x_2) +25(x_3+x_4)$$ $$0.75x_1 +2 x_2 \leq 5000$$ $$0.75x_3 +2 x_4 \leq 2000$$ $$7x_1 +15x_2 \leq 15000$$ $$7x_3 +15x_4 \leq 14000$$ $$0.5x_1 +2x_2 \leq 2000$$ $$0.5x_3 +2x_4 \leq 1500$$ $$x_1+x_3 \geq 1500$$ $$x_2+x_4 \geq 1200$$ $$x_1,x_2,x_3,x_4 \in \mathbb{Z}.$$

Such problems can, for example, be easily solved with R. An R code which solves the above problem with the package lpsolve is

library(lpSolve)
#Let x_1 be the number of footballs produced in the morning shift, x_2 the number of baseball in the morning shift,
#x_3 the number of football in the evening shift and x_4 the number of baseball in the evening shift. These are our
#decision variables in our mixed-integer linear program
#Vector of objective function
objective <- c(20,20,25,25)
#Matrix of constraints
const.mat <- matrix(c(0.75,2,0,0,
               0,0,0.75,2,
               7,15,0,0,
               0,0,7,15,
               0.5,2,0,0,
               0,0,0.5,2,
               1,0,1,0,
               0,1,0,1),nrow = 8, byrow = TRUE)
#Directions of each constraints
const.dir <- c(rep("<=",6),rep(">=",2))
#Right hand side of constraints
const.rhs <- c(5000,2000,15000,14000,2000,1500,1500,1200)
#To tell the solver that we want each number of balls produced we can use the option all.int = TRUE
#Solve problem
Solution <- lp(direction = "min", objective.in = objective, const.mat = const.mat,const.dir = const.dir, const.rhs = const.rhs, all.int = TRUE)
#Total costs:
Solution #Success: the objective function is 60355 
#Number of balls:
Solution$solution
#805 624 695 576
#Hence, we need to produce 805 footballs and 624 baseballs in the morning shift and 695 footballs and 576 baseball in the evening shift.

Such problems can of course also be solved with the help of commerical solvers such as CPLEX, Gurobi or XPress. I used R because it is free and thus easily reproducible for anyone.