Lecture 13: Assignment 2 Discussion#
Holiday-Special Train Scheduling Problem
The operations team of the Southern Indian Railways wants to schedule holiday-special trains, each with a capacity of 1500 passengers and operational cost of ₹150/km, between Chennai and Hyderabad to cater to the increased passenger demand during the Pongal festival. The surge in passenger demand for the three days prior to the festival is expected to be 10k, 15k, and 12k passengers, respectively. Using the formulation developed in the previous assignment, answer the following questions.
Transform the constraints into a system of equations. (2)
Objective:
\[ \min_{x_1, x_2, x_3} \ z = 150(x_1 + x_2 + x_3) \]Subject to:
\[\begin{split} \begin{aligned} x_1 & \geq 6.67 \\ x_2 & \geq 10 \\ x_3 & \geq 8 \\ x_1, x_2, x_3 & \in \mathbb{Z}_+ \end{aligned} \end{split}\]Transforming the problem,
Objective:
\[ \min_{x_1, x_2, x_3} \ z = 150(x_1 + x_2 + x_3) \]Subject to:
\[\begin{split} \begin{aligned} x_1 & = 6.67 + s_1 \\ x_2 & = 10 + s_2 \\ x_3 & = 8 + s_3 \\ x_1, x_2, x_3 & \in \mathbb{R}_+ \\ s_1, s_2, s_3 & \geq 0 \end{aligned} \end{split}\]Note
Each equation carries 1/3 marks
Relaxing the integer constraint on \(x_i\)’s apply the Simplex method. (4)
Here, we have a system of 3 equations with 3 decision and 3 slack variables. Hence, we will set 3 variables as non-basic to evaluate the values for the remaining 3 as basic variables, and consequently compute the objective function value.
Non-Basic Variables
Basic Variables
Decision Variable \(\\(x_1, x_2, x_3)\)
Slack Variable \(\\(s_1, s_2, s_3)\)
Is Basic Feasible Solution?
Objective Function Value
\(x_1, x_2, x_3\)
\(s_1, s_2, s_3\)
0, 0, 0
-6.67, -10, -8
No
-
\(s_1, x_2, x_3\)
\(x_1, s_2, s_3\)
6.67, 0, 0
0, -10, 8
No
-
\(x_1, s_2, x_3\)
\(s_1, x_2, s_3\)
0, 10, 0
-6.67, 0, -8
No
-
\(x_1, x_2, s_3\)
\(s_1, s_2, x_3\)
0, 0, 8
-6.67, -10, 0
No
-
\(s_1, s_2, x_3\)
\(x_1, x_2, s_3\)
6.67, 10, 0
0, 0, -8
No
-
\(s_1, x_2, s_3\)
\(x_1, s_2, x_3\)
6.67, 0, 8
0, -10, 0
No
-
\(x_1, s_2, s_3\)
\(s_1, x_2, x_3\)
0, 10, 8
-6.67, 0, 0
No
-
\(s_1, s_2, s_3\)
\(x_1, x_2, x_3\)
6.67, 10, 8
0, 0, 0
Yes
3.705k
Note
Each row of the table carries 1/2 marks
Report the optimal solution assuming that \(x_i\)’s hold integer values. (2)
The optimal solution necessitates Indian Railways to run 7, 10, and 8 trains to run on the three days prior to the festival, resulting in ₹2.3625m in operational costs.
Delhi-Chennai High-Speed Rail Problem
The National High Speed Rail Coroporation (NHRC) plans to operate two types of high-speed bullet trains, \(\text{T}_1\) and \(\text{T}_2\), between Delhi and Chennai, cutting down travel time between two cities from 32 hours to less than 12 hours. Here, \(\text{T}_1\) is an executive service train with a capacity of 800 passengers and an operational cost of ₹250/km, stopping at Vijaywada, Nagpur, Bhopal, and Agra on its way from Chennai to Delhi. On the other hand, \(\text{T}_2\) is an economy service train with a capacity of 1200 passengers and an operational cost of ₹200/km, having additional stops at Gudur, Balharshah, and Jhansi. To ensure a smooth level of service (95%) against an uncertain demand that follows a normal distribution with a mean of 5000 passengers and a standard deviation of 500, and yet maintain operational profitability, NHRC plans to run at most 3 trains daily, for both, executive and economy service. For this problem,
Formulate the primal optimisation problem. (3)
Objective:
\[ \min_{x_1, x_2} \ z = 250x_1 + 200x_2 \]Subject to:
\[\begin{split} \begin{aligned} 800x_1 + 1200x_2 & \geq 5000 + 500z_{0.95} \\ x_1 & \leq 3 \\ x_2 & \leq 3 \\ x_1 & \in \mathbb{Z}_+ \\ x_2 & \in \mathbb{Z}_+ \end{aligned} \end{split}\]Note
Each equation carries 1/2 marks
Formulate the dual optimisation problem. (3)
Objective:
\[ \max_{y_1, y_2, y_3} \ z = 5820y_1 + -3y_2 + -3y_3 \]Subject to:
\[\begin{split} \begin{aligned} 800y_1 - y_2 & \leq 250 \\ 1200y_1 - y_3 & \leq 200 \\ y_1 & \geq 0 \\ y_2 & \geq 0 \\ y_3 & \geq 0 \end{aligned} \end{split}\]Note
Each equation carries 1/2 marks
Attach two spreadsheets, one solving the primal optimisation problem and the other solving the dual optimisation problem. (10)
Note
An appropriately labeled sheet carries 1 mark, while a functioning solver carries 4 marks
Interpret the resulting dual variables. (3)
import numpy as np
from scipy.optimize import linprog
# Cost Parameter
c = [250, 200]
# Constraint Parameter (Coefficients)
a = [[800, 1200], [-1, 0], [0, -1]]
# Constraint Parameter (Limits)
b = [5820, -3, -3]
# Domain Constraints
x1_bounds = (0, None)
x2_bounds = (0, None)
bounds = [x1_bounds, x2_bounds]
integrality = [1, 1] # Relaxed integer constraint
# Solve
result = linprog(np.array(c), A_ub=-np.array(a), b_ub=-np.array(b), bounds=bounds, integrality=integrality, method='highs')
print(f"Optimal number of executive service trains: {round(result.x[0], 3)}, economy service trains: {round(result.x[1], 3)} | Minimum cost: {round(result.fun, 3)} ")
# Dual Domain Constraints
y1_bounds = (0, None)
y2_bounds = (0, None)
y3_bounds = (0, None)
bounds = [y1_bounds, y2_bounds, y3_bounds]
integrality = [0, 0, 0]
# Solve Dual
result = linprog(-np.transpose(b), A_ub=np.transpose(a), b_ub=np.array(c), bounds=bounds, integrality=integrality, method='highs')
print(f"Shadow price for passenger demand: {round(result.x[0], 3)}, executive train fleet size: {round(result.x[1], 3)}, economy train fleet size: {result.x[2]}")
Optimal number of executive service trains: 3.0, economy service trains: 3.0 | Minimum cost: 1350.0
Shadow price for passenger demand: 0.312, executive train fleet size: 0.0, economy train fleet size: 175.0
Note
Interpretation of each dual variable carries 1 mark
With integer constraints relaxed, perform cost senstivity analysis on the primal problem. [Hint: draw the isocost lines and feasible region to answer the following questions]
Find the ratio \(c_1/c_2 = r\) that renders infinite solutions (1)
\(c_1/c_2 = 800/1200 = 0.667\)
For \(c_1/c_2 < r\), find the optimal solution (1)
\(x_1, x_2 = 3, 2.85\)
For \(c_1/c_2 > r\), find the optimal solution (1)
\(x_1, x_2 = 2.775, 3\)