CIVL2170 Assignment 4 2024
CIVL2170 Assignment 4 2024
Question 1:
An contractor wants to assign six veteran workers to seven new jobs. Each worker can only work
on 1 job and each job should receive no more than 1 worker. The amount of profit that each worker
can earn for the employer by doing each of the job is listed as below:
Worker B 40 50 30 45 20 40 30
Worker C 60 30 50 20 25 35 50
Worker D 35 75 60 25 20 25 20
Worker E 55 30 20 35 65 40 40
Worker F 55 35 25 20 30 35 60
This contractor wants you to help her find the optimal assignment solution to maximize the
total profit. Please formulate the above problem. Write the objective function and all the
constraints. You need to clearly define all the decision variables and explain the physical
meanings of the objective function and all the constraints. You do not need to solve it.
Solution:
decis ion var
:
λ A, ,
\n ;
,
λ ci ,
Xx: , XE : ,
λf ! i= 1 ,
2
,
"
…
,
A) ota ( 42 rav ,
: MUX + + +
(i 1 A }
…
= 2
,
茅 XD =
1 , ,
!
Constraint fumctiom :
÷ XA : =|
冬 XEi
1
=
亭 ×B ; = 1
1
敦 Fi =
予× (
÷Xa
1
= =
ci :
A, B C( D/ E , F, ⼭ )
号 X; 4
= 1
Cj =
,
亭 ×;
1
=
1
{
÷ X;
=
5
l
亭 X;z =
容 ; 6
* = 1
亭 ×js
l
=
1
亭 Xs ^=
xij = o
or
1 Vi j ,
Question 2:
A building owner plans to purchase air-conditioners for five office buildings. The demands of
the five office buildings are 50 units, 30 units, 50 units, 30 units, and 40 units, respectively.
Seller I and Seller II can supply air-conditioners to five office buildings, and they need to order
air-conditioners from two air-conditioner producers, P1 and P2. The available number of air-
conditioners that each producer can supply is 100.
P1 60 70
P2 80 50
The unit transportation and installation costs from sellers to office buildings are:
Unit cost A B C D E
Seller I 25 30 20 20 10
Seller II 40 15 20 25 20
Please formulate a LP model to minimize the total cost of the air-conditioner supply. You need
to clearly define all the decision variables and explain the physical meanings of the objective
function and all the constraints. You do not need to solve it.
Solution:
decisiom var .
:
X 13 ,
X,4
,
X 23
,
X 24 , Xsi , Xai ( i = A , B, , D ,
(
E
)fotal 14 var. constraint function : X 13 + X ,4 = 100
E
-
D
c
XaB -
X4 L -X -X4
4 E=
D
X 3A + X4 A =5
X 3⽇ + X4 B =
30
Xsc tX4<= 50
X3D + X 4D = 30
X3E 4 X4E = 40
X1 s , 14 (i= )
2 ,
23
,
24 3 i
, ,
4! ≥0 AB ,
C
,
D, E
Question 3:
Consider a city with the following simplified airline networks. Each node represents an airport.
The travel times of arcs connecting two airports are presented in the graph below. A
businessman at airport 1 plans to travel to airport 7. He is trying to find out the best travel route
to minimize the total travel time.
(a) Please formulate this problem with LP formulation. You need to clearly define all the
decision variables and explain the physical meanings of the objective function and all the
constraints.
Solution:
= 3 X , 2 +4 X 14 + 4 + 3 X24 +2 X25 6 X 36 +
objectivefunctiou : min z
Xa 3 +2Xs +
coustraintfanctiou : X2 + X , 4 =
1
X +5 -
X46 -
X 67 =
-
1
Xz 3 + X24 + Xa + -X 2 =
X31 +X 36 -X23 -X 43 =
X54 X
25- X05 -Xa 5 =
= 0
X65 + X07 - X30 - X46
X25 =
Xrs , 24 X 31, 36 1X 3
X .2 ,
14 9 , 05 ,
43 , 40 ,47 1X 54 1X5 , 0 ⼦ 1 X25 20
or
Xij = 0
@
了 4 ∞
是⼀
∞
l 1
⼀
3 ⼦ 4 5 ∞
2 |
2 . 2
* —
4 了
1
⼦
2 41 台年 10
4
5 个 五个台 G 1
φ
了 ⼦ 5 6 9
6 |
2 4 2 4 6
了 ⼦ 4 元 9
了 |
2 1 4 6
3 5 6
9
6 ⼦ . 三 台 2 4 6
! .
Shortest Path : 1 → 4 6
→
→ 7 , min t = G
unietiome