Lecture 13: Assignment 2 Discussion

Lecture 13: Assignment 2 Discussion#

  1. 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:

    minx1,x2,x3 z=150(x1+x2+x3)

    Subject to:

    x16.67x210x38x1,x2,x3Z+

    Transforming the problem,

    Objective:

    minx1,x2,x3 z=150(x1+x2+x3)

    Subject to:

    x1=6.67+s1x2=10+s2x3=8+s3x1,x2,x3R+s1,s2,s30

    Note

    Each equation carries 1/3 marks

  • Relaxing the integer constraint on xi’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 (x1,x2,x3)

    Slack Variable (s1,s2,s3)

    Is Basic Feasible Solution?

    Objective Function Value

    x1,x2,x3

    s1,s2,s3

    0, 0, 0

    -6.67, -10, -8

    No

    -

    s1,x2,x3

    x1,s2,s3

    6.67, 0, 0

    0, -10, 8

    No

    -

    x1,s2,x3

    s1,x2,s3

    0, 10, 0

    -6.67, 0, -8

    No

    -

    x1,x2,s3

    s1,s2,x3

    0, 0, 8

    -6.67, -10, 0

    No

    -

    s1,s2,x3

    x1,x2,s3

    6.67, 10, 0

    0, 0, -8

    No

    -

    s1,x2,s3

    x1,s2,x3

    6.67, 0, 8

    0, -10, 0

    No

    -

    x1,s2,s3

    s1,x2,x3

    0, 10, 8

    -6.67, 0, 0

    No

    -

    s1,s2,s3

    x1,x2,x3

    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 xi’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.


  1. Delhi-Chennai High-Speed Rail Problem

    The National High Speed Rail Coroporation (NHRC) plans to operate two types of high-speed bullet trains, T1 and T2, between Delhi and Chennai, cutting down travel time between two cities from 32 hours to less than 12 hours. Here, T1 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, T2 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:

    minx1,x2 z=250x1+200x2

    Subject to:

    800x1+1200x25000+500z0.95x13x23x1Z+x2Z+

    Note

    Each equation carries 1/2 marks

  • Formulate the dual optimisation problem. (3)

    Objective:

    maxy1,y2,y3 z=5820y1+3y2+3y3

    Subject to:

    800y1y22501200y1y3200y10y20y30

    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 c1/c2=r that renders infinite solutions (1)

      c1/c2=800/1200=0.667

    • For c1/c2<r, find the optimal solution (1)

      x1,x2=3,2.85

    • For c1/c2>r, find the optimal solution (1)

      x1,x2=2.775,3