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

QUESTION 1:

Decision Variables:

Let us define the following decision variables:

$x_1$ = 1 if Item 1 is included in the baggage, 0 otherwise.

$x_2$ = 1 if Item 2 is included in the baggage, 0 otherwise.

$x_i$ = 1 if Item i (where i ranges from 3 to 10) is included in the baggage, 0 otherwise.

Objective Function:

We want to maximize the total utility of the items included in the baggage. Thus, the objective function
can be defined as:

Maximize $Z = 10x_1 + 12x_2 + 9x_3 + 13x_4 + 8x_5 + 7x_6 + 7x_7 + 11x_8 + 14x_9 + 12x_{10}$

Constraints:

The weight of the baggage should not exceed the limit of 15 kgs. Thus, the constraint can be defined as:

$3x_1 + 2x_2 + x_3 + 2x_4 + 3x_5 + 4x_6 + 2x_7 + x_8 + 6x_9 + 4x_{10} \leq 15$

If Item 1 is included, Item 2 should also be included. This can be expressed as:

$x_1 \leq x_2$

Since Item 2 has a weight of 2 kgs, we should not include Item 2 if Item 1 is not included. This can be
expressed as:

$x_2 \leq x_1$

All decision variables should be binary (0 or 1):

$x_i \in {0,1}$ for i = 1,2,...,10

Thus, the complete optimization problem can be expressed as:

Maximize $Z = 10x_1 + 12x_2 + 9x_3 + 13x_4 + 8x_5 + 7x_6 + 7x_7 + 11x_8 + 14x_9 + 12x_{10}

Subject to:

$3x_1 + 2x_2 + x_3 + 2x_4 + 3x_5 + 4x_6 + 2x_7 + x_8 + 6x_9 + 4x_{10} \leq 15$

$x_1 \leq x_2$

$x_2 \leq x_1$

$x_i \in {0,1}$ for i = 1,2,...,10


QUESTION 2:

In total, we have 8 decision variables in this optimization problem.

min 𝑧 =5𝑥12 + 6𝑥13 + 2𝑥23 + 10𝑥25 + 11𝑥34 + 2𝑥45 + 9𝑥46 + 8𝑥56

Subject to: 𝑥12 + 𝑥13 = 1 We should select either 2 or 3 if are currently in 1 𝑥56 + 𝑥46 = 1 If you in Node
6, you came from either 4 or 5 𝑥12 = 𝑥23 + 𝑥25 Number of arrivals should be equal to the number of
leaves 𝑥13 + 𝑥23 = 𝑥34 𝑥34 = 𝑥45 + 𝑥46 𝑥25 + 𝑥45 = 𝑥56 𝑥𝑖𝑗 ∈ {0, 1}

Notes: • 𝑥12 = 𝑥23 + 𝑥25

• 0 = 0 + 0 → If you are not in the 2nd node, you will not leave it!

• 1 = 1 + 0 → You are in node 2, and you decide to go to the node 3 • 1 = 0 + 1 → You are in node 2, and
you decide to go to the node 5 • Notes: • 𝑥13 + 𝑥23 = 𝑥34 • $ 0 + 0 = 0 →$ If you are not 3th node, you
will not leave it!

• $ 1 + 0 = 1 →$ You are in Node 3, you came from node 1, you should leave it by arriving the 4th node

• $ 0 + 1 = 1 →$ You are in Node 3, you came from node 2, you should leave it by arriving the 4th node

min 𝑧 =5𝑥12 + 6𝑥13 + 2𝑥23 + 10𝑥25 + 11𝑥34 + 2𝑥45 + 9𝑥46 + 8𝑥56

Subject to: 𝑥12 + 𝑥13 = 1 We should select either 2 or 3 if are currently in 1

𝑥56 + 𝑥46 = 1 If you in Node 6, you came from either 4 or 5

𝑥12 = 𝑥23 + 𝑥25 Number of arrivals should be equal to the number of leaves

𝑥13 + 𝑥23 = 𝑥34

𝑥34 = 𝑥45 + 𝑥46

𝑥25 + 𝑥45 = 𝑥56

𝑥𝑖𝑗 ∈ {0, 1}
QUESTION 3:

• At least 1 lamp should be activated if the street is short!!!

• 4− 10is short, 6 − 9 is short, 7−8 is short, the remaining streets are called long.

• Lets create the decision variables:

• 𝑥1 , 𝑥2 , …, 𝑥11 are binary (decision) variables for candidate locations of 1, 2, …, 13.

• The mathematical optimization problem: min 𝑧 =𝑥1 + 𝑥2 + 𝑥3 + 𝑥4 + 𝑥5 + 𝑥6 + 𝑥7 + 𝑥8 + 𝑥9 + 𝑥10 + 𝑥11

Subject to: 𝑥4 + 𝑥10 ≥ 1 𝑥8 + 𝑥2 = 1 𝑥1 + 𝑥2 + 𝑥3 ≥ 2 𝑥4 + 𝑥5 ≥ 2 𝑥6 + 𝑥7 + 𝑥8 + 𝑥9 ≥ 2 𝑥10 + 𝑥5 + 𝑥6 +


𝑥10 ≥ 2 𝑥3 + 𝑥4 + 𝑥9 + 𝑥13 ≥ 2 𝑥𝑖 ∈ {0, 1} 𝑖 = 1, 2, … , 11

You might also like