Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Solutions- Tutorial 1 2019

Problem 1 :

Decision variables :

Let :

X1 : the number of TVs to keep in stock

X2 : the number of radios to keep in stock

Objective Function:

Max Z= 60 X1 + 20 X2

Subject to:

10 X1 +4 X2 ≤ 200 [Floor space constraint]

X2 ≥ 0.6 (X1 +X2) [Marketing requirement]

200X1 +50X2 ≤ 3000 [capital constraint]

X1 , X2 ∈ Z+ [Integrality constraint]

Problem 2:

Decision Variables:

Let:

X1: quantity of food 1 to buy per week in pounds

X2: quantity of food 2 to buy per week in pounds

Objective Function:

Min Z= 7 X1 + X2

Subject to:

3 X1 + X2 ≥ 84 [weekly requirement of vitamin A]

X1 + X2 ≥ 42 [weekly requirement of vitamin C]

X1, X2 ≥ 0 [non-negativity constraints]


Solutions- Tutorial 1 2019

Problem 3:

Decision variables:

Xi: number of cars of type i to produce every month

i = {1, 2}, 1 for sedans, 2 for sports cars.

Objective Function:

Max Z= *2 241X1 + **3 323X2 * Unit profit for sedans = Price – labor cost =
2345 – (16*3.5) – (15*2)-(12*1.5) = 2241
Subject to:
** Unit profit for sports cars =3456-(16*4)-
• Workshop 1 constraint : (15*3)-(2*12) =3323

3.5X1+4X2 ≤ 1500

• Workshop 2 constraint :

2X1+3X2 ≤ 2 000

• Demand Constraint for Sedans :

X1 ≥ 120

• Non negativity constraints :


X1, X2 ≥ 0
• Integrality constraints :
X1 , X2 are integers

Compact Form:

Parameters:

• Pi: unit profit for car of type i


• Rij : labor time required by car of type i in workshop j
• Availablej : available time at workshop j
• Demandi : demand for car of type i

Objective function:

Max Z= ∑𝑖 Pi ∗ Xi

s.t For j=1,..,3 : ∑𝑖 𝑅𝑖𝑗 ∗ 𝑋𝑖𝑗 ≤ 𝐴𝑣𝑎𝑖𝑙𝑎𝑏𝑙𝑒𝑗


X1 ≥ Demand1

∀ i, Xi ≥ 0

∀ i, Xi ∈ Z+ ( integers)
Solutions- Tutorial 1 2019

Problem 4:

• The Simple Form :


Decision variables :

Xi: the amount of money to be invested in investment type i

Y: the amount of money to be borrowed

The Objective Function:

→ we maximize the total expected value of assets at the end of the planning period (1
year)

Max Z= 1.18X1+1.10X2+1.02X3+1.09X4+1.04X5+1.20X6 - 1.12Y

Subject to :

→ Total amount invested should not exceed the amount available + the amount borrowed:

X1+X2+X3+X4+X5+X6 – Y ≤ 300000

→ The amount borrowed should not exceed 100,000

Y ≤ 100000

→ The expected value of assets (exclusive interest) at the end of the planning period should
be at least 7 % higher than at the beginning:

1.18X1+1.10X2+1.02X3+1.09X4+1.04X5+1.20X6 ≥ 1.07(X1+X2+X3+X4+X5+X6 )

→ Invest at least 50 % of all the money invested in stocks and bonds combined:

X4+X5+X6 ≥ 0.5 (X1+X2+X3+X4+X5+X6 )

→ Invest no more than 20 % of total amount available (excluding the amount


borrowed) in real estate and silver combined:

X1+X2 ≤ 0.2*300000 ➔ X1+X2 ≤ 60000

→ The average risk of the portfolio should not exceed 10:

20X1+12X2+X3+7X4+3X5+30X6 ≤ 10(X1+X2+X3+X4+X5+X6 )

→ Non-negativity constraints:

X1, X2, X3, X4, X5, X6, Y ≥ 0


Solutions- Tutorial 1 2019

• The Compact Form :

Let :

INTi : the expected annual interest or dividend for investment type i

Value_inci : the expected annual value increase for investment type i

i = {1,….,6}

Riski : the average risk per dollar for investment type i

Objective Function:

→ we maximize the total expected value of assets at the end of the planning period (1 year)

Max Z= (∑i Xi *(1+INTi +Value_inci)) – (1+0.12)*Y

Or we define another parameter

Vi = 1+INTi +Value_inci and the objective function becomes:

Max Z= (∑i Xi *(1+Vi)) – (1+0.12)*Y

Subject to:

• Total amount invested should not exceed the amount available + the amount borrowed:

∑i Xi ≤ ( 300,000 +Y)

• The amount borrowed should not exceed 100,000

Y ≤ 100,000

• The expected value of assets (exclusive interest) at the end of the planning period should be at
least 7 % higher than at the beginning

∑i Xi *(1 +Vi ) ≥ (1+0.07)* ∑i Xi

• Invest at least 50 % of all the money invested in stocks and bonds combined:

X4+ X5+ X6 ≥ 0.5* ∑i Xi

→ This could be done differently:

We define the binary constant: status_1i, it takes two values 1 or 0, for assets 4, 5 and 6
(stocks and bonds) the corresponding status_1i takes the value of 1, for the rest of the assets it
takes the value of zero, (check the excel file), the constraint becomes:

∑i (Xi * status_1i ) ≥ 0.5* ∑i Xi


Solutions- Tutorial 1 2019

• Invest no more than 20 % of total amount available (excluding the amount borrowed) in real
estate and silver combined

X1+X2 ≤ 0.2*300,000

Following the same logic as the previous constraint, we define the binary constant status_2i ,
the constraint becomes:

∑i (Xi * status_1i ) ≤ 60,000

• The average risk of the portfolio should not exceed 10.

∑i Xi*Riski ≤ 10*∑i Xi

• Non-negativity constraints :

∀ i , Xi ≥ 0

Y≥0

Problem 5:

Parameters and sets:

• Projects: the set of the proposed projects , projects={1,2,3,4,5}


• ExpBenefiti : expected benefit of project i
• Years: set of years , Years ={1,2,3,4,5}
• Costij : cost of project i in year j
• Fundj : available funds for year j

Decision variables:

1 𝑖𝑓 𝑝𝑟𝑜𝑗𝑒𝑐𝑡 𝑖 𝑖𝑠 𝑐ℎ𝑜𝑠𝑒𝑛
Let: 𝑋𝑖 = {
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Objective Function:

max ∑ ExpBenefit i ∗ 𝑋𝑖
𝑖∈𝑝𝑟𝑜𝑗𝑒𝑐𝑡𝑠

Subject to:

∀ j ∈ years ; ∑𝑖∈𝑝𝑟𝑜𝑗𝑒𝑐𝑡𝑠 𝐶𝑜𝑠𝑡𝑖𝑗 ∗ 𝑋𝑖 ≤ 𝐹𝑢𝑛𝑑𝑗

∀ i ∈ Projects ; Xij ∈ {0,1}

1) At least one of the projects 1 and 2 must be accepted


X1 + X2 ≥ 1
Solutions- Tutorial 1 2019

2) At most one of the projects 1 and 2 must be accepted


X1 + X2 ≤ 1

3) Project 3 cannot be accepted unless project 2 is accepted


X3 ≤ X2

4) Project 3 cannot be accepted unless at least one of the projects 2 and 4 is accepted
X3≤ X2 + X4

5) Project 2 cannot be accepted unless at least two of the projects 5,3 and 4 are accepted

2X2 ≤ X3 + X4+ X5

6) 3 projects at most must be accepted


X1 + X2+ X3 + X4+ X5 ≤ 3

7) At least 3 projects must be accepted

X1 + X2+ X3 + X4+ X5 ≥ 3

Problem 6:

Parameters:

• We consider : m squads to whom n cases are assigned

• Tij is the average number of days spent by squad i on case j

The decision variables:

1 𝑖𝑓 𝑐𝑎𝑠𝑒 𝑗 𝑖𝑠 𝑎𝑠𝑠𝑖𝑔𝑛𝑒𝑑 𝑡𝑜 𝑠𝑞𝑢𝑎𝑑 𝑖


Let: 𝑋𝑖𝑗 = {
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
The Objective Function:

[Minimize the total time required to conclude the cases]

Min 𝑍 = ∑ ∑ 𝑋𝑖𝑗 . 𝑇𝑖𝑗


𝑖 𝑗

Subject to:

[Only 1 squad can be assigned to each case]

For j= 1,.., n ; ∑𝑚
𝑖=1 𝑋𝑖𝑗 = 1

[Each squad has to work on exactly 1 case]

For i= 1,.., m ; ∑𝑛𝑗=1 𝑋𝑖𝑗 = 1


Solutions- Tutorial 1 2019

[Xij is binary ]

Xij ∈{ 0,1}

Problem 7:

Decision variables:

Let: 𝑋𝑖𝑗 = the pounds of oranges of type i (type 1 = grade 9 and type 2= grade 6) used to
produce product j (product 1=oranges sold in bags, product 2= orange juice)

Model in the simple form:

(Net profit for product 1: 50cents-20cents=30cents or 0.3$, Net profit for product: $1.50-
$1.05=45cents or 0.45$)

Max Z= 0.3X11 +0.3X21+0.45X12 +0.45X22

→ Max Z= 0.3*( X11 +X21)+0.45*(X12 +X22)

Subject to

[Availability Constraints for grade 9 and grade 6 oranges in pounds]

[For grade 9]

X11 +X12 ≤ 100 000

[For grade 6]

X21 +X22 ≤ 120 000

[the average quality for oranges sold in bags must be at least 7]

9X11 + 6 X21 ≥ 7*(X11 + X21) → 2X11 – X21 ≥ 0

[the average quality for oranges used in orange juice must at least 8]

9X12+ 6X22 ≥ 8*(X12+ X22) → X12 – 2X22 ≥ 0

[Non-negativity constraint]

X11 , X12, X21, X22 ≥ 0

Model in the compact form:

Parameters:

• Pj : Profit for product j , j={1,2}


• Availablei : Quantity in pounds of oranges of grade i
Solutions- Tutorial 1 2019

• RQj : Required average quality for oranges used in product j


• Qi: quality (grade) of oranges of type i , Q1= 9 , Q2=6

Objective Function

Max 𝑍 = ∑𝑖𝑗 𝑋𝑖𝑗 . 𝑃𝑗

Subject to :

[Availability]

∑2𝑗=1 𝑋𝑖𝑗 ≤ 𝐴𝑣𝑎𝑖𝑙𝑎𝑏𝑙𝑒𝑖 , ∀ 𝑖

[Quality]
2 2
∑ 𝑋𝑖𝑗 ∗ 𝑄𝑖 ≥ ∑ 𝑋𝑖𝑗 ∗ 𝑅𝑄𝑗 , ∀ 𝑗
𝑖=1 𝑖=1


2
∑ 𝑋𝑖𝑗 ∗ (𝑄𝑖 − 𝑅𝑄𝑗 ) ≥ 0 , ∀ 𝑗
𝑖=1

[Non-negativity]

Ɐ i , Ɐ j , 𝑋𝑖𝑗 ≥ 0

You might also like