You are on page 1of 3

M ONASH U NIVERSITY

ECE3093

.
Semester 1 Assignment 2: Planning for Melbourne in 2050 Sem 2023

Submission Details
This assignment is due on Moodle by 11:55pm on Monday May 1, 2023. You are required to submit
1. A PDF file of your report (using the template that has been provided).
2. A ZIP file containing your codes. Your code needs to include enough comments and appropriate naming
conventions so that it is obvious which parts of the code were used for which parts of the assignment.
Note: you are not required to use M ATLAB, however, you are required to provide codes regardless of your
choice of programming language. This is an individual assignment – whilst you are free to discuss the assign-
ment with your colleagues, your submission must be your own work.

Provided Files
The following files are provided:
1. Ass2-Melb2050.pdf: questions & instructions for this assignment.
2. Ass2-template.docx: Word template for your report.
3. Ass2-data.xlsx: Excel workbook with data and worksheets for generating the graphs from the solutions
you have computed. The worksheets, ‘Task1’, ‘Task2’, and ‘Task3’, correspond to Parts I, II, and III of
the assignment, respectively.

Motivation
When planning for Melbourne in the year 2050, one thing is clear: urban congestion is going to be a major
problem. Trucks moving goods across the greater Melbourne area cause a significant part of this congestion.
It might be possible to significantly reduce the congestion by increasing the use of railways to move goods.
To do this, a number of intermodal exchanges (IMEXs) have to be built in the greater Melbourne area, where
containers or goods can be transferred between trains and trucks for the “last mile” movement to the final
destination. Where should such IMEXs be built? Which suburbs should be served by each IMEX?
Mathematical optimisation allows us to answer such questions. This assignment involves both modelling (that
is determining how to translate a problem into mathematics) and implementation of optimisation algorithms to
get a solution. We will work through a series of models of increasing complexity. Throughout this assignment,
you will be dealing with a single data set that represents a set of locations around Melbourne (based on SA2
data from the Australian Bureau of Statistics) and a predicted demand in terms of truckloads.
We assume movement by train to/from each IMEX is
“free”. That is, we assume the cost of rail transport is
the same irrespective of where we locate the centre so
that we can ignore the rail cost. This is not unreasonable
as we are focusing on the congestion from trucks, and
for rail the handling cost for transferring to/from trucks
is more significant than the cost of moving the contain-
ers. Of course, there are many other issues and costs we
could consider when deciding the locations of IMEXs.
Here we will start simple and work towards more com-
plex and realistic models. For the customers we simply
have a number of points that represent areas, such as a
postcode or in our case an SA2 (Statistical Area Level Representation of customers in Melbourne
2, as defined by the Australian Bureau of Statistics).
Notation: Throughout the assignment, we use the following:
• n is the number of locations to be served
• N = {1, 2, . . . , n} is the set of locations
• (xi , yi ) are the coordinates of the ith demand location, measured in km from an arbitrary zero
• qi is the number of truckloads (quantity) to be moved to or from location i

I. Locating a Single IMEX Using (Squared) Euclidean Distances


The simplest location problem is to locate a single IMEX in the plane, given demand at a set of points. If we
assume Euclidean (straight line) distances to a single IMEX located at the point (u, v), then the total travel
distance (truck km) incurred in moving goods is given by the function
n
X p
f (u, v) = qi (u − xi )2 + (v − yi )2 .
i=1

To make this more tractable we are going to start by considering a slightly different objective, which is based
on the square of the distances (truck km2 ). This has the added advantage that it discourages long truck trips
much more than short ones (doubling the length quadruples the cost). Hence, we have
n
X
qi (u − xi )2 + (v − yi )2 .

f (u, v) =
i=1

We wish to determine the location (u, v) for which the cost is minimised, i.e., we seek min f (u, v).
u,v

(a) How many local & global minima does the function f possess? Explain your answer. [2 marks]

(b) Find a formula for calculating an optimal IMEX location. [2 marks]

(c) Compute a (global) optimal solution using the data in the ‘Task1’ worksheet. Input your answer into
the ‘Task1’ worksheet to generate a plot. Include both the coordinates of the IMEX and the plot in your
report. [2 marks]

II. Locating a Single IMEX Using Manhattan Distances


For cities such as Melbourne (or Manhattan, New York) where the streets largely form a grid, using straight-line
distances does not really make sense. The distance a truck has to travel is essentially the sum of the distance
in the x direction and the distance in the y direction. This type of distance measure is called the Manhattan
distance. A nice property of this is that all routes have the same distance provided trucks never travel away
from their destination. Using it we can define a more accurate measure
n
X
g(u, v) = qi (|u − xi | + |v − yi |)
i=1

of the truck kilometres that would be incurred from locating a single IMEX at (u, v).
(a) Formulate min g(u, v) as a linear program. Briefly explain the variables and constraints. [4 marks]
u,v

(b) Write down the dual. Specify the dual variables and to which constraints they correspond. [4 marks]

(c) Compute the optimal location (either by solving the primal or dual problem) using the data in the ‘Task2’
worksheet. Input your answer into the ‘Task2’ worksheet to generate a plot. Include both the coordinates
of the IMEX and the plot in your report. [4 marks]
III. Locating Multiple IMEXs
In practice, we want multiple IMEXs to be located in the greater Melbourne area. Now we need to decide
both the location of these IMEXs and how to allocate each customer to these IMEXs. If we denote with k(i)
the index number, identifying the IMEX to which customer i is allocated and (uk , vk ) the location of the k th
IMEX, then the problem of optimally locating p such IMEXs becomes
n
X 
min h(u, v, k) = qi xi − uk(i) + yi − vk(i) , such that k(i) ∈ {1, 2, . . . , p} for i = 1, 2, . . . , n
u,v,k
i=1

We will seek the best location and allocations for each centre for the case p = 5.
Before we begin, observe that for fixed u, v (positions of the IMEXs) each customer would allocate to the
nearest IMEX (based on the Manhattan distance). On the other hand, for fixed k (allocations) we can find the
best IMEX location in each cluster (set of customers i with same k(i)) by solving the location problem from
the previous question. Now complete the following tasks.
(a) Write code to start with a random allocation vector, k, of length n with each element of k taken from
{1, 2, . . . , p}, and alternate between (i) finding the best locations (u, v) for each group of customers,
and (ii) changing k to allocate each customer to the closest IMEX. Repeat until the solution remains
unchanged. (Remember: your code must be submitted and should be easy to read.) [5 marks]

(b) Analyse the above algorithm by discussing: (i) Is the function h convex? (ii) Can the algorithm cycle or
is it guaranteed to terminate? (iii) Is the final solution optimal? Give reasons. (iv) What happens if the
algorithm is started with a different random starting point? [4 marks]

(c) Report the best solution to the 5 IMEX allocation problem (use ‘Task3’ of the Excel workbook). Include
the coordinates of the 5 IMEXs and the graph in your report. Hint: I will accept any solution for which
the objective value is below 25,000. [5 marks]

IV. Modeling Extensions


If you were working as a modeller for the Victorian Department of Transport, you would be dealing with
significantly bigger data sets. However, the types of mathematical models we have discussed would still be
valid and could be written in the same linear programming notation (with bigger values for n, p, etc). While
you would not be using Excel to do this kind of exercise (nor perhaps Matlab), the mathematical modelling
skills are exactly the same. We have gone through a series of models of increasing complexity. What aspects
of the model in Part III are still unrealistic? What additional data or model features should be considered in
deciding the locations of the IMEXs? [4 marks]

You might also like