MGMT 306
Purdue University
\[ \begin{aligned} \max\quad& 3x_{1} + 2x_{2}\\ \text{s.t.}\quad& 3x_{1} + x_{2} \leq 9\\ & x_{1} + 3x_{2} \leq 7\\ & -x_{1} + x_{2} \leq 1\\ & x_{1}, x_{2} \geq 0 \text{ and integer}\\ \end{aligned} \]


\[ \begin{aligned} \max\quad& 3x_{1} + 2x_{2}\\ \text{s.t.}\quad& 3x_{1} + x_{2} \leq 9\\ & x_{1} + 3x_{2} \leq 7\\ & -x_{1} + x_{2} \leq 1\\ & x_{1}, x_{2} \geq 0 \end{aligned} \]

| Expected daily use | Cost ($) | Land req’d (acres) | |
|---|---|---|---|
| Swimming pool | 450 | 300,000 | 2 |
| Tennis center | 150 | 100,000 | 3 |
| Athletic field | 500 | 250,000 | 7 |
| Gymnasium | 550 | 400,000 | 3 |
| S | T | Statement | \(S+T\leq 1\) |
|---|---|---|---|
| 0 | 0 | True | True |
| 0 | 1 | True | True |
| 1 | 0 | True | True |
| 1 | 1 | False | False |
| T | G | Statement | \(T - G \leq 0\) |
|---|---|---|---|
| 0 | 0 | True | True |
| 0 | 1 | True | True |
| 1 | 0 | False | False |
| 1 | 1 | True | True |
\[\begin{aligned} &S &&\text{whether we build a swimming pool}\\ &T &&\text{whether we build a tennis court}\\ &A &&\text{whether we build an athletic field}\\ &G &&\text{whether we build a gymnasium} \end{aligned}\] \[\begin{aligned} \max\quad&450 S + 150 T + 500 A + 550 G &\text{(exp daily use)}\\ \text{s.t.}\quad&300 S + 100 T + 250 A + 400 G \leq 800 &\text{(budg. in \$K)}\\ &2 S + 3 T + 7 A + 3 G \leq 13 &\text{(acreage constraint)}\\ &S + T \leq 1 &\text{(not both S and T)}\\ &T – G \leq 0 &\text{(if T, then G)}\\ &S, T, A, G \text{ are binary} \end{aligned}\]


Suppose \[ \begin{aligned} &A\quad\text{whether to advertise on Amazon}\\ &B\quad\text{whether to advertise on Bing} \end{aligned} \]
“We must advertise on Amazon” can be modeled as constraint: \[A = 1\]
“We may not advertise on Amazon” can be modeled as constraint: \[A = 0\]
We must advertise on Amazon and Bing
Truth table
| A | B | A and B |
|---|---|---|
| 0 | 0 | False |
| 0 | 1 | False |
| 1 | 0 | False |
| 1 | 1 | True |
Can be modeled as \(\qquad A + B = 2 \qquad\text{or}\qquad A=1,\, B=1\)
We must advertise on Amazon or Bing
Truth table
| A | B | A or B |
|---|---|---|
| 0 | 0 | False |
| 0 | 1 | True |
| 1 | 0 | True |
| 1 | 1 | True |
Can be modeled as \(\qquad A + B \geq 1\)
We must advertise on either Amazon or Bing exlusively
Truth table
| A | B | A xor B |
|---|---|---|
| 0 | 0 | False |
| 0 | 1 | True |
| 1 | 0 | True |
| 1 | 1 | False |
Can be modeled as \(\qquad A + B = 1\)
If we advertise on Amazon, then we must advertise on Bing
Truth table
| A | B | If A, then B |
|---|---|---|
| 0 | 0 | True |
| 0 | 1 | True |
| 1 | 0 | False |
| 1 | 1 | True |
Can be modeled as \(\qquad A \leq B\)
Example of a covering problem
| Route no. | Route | Cost |
|---|---|---|
| 1 | A-C-D | 10 |
| 2 | A-D-E | 12 |
| 3 | A-B-E | 12 |
| 4 | B-C-E | 13 |
| 5 | B-D-E | 11 |
| 6 | C-D-E | 9 |
| 7 | A-B | 7 |
| 8 | B-C | 8 |
| 9 | D-E | 8 |
With a neighbor, write linear constraints modeling the following requirments:
| Labor (hrs) | Cloth (sq. yd.) | Revenue ($) | Rental cost ($/week) | |
|---|---|---|---|---|
| Dresses | 3 | 4 | 15 | 200 |
| Shorts | 2 | 3 | 8 | 150 |
| Pants | 6 | 4 | 14 | 100 |
| Available | 150/week | 160/week |
Variables: \[\begin{aligned} &D &&\text{number of dresses to produce/week}\\ &S &&\text{number of shorts to produce/week}\\ &P &&\text{number of pants to produce/week}\\ &R_D &&\text{whether or not we rent dress machinery}\\ &R_S &&\text{whether or not we rent shorts machinery}\\ &R_P &&\text{whether or not we rent pants machinery} \end{aligned}\]
Objective: \[\max\qquad 15 D + 8 S + 14 P – 200 R_D – 150 R_S – 100 R_P\qquad\text{(total profit)}\]
Standard “allocation type” constraints \[\begin{aligned} &3 D + 2 S + 6 P \leq 150 &&\text{(labor)}\\ &4 D + 3 S + 4 P \leq 160 &&\text{(cloth)}\\ &D, S, P \geq 0 &&\text{(nonnegativity)} \end{aligned}\]
Binary/integer constraints \[\begin{aligned} &D,S,P\text{ are integers} &&\text{(Integer constraints)}\\ &R_D,R_S,R_P\text{ are binary} &&\text{(Binary constraints)} \end{aligned}\]
If we do not rent dress machinery, then we may not produce dresses
\[\begin{aligned} &D\geq 0 \text{ and integer}\\ &R_D \text{ binary} \end{aligned} \]
Suppose \(M\) is a big number and consider the constraints
Add \(D\leq M \cdot R_D\)
This works if \(M\) is large enough so we don’t cut off optimal solution
“What is the maximum number of dresses we can produce?”
| Labor (hrs) | Cloth (sq. yd.) | Revenue ($) | Rental cost ($/week) | |
|---|---|---|---|---|
| Dresses | 3 | 4 | 15 | 200 |
| Shorts | 2 | 3 | 8 | 150 |
| Pants | 6 | 4 | 14 | 100 |
| Available | 150/week | 160/week |
Objective: \[\max\qquad 15 D + 8 S + 14 P – 200 R_D – 150 R_S – 100 R_P\qquad\text{(total profit)}\]
Constraints \[\begin{aligned} &3 D + 2 S + 6 P \leq 150 &&\text{(labor)}\\ &4 D + 3 S + 4 P \leq 160 &&\text{(cloth)}\\ &D – 40 R_D \leq 0 &&\text{(linking constraint dresses)}\\ &S – 53 R_S \leq 0 &&\text{(linking constraint shorts)}\\ & P – 25 R_P \leq 0 &&\text{(linking constraint pants)}\\ &D,S,P\geq 0\text{ and integer}\\ &R_D,R_S,R_P\text{ are binary} \end{aligned}\]
Still missing: two logical constraints
If shorts machinery, then at least 40 shorts should be produced per week
\[\begin{aligned} &S\leq 53 R_S\\ &S\geq 0 \text{ and integer}\\ &R_S \text{ binary} \end{aligned} \]
Add: \[S \geq 40 R_S\]
If pants machinery is rented, then at most 30 dresses should be produced per week.
\[\begin{aligned} &D\geq 0 \text{ and integer}\\ &R_P \text{ binary} \end{aligned} \]
Add: \[D \leq 40 - 10R_P\]
This works since we know that \(D\leq 50\) at an optimal solution
\[\begin{aligned} \max\qquad &15 D + 8 S + 14 P – 200 R_D – 150 R_S – 100 R_P&&\text{(total profit)}\\ \text{s.t.}\qquad&3 D + 2 S + 6 P \leq 150 &&\text{(labor)}\\ &4 D + 3 S + 4 P \leq 160 &&\text{(cloth)}\\ &D – 40 R_D \leq 0 &&\text{(linking dresses)}\\ &S – 53 R_S \leq 0 &&\text{(linking shorts)}\\ & P – 25 R_P \leq 0 &&\text{(linking pants)}\\ & S - 40 R_S \geq 0 &&\text{(logical 1)}\\ & D + 10 R_P \leq 50 && \text{(logical 2)}\\ &D,S,P\geq 0\text{ and integer}\\ &R_D,R_S,R_P\text{ are binary} \end{aligned}\]
New variable: \[ R_\text{special}\qquad\text{whether to rent special machinery} \]
Constraints: \[\begin{aligned} &D + S \leq 93 R_\text{special}\\ &R_\text{special} \text{ binary} \end{aligned}\]
Suppose \[ \begin{aligned} &A\quad\text{whether to advertise on Amazon}\\ &B\quad\text{whether to advertise on Bing}\\ &C\quad\text{whether to advertise on Comcast}\\ &D\quad\text{whether to advertise on DuckDuckGo} \end{aligned} \]
Four rules:
If A and B and C, then D
If A and B, then C
If A or B or C, then D
If A, then B and C and D
If A, then B or C or D
| Tailor 1 | Tailor 2 | Tailor 3 | Tailor 4 | |
|---|---|---|---|---|
| 1. Wedding gown | 19 | 15 | 20 | 21 |
| 2. Clown costume | 11 | 14 | 16 | 12 |
| 3. Admiral’s uniform | 12 | 8 | 11 | 13 |
| 4. Bullfighter outfit | 15 | 20 | 17 | 18 |
Decision Variables \[\begin{aligned} x_{i,j} \qquad&\text{whether garment $i$ is assigned to tailor $j$}\\ &\text{for $i=1,2,3,4$ and $j=1,2,3,4$} \end{aligned}\]
Objective function \[\min\qquad 19 x_{1,1} + 15 x_{1,2} + 20 x_{1,3} + \dots + 18 x_{4,4}\qquad\text{(total time)}\]
Constraints: \[x_{i,j} \text{ binary for $i=1,\dots,4$ and $j=1,\dots,4$}\]
This combines ideas from “assignment problems” but now adds fixed costs
| Caterer | Flat Fee ($) | Capacity (meals) | Vegetarian ($/meal) | Gluten-Free ($/meal) | Dairy-Free ($/meal) |
|---|---|---|---|---|---|
| Star | 250 | 120 meals | 55 | 55 | 60 |
| Big Blue | 200 | 125 meals | 60 | 40 | 50 |
| Unique Creations | 150 | 65 meals | 120 | 40 | 30 |
Variables \[\begin{aligned} x_i \qquad&\text{whether to hire caterer $i$ for $i=1,2,3$}\\ y_{i,j} \qquad&\text{number of caterer $i$'s menu $j$ to order}\\ &\text{for $i=1,2,3$ and $j=1,2,3$} \end{aligned}\]
Objective \[\begin{aligned} \min\qquad &250 x_1 + 200 x_2 + 150 x_3\\ & + \bigg( 55 y_{1,1} + 55 y_{1,2} + 60 y_{1,3} + \dots + 30 y_{3,3}\bigg)\end{aligned}\qquad \text{(total cost)}\]