ROBYN GOLDSMITH /stor-i-student-sites/robyn-goldsmith PhD Student at the STOR-i Centre for Doctoral Training, ¶¶Ņõ̽̽App Wed, 09 Jun 2021 12:47:47 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 /stor-i-student-sites/robyn-goldsmith/wp-content/uploads/sites/26/2023/11/cropped-RobynPhoto-2-1-32x32.jpg ROBYN GOLDSMITH /stor-i-student-sites/robyn-goldsmith 32 32 Preparing for Take-Off with Trajectory Based Operations! /stor-i-student-sites/robyn-goldsmith/2021/04/16/preparing-for-take-off-with-trajectory-based-operations/?utm_source=rss&utm_medium=rss&utm_campaign=preparing-for-take-off-with-trajectory-based-operations Fri, 16 Apr 2021 14:28:00 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/robyn-goldsmith/?p=477 I think it’s safe to say that we’re all dreaming about the possibility of travelling to exotic locations, soaking up some sunshine and forgetting all about meetings on Microsoft Teams. I know I am! But when millions of tourists do return to the skies how are their flights ensured to get to their destination as safely and efficiently as possible? Enter Trajectory Based Operations, a concept developed as a response to rapid growth in the aviation industry. The aim of this blog post is to introduce you to Trajectory Based Operations in Air Traffic Flow Management in a way that doesn’t send you running for the hills. So please stowaway your tray tables, return your seat to its upright position and let’s get started!

First, let’s introduce Trajectory Based Operations. In a nutshell, this concept involves the management of multiple 4D trajectories – we’re talking longitude, latitude, flight level and time – and their interaction in order to create an efficient air traffic network. Also, part of this concept is that we care a lot about what the airlines have to say, so we want to include their preferences and keep the deviation from these to a minimum.

What we’re doing here can be broken down like this:

  • Given a set of initial trajectories requested by airlines, knowledge of airspace configuration and capacity restrictions
  • We want to find a new set of trajectories
  • Such that airport and airspace sector capacity are satisfied and our system is as efficient as possible.

Also – we want to incorporate airline preferences, minimising the deviation from the trajectories the airlines have requested.

So, wherein lies the problem? Well, one thing that really puts a spanner in the works is that airlines don’t like to disclose information about their preferences because it’s part of their confidential business plans. They can just say, “the new trajectory you’ve given us doesn’t match our preferences” without stating why or what their preferences are – not very helpful if you ask me!

Group aeroplane selfie flying from London Heathrow to New York JFK in 2017, blissfully unaware of Trajectory Based Operations

One way to tackle this problem is to use a multi-objective optimisation model. The model in mathematical notation looks very complex so I’ve spared you the maths anxiety and the eye sore. We’ll ditch the notation and, instead, put it all together in word form.

Multi-Objective Model

Here, the objective function consists of three minimisation objectives: time deviation from the current schedule, route charges and the cost of deviation from airline preferences. The model seeks to minimise these objectives subject to feasibility, the constraints of the airspace and the priorities of the airlines. Our constraints cover all that stuff that ensures there’s no funny space-time continuum antics. This isn’t Back to the Future. Normal, real-world flying permitted only!

The deviation of user preferences in this context is done by assigning a cost to deviation. These costs are generated to reflect some kind of preference factor, like fuel consumption. The model then seeks to minimise the cost of the difference between the fuel consumption of all the original trajectories and the fuel consumption of the new trajectories assigned to the airlines.

We can then go about solving this model with a swanky simulated annealing algorithm to find our new trajectories. Something to keep in mind is that this will give us a good approximation of the Pareto optimal frontier, so multiple approximately optimal solutions. Each will benefit airlines differently, so choosing just one is a challenge in itself! Making this decision is at the forefront of the future research to be conducted in this area – how exciting!

Another approach is to try and extrapolate information about preferences by performing clustering on historical trajectory data (to get a general gist of clustering, you can check out another one of my blog posts here). By doing this, we want to sneakily find out why some trajectories are preferred over others.

Data-driven Approach

The main crux of this approach is to use a density-based clustering algorithm on historical data to obtain similar trajectory clusters. Below, we can see this applied to the European airspace, considering flights from Rome to Paris. In this example, five clusters were found.

S

Once the clusters are found, a decision tree is created. Here, the nodes represent conditions based on flight characteristics e.g. whether the flight is a morning flight or whether the flight uses a specific aircraft model. We then compute for each terminal node, the percentage of flights reaching a terminal nodes from each cluster. Take a look below to see what I mean.

The left-most terminal node states that 1310 flights do not have airline code airI3, nor airline code airI0 and do not belong to an airline of low-cost. We also have that 97% of the time a flight with these characteristics flies a trajectory belonging to the first cluster and only 3% of the time does this kind of flight fly a trajectory belonging to the fourth cluster. The percentage of flights with these attributes flying a trajectory in the second, third and fifth cluster is 0%. These results are interpreted as a preference level, so that a flight with these features (not airline code airI3, not airline code airI0 and do not belong to an airline of low-cost) is said to have a preference level of 97% for a trajectory belonging to the first cluster. This analysis is performed for all terminal nodes of the tree!

These results can then be fed into optimization models that seek to incorporate airline preferences by providing information about preference levels. In particular, feeding models that, for each flight, consist of selecting a trajectory chosen from a set of feasible alternative trajectories!

Me, too tired to think about minimising flight delay but still smiling, at a stop over in LAX on my way home from Fiji after backpacking in Australasia in 2015

So, if you’re lucky enough to be sipping a G+T 30,000ft in the air anytime in the near future, you know a little bit about the methods that got you there! If you’re daring enough to brave the mathematical notation, make sure you check out the original papers in the ‘Want to know more?‘ section below. All that good stuff is in there!

Just got time for my tweet of the week! This weeks’ goes to . Shanice, I feel so seen.

Missed my last post? Check it out here.

Want to know more?

Lancia, C., De Giovanni, L. and Lulli, G. [2019], , in ā€˜Operations Research Proceedings
2018’, Springer, pp. 563–570.

Dal Sasso, V., Fomeni, F. D., Lulli, G. and Zografos, K. G. [2019], ā€˜.’, European Journal of Operational Research
276(2), 676–687.

]]>
A Pandemic Paradox: Being Cautious with COVID-19 Statistics /stor-i-student-sites/robyn-goldsmith/2021/04/02/being-careful-with-covid-19-statistics-simpsons-paradox/?utm_source=rss&utm_medium=rss&utm_campaign=being-careful-with-covid-19-statistics-simpsons-paradox Fri, 02 Apr 2021 10:45:00 +0000 /stor-i-student-sites/robyn-goldsmith/?p=633 TRIGGER WARNING! This blog posts refers to COVID-19 and fatality rate data – if that’s something you’d rather avoid then, not to worry, you can head back here where I have lots of other blog posts for you to read!

We all know that Statistics is a powerful tool that has great significance in the real world. More recently, with coronavirus daily briefings and COVID-19 Statistics dominating the news, everyone one and their mother is a self-proclaimed statistician. Because Statistics inform so many big decisions, when it comes to analysis, we need to tread carefully. After all, things might not always be what they seem at first glance! In this short post, I’m going to introduce the Simpson’s Paradox, a phenomenon in Probability and Statistics.

The Simpson’s Paradox occurs when the same set of data can appear to show different analysis depending on how the data is grouped. This happens because there is what’s known as a lurking variable hidden in the aggregated data. Take a look at the graphs of simulated data below, the graph on the left-hand side separately considers two groups. In this graph, we observe a positive correlation in both groups. In the graph on the right-hand side, all of the data is grouped together and we observe the opposite, a negative correlation.

In real-life examples, this can have detrimental effects. I’ll show you what I mean! Take the next graph. Here, we’re comparing fatality rates for COVID-19 in Italy and China based on different age groups. Notice that for every age range, the fatality rate is higher in China than it is in Italy, suggesting that people in Italy who have COVID-19 are more likely to survive than people in China with COVID-19.

Great. Our analysis is done, no? We can now get carried away reporting these findings and firing all sorts of criticisms at the Chinese health service as we take this analysis as gospel. That’s until we notice the last two bars on this graph. The aggregation of all this data suggests the opposite, that people in China have it better with a lower fatality rate than in Italy. But how on earth can this make sense? Let’s look at another graph:

What is key about this graph is that it shows that there is a significantly larger population of older people with COVID-19 in Italy than in China. This is important because we know that age places a crucial role in the survivability of COVID-19, with younger people more likely to recover.

So, how does this graph help explain our conflicting analyses? Well, there is a statistical link here between each country and the proportion of confirmed cases per age group. In this case, this is our lurking variable, the fatality rate percentages in the first graph hide the numbers of cases within each age group. As Italy has more older people with COVID-19, overall their fatality rate is higher because these people are more at risk of dying than younger people. So, even though for each age group Italy has less deaths than China, the fact that Italy has a much larger number of older people with the virus plays in significantly to the overall figures. Put simply, the larger proportion of confirmed cases among older people in Italy shown along with the fact that elderly people are generally at higher risk of death from COVID-19, explain the discrepancy between the aggregated and categorised data. This is a perfect illustration of Simpson’s Paradox.

Me and my Mum. She has worked for the NHS for over twenty-five years. This week she is receiving her second dose of the COVID-19 vaccine!

This is really important and a clear indication of how we can get the totally wrong idea from the statistics when we’re not paying enough attention. Regarding the pandemic, we’re commonly given country-wide statistics. If we were to group by region or county we may draw vastly different conclusions. Nationally, we could observe a decline in COVID-19 despite a rising number of cases in some areas (which could potentially signal the start of a third wave). This is likely to happen if there are groups with large disparities, such as areas with vastly different populations. A spike in cases in a less dense region is likely to be dwarfed by falling cases in a largely populated area, like London for example, in national data.

There are so many other examples or instances where the Simpson’s Paradox can play a role in hiding information. We have to be careful in the ways we divide data and be mindful of potential lurking variables. You’ve been warned!

That’s it for now! This week’s tweet of the week goes to !

Missed my last post? Check it out here.

Want to know more?

This post is based on the observations of the Simpson’s Paradox found in this paper:

]]>
On the Record: How to Use Gurobi to Solve Linear Programming Problems! /stor-i-student-sites/robyn-goldsmith/2021/03/20/on-the-record-how-to-use-gurobi-to-solve-linear-programming-problems/?utm_source=rss&utm_medium=rss&utm_campaign=on-the-record-how-to-use-gurobi-to-solve-linear-programming-problems Sat, 20 Mar 2021 18:42:00 +0000 /stor-i-student-sites/robyn-goldsmith/?p=568 I have recently learnt how to solve some mathematical programming problems using Gurobi, an optimisation solver, in Python. Before joining the STOR-i programme, I was a complete novice at programming in Python so getting to grips with it is really exciting! One of the problems Gurobi is especially useful for is a standard linear programme. In this blog post, I’m going to introduce how we can use Gurobi in Python to solve linear programming problems.

A trope of a linear programming class is the furniture factory example. No doubt, if you’ve learnt anything before about linear programming you would’ve heard of it. It concerns a factory that makes chairs and tables, with specification on the materials and working hours needed to complete production as well as the profit generated from the production of a table and a chair. The question proposed is, with given constraints on material and working hours, how many chairs and how many tables should be made in order to maximise profit? Not that I’m bored of seeing this problem (I really, really am) but I thought I could illustrate how we can use Gurobi using an alternative example, one inspired by my family’s love of music and my Dad’s very real problem of buying the right boxes to store his extensive record collection.

My family’s jukebox. This one features all the classics including my favourite song to dance to as a kid: Tutti Frutti by Little Richard.

I was brought up surrounded by music, in a house with multiple jukeboxes so my family has a lot of vinyl! They’re our pride and joy and so we want to store them safely in a way that allows us to access them easily (because let’s be honest you never know when you’ll just need to find Spice by the Spice Girls). We have done extensive research across the storage market (makes for thrilling weekend activity I must say) and we have two box contenders. The differences in the boxes are displayed in the table below:

We need to make sure that all seven-hundred of our records are boxed and my Dad wants to buy at least eight boxes so that we have enough space for the records he keeps treating himself to in order to stay sane during the lockdown. As you may have realised, storage is big business, these boxes are expensive, so we want to minimse our cost as much as we can.

Let’s solve this problem and figure out how many of each box to buy. Before you use Gurobi, you’ll have to install it and get a license, more information on that can be found . When you’ve got Gurobi working fine and dandy on your computer the first thing we want to do is set up our model. Here we’ve called our model f and added a label “Records”.

We then create our variables. These are the two different boxes we can buy. As we can’t buy a fraction of a box, we specify that our variables are integers by using vtype=GRB.INTEGER. Other variable types are listed in the Gurobi documentation .

Our objective function is to minimise the cost of buying the boxes. We set the objective of our model f by using .setObjective and include GRB.MINIMIZE to specify that our problem is a minimisation problem. For a maximisation problem, we would alternatively write GRB.MAXIMIZE. Don’t forget to spell the American way!

The constraints of our linear programming problem involve the requirement for all of our records to be placed in a box and that we order at least 8 boxes to ensure there’s room for purchases in the near future. We use .addConstr to add these considerations to our model f.

To solve the problem we use the .optimize() command. To print the variable outcomes we use .getvars().

If we run all of this code in Python we get our solution!

In order to minimise cost, we should buy two of the smaller box, Box 1, and six of the larger box, Box 2. The total cost will be Ā£130. It’s as easy as that!

So what do you reckon? Is Gurobi a sound tool? I think so. This problem might be a simple example but it illustrates how we can use Gurobi to model and solve mathematical programming problems effectively. Be sure to check out the Gurobi tutorials in the Want to Know More section below.

Before I go, I thought I’d share my family’s vinyl collection must-haves just in case you fancy starting your own. But, fair warning, before long you might end up having to spend Ā£130 on some storage boxes!

  • Dan Fogelber – Phoenix
  • David Bowie – Station to Station
  • HAIM – Something to Tell You
  • Buddy Holly – Buddy Holly
  • The Rolling Stones – Sticky Fingers
  • The Animals – The Animals

This week’s tweet of the week goes to with an excellent reminder to step away from the screen once in a while.

Missed my last post? Check it out here.

Want to know more?

Gurobi offer a selection of tutorials to get to grips with the software for linear programming problems. You can find it all at the link below:

]]>
Clustering! /stor-i-student-sites/robyn-goldsmith/2021/03/03/clustering/?utm_source=rss&utm_medium=rss&utm_campaign=clustering Wed, 03 Mar 2021 15:05:00 +0000 /stor-i-student-sites/robyn-goldsmith/?p=509 I don’t know about any of you but to me clustering feels like a foreign concept, at least in the physical sense. Just over a year into a global pandemic, the image of a group of people being in close proximity feels like an alternative reality you’d only see in a sci-fi movie. The only kind of clustering I can be apart of these days is the statistical kind. Not quite as exciting as a mosh pit but arguably more productive. In the statistical sense, clustering is essentially grouping data together based on similar features. These similarities can be anything, depending on the data you are dealing with, from book genres to people’s heights to the types of crime committed in a particular area and just about everything in-between. This statistical analytic technique, found commonly in Machine Learning, is comprised by a number of algorithms. In this post, we’ll take a look at two of these methods.

First, let’s dive into an unsupervised learning algorithm called K-Means clustering. The algorithm for K-Means clustering is relatively simple and goes like this:

  1. Choose a number of clusters.
  2. Place the same number of central points in different locations.
  3. For each data point, evaluate the distance to each centre point. Classify the point to be in the cluster whose centre is closest.
  4. Re-compute the cluster centre by taking a mean of all the vectors classfied to that cluster.
  5. For each data point, re-evaluate the distance to each centre point. And re-classify the point to be in the cluster whose centre is closest.
  6. Repeat steps 4 and 5 until the change in cluster centre is sufficiently small.

K-means clustering has the advantage that it works fast but there is a couple of drawbacks. The randomness of the cluster centres also means that the K-means clustering can fall short in terms of consistency. If we were to repeat the process we may not see the same results. Also, the algorithm requires the specification of the number of clusters before we can begin, which in some cases can be hard to figure out.

Me, in a cluster of foul smelling fans on the last day of Reading Festival 2017.

So, what else is out there? Well, there is also agglomerative hierarchical clustering. It may be a mouthful but it doesn’t require a specification of the number of clusters before the algorithm can start – woohoo! Agglomerative hierarchical clustering is what’s called a bottom-up algorithm which means it treats every single data point as a cluster to begin with. Then, as we move through the process, pairs of clusters merge. The hierarchy of clusters can be shown as a tree where the root is the cluster that contains all the data points.

The algorithm follows these steps:

  1. Treating all data points as a single cluster, define a metric for the similarity between two clusters.
  2. Merge the two clusters with the largest similarity.
  3. Repeat step 3 until there is only one cluster containing all data points or stop when the number of clusters is desirable.

There are a number of difference metrics available of calculating the similarity between clusters and thus which clusters to merge. The centroid method merges the clusters with the most similar average point of all points in a cluster. Alternatively, Ward’s method merges clusters that minimize variance measured by the sum of squares index.

Agglomerative hierarchical clustering gives the freedom for a user to choose a point to stop when the number of clusters look satisfactory. Additionally, various similarity metrics tend to work well for this algorithm. However, unlike K-mean clustering, which has linear complexity, this method has complexity °æ(²Ō³). So it isn’t as efficient.

Clustering methods are important in data mining and machine learning communities and form a powerful statistical technique. I hope this blog post brings together (I swear I don’t find the puns, the puns find me) some of the key info about clustering for you. Look down below for where to go to learn more and check back soon for more blog posts.

Now it’s time for my tweet of the week! This week’s goes to !

Missed my last post? Check it out here.

Want to know more?

Gan, G., Ma, C. and Wu, J., 2020. Data clustering: theory, algorithms, and applications. Society for Industrial and Applied Mathematics.

]]>
Tetris, Markov Decision Processes and Approximate Dynamic Programming /stor-i-student-sites/robyn-goldsmith/2021/02/14/tetris-markov-decision-processes-and-approximate-dynamic-programming/?utm_source=rss&utm_medium=rss&utm_campaign=tetris-markov-decision-processes-and-approximate-dynamic-programming Sun, 14 Feb 2021 13:17:00 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/robyn-goldsmith/?p=429 I recently learnt about Markov Decision Processes (MDPs). These are sequential decision processes, commonly found in the real world where decisions need to be made in an environment with uncertainty. Solving these problems, especially when they are large, is a big challenge. During my research of MDPs, I learnt these processes are pretty much everywhere, present in industries like finance, manufacturing and aviation to name just a few. Although, what I was most excited to discover was that playing a game of Tetris, believe it not, embodies this mathematical framework. As a 90’s baby, becoming freakishly addicted to Tetris felt like a rite of passage. I can remember stealing my sister’s Gameboy and desperately trying to erase her high score before she noticed. I couldn’t wait to write this post but before we dive straight in to the fun of addictive block building, let’s start with the basics.

In decision processes we can have multiple actions that produce different outcomes that have different likelihoods of being selected and resulting benefit. In these processes, a decision maker wants to make the best choices and so a solution is formed by the development of a policy which informs the decision makers on which decisions to make. An MDP is made up of states, actions, transition probabilities and rewards. A transition probability is the probability of changing from one state to another for a given action. The reward is the reinforcement given for taking a specified action. MDPs satisfy the Markovian property, so that the chance of moving from the current state depends only on the current state and not previous states or actions.

Imagine you’re in post-COVID-19 world, in a casino and sitting at a game table. In each round if you choose to play the game you will get a reward of Ā£400 and, with probability two-thirds, the chance to play again. However, with probability one-third the game ends and you have to leave the table. You can also choose not to play and in this case you’ll get a reward of Ā£1000 but you have to leave the table. This example forms the MDP visualised above. The states are ‘at game table‘ and ‘leave game table‘. The blue arrows represent the action ‘play‘ and the green arrow represents the action ‘don’t play‘. The rewards are either Ā£400 or Ā£1000 depending on the action chosen. The probability of transitioning from state ‘at game table‘ to ‘leave game table‘ is 2/3 and 1 for action ‘play‘ and ‘don’t play‘ respectively.

In Tetris, the states are represented by the configurations of the wall and the current falling piece. Actions are formed by the possible orientation and placing options of the current falling piece. The reward is the number of deleted rows and associated points awarded after the placing of the current falling piece. The terminal state of Tetris is the configuration of the wall at maximum height prompting the game to end. The objective is to maximise the number of deleted rows that generate points. Solving this MDP would aim at generating a policy that maximises the expected number of points won during play. So, is everything falling into place? (Sorry, I couldn’t resist.)

Golden Globe Winner Taron Edgerton on the set of the Tetris movie in February 2021, no doubt thinking about Markov Decision Processes.

How do we solve an MDP? Well, for simple examples like the casino game we’d look to Dynamic Programming. This class of algorithms work by breaking down the problem into sub-problems and are effective for relatively small problems. However, for MDPs with a large number of states, like playing a game of Tetris, these methods aren’t enough.

That’s where Approximate Dynamic Programming comes in. These approaches work by taking on a small part of the process and generalising this for the entire decision process. One of these methods is called Value Function Approximation. The aim is to create a function that approximates the value, a measure of how good it is to be in a state, for every state in our MDP. In Value Function Approximation with Linear Methods we approximate the value function by writing it as a linear function of features. These features give us information about the states. In our Tetris example, they tell us about configurations of the wall.

We can then estimate the value of the current state, the current configuration of the wall, by applying the knowledge of how good it is to have the configurations given by the features. We estimate the current state, the current configuration of the wall, by taking a weighted sum of the information provided by the features.

We can use a Stochastic Gradient Descent method which minimises the expected mean square error between the approximate value function and the true value function. With each iteration we update the weights using a simple update rule. We specify a step size and we define an error as the difference between the true value function and our current approximation.

This method will converge to a global optimum and therefore we will successfully get an approximation to the value function. Then we know how good a policy is! How great! Though, in real life things might not be this simple as this as we don’t know the real value function that gives us the error (if we did I’d already be killing it at Tetris). In place of the true value, we use the return, the reward generated, following each state which is an unbiased approximator of the true value. Our error is then given by the difference between this return and our current value approximation. This process is known as Monte Carlo Linear Value Function Approximation.

Many industries have a need to optimise decision making and these problem have the form of a Markov Decision Process. In most of these real world scenarios the problems are so big we need to use approximation methods. This is what makes methods like Value Function Approximation so significant. And who knows, if I had it up my sleeve back in the 90’s maybe I could’ve crushed my sister’s high score!

That’s it for now, just got time for my tweet of the week! This week’s goes to ! Check back soon for more blog posts!

Missed my last post? Check it out here.

Want to know more?

David Silver’s lecture on Value Function Approximation can be found .

M. Hadjiyiannis, 2009.. 

]]>
Scheduling for Minimisation of Risk in Industrial Helicopter Transportation /stor-i-student-sites/robyn-goldsmith/2021/01/31/minimzation-of-takeoff-landing-risk-in-offshore-helicopter-transporation/?utm_source=rss&utm_medium=rss&utm_campaign=minimzation-of-takeoff-landing-risk-in-offshore-helicopter-transporation Sun, 31 Jan 2021 15:45:00 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/robyn-goldsmith/?p=342 Due to lockdown restrictions, that prevent me from coming back to Lancaster, I am currently working from home back in my hometown. Alike many of us, this leaves me short of like-minded people to excitedly discuss my ideas with. So, once I read a really interesting paper about the industrial use of helicopters to transport workers to offshore installations, I shared my enthusiasm with my Dad (who has perfected the art of nodding along). The paper specifically looks at minimising the number of passengers exposed to the most risky phases of travel, takeoffs and landings, using a particular part of Operational Research that I am really interested in, Scheduling. Whilst telling my Dad about what I’d learnt, I was surprised to find out that he had worked on offshore installations as a Field Service Engineer. He told me about his experiences and I was hit with the shocking realisation that, before having me and my sister, my parents actually had their own lives! If you look closely on the photo below you can see the words “Gulf Helicopter” written on the side of the chopper. The images in this post are my Dad’s (thanks, Dad!) and were taken whilst he was working in the Gulf in the early 1980s.

Helicopter landing on a Helipad.

So, how can scheduling minimise the risk for offshore workers like my Dad? First, consider that the takeoff and landing risk is a product of the probability of an accident occurring during takeoff/landing, the total number of people exposed to takeoffs/landings and the probability of a fatal outcome as a result of an accident occurring during takeoff/landing. The former and the latter are assumed probabilities, 0.65 in a million and 1 respectively. Therefore, the takeoff/landing risk is minimised by minimising the number of people exposed to takeoffs/landings. Given a number of installations with varying pickup demand, referring to the number of workers needing to be picked up from an installation, the aim is to find a feasible schedule that collects all the workers and minimises the total number of people exposed to takeoffs and landings.

Let’s consider just a single flight path. So we have one helicopter that has to pick up workers from all installations and we assume that the total pickup demand does not exceed the capacity of the helicopter.

This problem and its solution are identical to the scheduling problem of processing a number of jobs on a single machine with the aim of minimising the total completion time. The solution, proved by Smith in 1956, involves scheduling jobs in the non-decreasing order of their processing times. In the instance of transportation to offshore installations, installations represent the jobs needing to be processed and the number of offshore workers in need of pickup mirror the processing time of these jobs.

So the permutation of installations that minimises the risk can be found by a visiting the installations in order of the number of workers that need to be picked up, from smallest to largest. In the example above, the helicopter starts at the base heliport and should visit the installations in the order, blue, yellow, green and then return to the base. This feels fairly intuitive. We visit the installations with the most people last, as to avoid exposing more people to unnecessary risk of further takeoff and landings. The risk, the total number of people exposed to takeoff/landing risk, is given by adding together the number of workers at the green installation, twice the number of workers at the yellow installation and three times the number of workers at the blue installation. This is because the workers at the blue installation are exposed to a takeoff/landing three times, the workers at the yellow installation two times and those at the green installation just once. The total risk is equal to 29. The risk in terms of the expected number of fatalities can be obtained by multiplying this value by the assumed probability of an accident and the probability of fatality as a result of an accident as defined above.

Imagine now we have more than one helicopter, and thus more than one flight path. How do we decided which helicopter visits which installation and in which order? This problem is identical to a scheduling problem on parallel machines which seeks to minimise the completion time. The machines in this context are represented by the helicopters. The algorithm that solves this problem was proved by Conway, Maxwell and Miller in 1967. The schedule is found by following these steps:

  1. Forming a list of in the installations in non-decreasing order of the number offshore workers needing to be picked up.
  2. Considering installations in this order assign the next installation to the helicopter that has the smallest number of offshore workers currently assigned until there are no installations left.

Take the following example. We have eight installations that need visiting, labelled from A-H, and three helicopters, orange, purple and red.

We organize the list of installations into non-decreasing order.

We schedule flights to installations in the order H, E, F, G, A, B, C, D assigning the next installation to the flight with the least load.

The risk for the flight path of the orange and purple is given by adding together the number of workers at the third installation, twice the number of workers at the second installation and three times the number of workers at the first installation in each of their schedules. The risk for the flight path for the red helicopter is found by adding the number of offshore workers at installation B and twice the number of workers at installation F. The total risk is given by adding up the risk of all flight paths and is therefore equal to 53.

An off-shore installation. The round platform to the right is the helicopter pad.

So, minimising passenger risk during takeoff/landing in this context provides problems with are identical to known scheduling problems! This is great because we already have algorithms to solve so many of these problems. The link between a safe transportation problem and scheduling offers an alternative way for industry to organize the pickup of their workers. This perhaps contrasts to proposed routes found by vehicle routing techniques, for example, with the advantage of prioritising worker safety. The paper that inspired this post considers so many more variations to the pickup problem. I’ll leave details below so be sure to dive in!

Check back soon for more posts! Missed my last one? You can view it here.

My tweet of the week goes to , who, I think, raises a very valid point.

Want to know more?

Conway, M. and Maxwell, W., 1967. Miller, Theory of Scheduling. Reading: Addison Wesley.

Smith, W.E., 1956. Various optimizers for single-stage production. Naval Research Logistics Quarterly3(1-2), pp.59-66.

Here’s the paper this blog post is based on:

Qian, F., Strusevich, V., Gribkovskaia, I. and Halskau, Ƙ., 2015. Minimization of passenger takeoff and landing risk in offshore helicopter transportation: Models, approaches and analysis. Omega51, pp.93-106.

I found the following book really helpful when learning about scheduling models and algorithms:

Pinedo, M., 2012. Scheduling (Vol. 29). New York: Springer.

]]>
Game Theory: ā€œHamlet was totally rational!ā€ /stor-i-student-sites/robyn-goldsmith/2021/01/19/game-theory-hamlet-was-totally-rational/?utm_source=rss&utm_medium=rss&utm_campaign=game-theory-hamlet-was-totally-rational Tue, 19 Jan 2021 19:08:45 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/robyn-goldsmith/?p=311 Hello and welcome! This blog post is my second in a new series of regular posts as part of my journey as an MRes student at the STOR-i Centre for Doctoral Training. Strap in, because boy have I got a big scoop for you!

We know mathematics has successfully elucidated many phenomena, from space travel to climate change, but what about one of the most famously posed questions in the history of literature? Can mathematics really turn its hand to the arts? Cue Shakespeare and his most famous play, Hamlet. Historically, the character Hamlet is regarded as a crazy, irrational protagonist but is he truly mad?

Royal Shakespeare Company’s 2020 production of Hamlet.

Well, in his book , argues not. Using the Theory of Moves he presents an explanation for Hamlet’s famously erratic behaviour. The theory aims to bring a dynamic element to standard Game Theory and strives to better emulate the realistic expectation of humans in strategic situations. As a result, the Theory of Moves postulates that players think ahead to the consequences of countermoves.

The Theory of Moves is bound by certain rules. The first defines an initial state, found at the intersection of a row and column of a payoff matrix, where play begins. Secondly, any player can unilaterally switch their strategy, thereby changing the state of the game from the initial state. In response, the other player can also change the state of the game, by unilaterally switching their strategy. From here, the first player can then choose again to change their strategy and thus the state of the game. This alternation continues until the game ends in a final state, which is the outcome of the game. The final state occurs when the player whose turn it is to switch strategy, chooses not to do so. Further conditions clarify that a player will not choose to change their strategy unless the change moves the game to a state that is preferred by that player and this change is not the initial state. That all may sound pretty confusing so let’s see an example!

Consider the central conflict in Shakespeare’s play between Hamlet and his father’s (the King’s) murderer, Claudius. If we model this conflict in a game-theoretic way we can summarise Hamlet’s strategies as either to expose Claudius as the King’s killer or to remain quiet. Claudius’ strategies are to kill Hamlet or let him live. We then have four possible outcomes which can be ranked from each characters perspective from best to worst.

Following the rules set out above, the Theory of Moves works by moving around the table above as follows. This particular conflict starts in the state at the bottom right of our table. Hamlet is currently hiding the knowledge about his father’s murder and Claudius has not yet decided whether Hamlet poses a significant enough threat to kill him.

A better outcome for Hamlet occurs if he switches his strategy and reveals Claudius as his father’s murderer. Therefore, we move up the table to the top right.

This is then the worst result for Claudius so he should opt to change his strategy from don’t kill to kill. Now, we’re in the top left state where neither Claudius or Hamlet can benefit from changing their tactic. This state is know as the nonmyopic equilibrium, the state at which neither player, considering all possible countermoves, has an incentive to move from. Therefore, this is the end of the game.

Let’s compare this analysis with what really happens according to Shakespeare. In the play, Hamlet gains information that confirms Claudius as the King’s killer and plots to kill him but Claudius realises that Hamlet knows the truth and in turn sets a plan to silence Hamlet. In the end, Hamlet exposes Claudius as his father’s murderer but succumbs to a wound from a weapon poisoned by Claudius. The story follows the exact path we set out above which is defined by the Theory of Moves. This suggests a presence of rational actions providing an argument for Hamlet’s levelheadedness, a view that contradicts classic interpretations of the play. So we not only have literary analysis but also a plot thread determined by a mathematical technique. Woah!

Hamlet isn’t the only work to fall into the grasp of game theoretic analysis. Many distinguished works are among those studied through a game theoretic lens, including detective stories by Edgar Allan Poe, Wagner’s °Õ²¹²Ō²Ō³óƤ³Ü²õ±š°ł and Puccini’s well-renowned opera, Tosca. Let’s head into the 21st century and look at the cultural phenomenon Game of Thrones. It’s the HBO TV adaption of a series of books by George R. R Martin and at its height had a soaring episode budget of fifteen million US dollars, earning it the title of the most anticipated show of 2019. Unfortunately, the final season was bathed in controversy as the show disappointed fans across the globe with its final character arcs and plot.

It wasn’t just Twitter that was angry. A petition titled ‘Remake Game of Thrones Season 8 with competent writers’ has (at time of writing this post) 1,843,362 signatures. So, could maths help explain what went wrong?

Well, how about we take it all the way back to the end of the seventh and penultimate season. In the seventh episode, The Dragon and the Wolf, sparring characters Daenerys Targaryen and Cersei Lannister both face a strategic decision, to call a truce, in order to exchange information and take a step towards an alliance or remain adversaries and refuse to meet. Essentially they both have two strategies, to meet or to reject the truce. We then have four outcomes:

  1. A truce is secured, Daenerys can present her information to Cersei and they can take a step towards an alliance.
  2. Cersei severs any possible relationship avoiding the risk of attack. She leaves Daenerys at risk from attack in King’s Landing.
  3. Daenerys avoids the risk of attack but leaves Cersei insulted and without information. The rivalry between the pair is worsened.
  4. No truce is secured. The external threat remains.

Let’s analyse using the Theory of Moves.

The game begins in the 2nd state, the top right in our table.

From here, Daenerys should change the state of the game to the 4th outcome by switching her strategy and ensuring herself a better conclusion. Therefore we move to the bottom right of the table.

Cersei has no reason to change the state of the game from here, as a change in her strategy would result in the state of the game that gives her her worst outcome. Therefore, the game ends and this state is the nonmyopic equilibrium of the game.

Interestingly, the nonmyopic equilibrium does not align with the outcome reflected in the narrative of the story. Instead, the episode grants the viewers the first ever meeting of these characters, as both engage in a truce, synonymous with the first outcome, the top left in our table. With the Telegraph describing this meeting as a ‘hokey twist’, this episode marked the beginning of the controversy that surrounds the later seasons of the show. So, could this be where it all went wrong?

Anyone that has watched Game of Thrones knows it has a vast, complex plot which could be entirely explored using game-theoretic methods. Analysis of this kind could perhaps allow for us to verify storylines and predict engaging and satisfactory narratives. Although perhaps unlikely bed fellows, from Shakespeare to binge-worthy boxsets, storytelling and mathematics seem to come together here to provide interesting insights.

That’s all for now! This week’s tweet of the week goes to . I feel you, David.

Check back soon for more posts! (If you missed my last one, you can check it out here.) In the meantime, if anyone knows how to go about explaining working hours to a dog please get in touch!

Want to know more?

Brams, S. (1994). Theory of Moves. 1st ed. Cambridge: Cambridge University Press.

Brams, S. (2011). Game Theory and the Humanities: Bridging Two Worlds. Cambridge, Massachusetts. London, England: The MIT Press.

Chrissochoidis, I. and Huck, S. (2010). Elsa’s reason: On beliefs and motives in Wagner’s Lohengrin. Cambridge Opera Journal, 22(01), pp.65-91.

Chwe, M. (2013). Jane Austen, Game Theorist. Princeton and Oxford: Princeton Univ. Press.

Deloche, R. and Oguer, F. (2006). Game Theory and Poe’s Detective Stories and Life. Eastern Economic Journal, 32(1), pp.97-110.

Power, E. (2017). Game of Thrones season 7 episode 7 review: The Dragon and the Wolf gave us betrayal, nudity, and game-changing twists. [online] The Telegraph. Available at: https://www.telegraph.co.uk/tv/0/game-of-thrones-season-7-last-episode-review-dragon-wolf/.

]]>
Lights, Camera, Mathematics! Hidden Figures – A Review /stor-i-student-sites/robyn-goldsmith/2021/01/14/lights-camera-mathematics-hidden-figures-a-review/?utm_source=rss&utm_medium=rss&utm_campaign=lights-camera-mathematics-hidden-figures-a-review Thu, 14 Jan 2021 15:34:00 +0000 http://www.lancaster.ac.uk/stor-i-student-sites/robyn-goldsmith/?p=242 Hello! This blog post marks a new series of regular posts as part of my journey as an MRes student on the STOR-i programme at ¶¶Ņõ̽̽App. I’m starting this series at the very top, with a trip to Hollywood!

2016 marked the release of the smash hit movie, Hidden Figures, directed by Theodore Melfi. Based on a true story, the film is set slap-bang in the middle of the space race with the USSR and the USA in fierce competition to dominate the progression of spaceflight capability. The story follows a team of black female mathematicians, Dorothy Vaughn (Octavia Spencer), Mary Jackson (Janelle MonƔe) and Katherine Johnson (Taraji P. Henson). They work for NASA and confront racism, sexism and some seriously tough mathematics to play their part in launching John Glenn into orbit. Hidden Figures was nominated for the Academy Award for Best Motion Picture as well as the BAFTA for Best Adapted Screenplay. It portrays the story of three incredibly intelligent and determined women who, despite being up against it all, refuse to back down.

Studio: Twentieth Century Film Corporation

We follow Mary Jackson, an assistant to the all-male team of engineers at NASA who dreams of being an engineer herself. Later we learn that the engineering schools do not allow black students. Jackson is strong and unapologetically intelligent. At a memorable point in the film Jackson is told that ā€œthe curriculum is not designed for teaching a womanā€, without a breath she plainly replies, ā€œI imagine it’s the same as teaching a manā€.

The film also follows Dorothy Vaughn, who is, for all intents and purposes bar the pay check, the supervisor of the department of ā€œhuman computersā€. Dorothy becomes the only person who can work the new IBM Machine, which was installed with the intention to replace the entire ā€œhuman computerā€ department. Her success not only aggravates her male counterparts, that have been trying and failing to work the machine for weeks, but, as the only one able to operate it, secures the future employment of her team.

Katherine Johnson, our main protagonist, is assigned to help check the numbers in the department at the top of the chain. Her journey to secure credibility in this hostile and stressful environment is by no means smooth, not least portrayed by the repeated half a mile run we see her undertake to get to the only bathroom she is allowed to use on the site! It’s a triumph when she is finally awarded common decency after gaining the attention and respect of the boss, Al Harrison (Kevin Costner), who takes a sledgehammer to the ā€œWhites Onlyā€ sign on the nearest bathroom, shouting to all onlookers, ā€œHere at NASA, we all pee the same colour.ā€ It’s the succession of these small wins for our characters that make the film uplifting and empowering. It’s a classic underdog tale and as an audience we are successfully placed right behind these women, willing them to succeed. Although classic, this film is still innovative. It’s a story with three female black leads that also happen to be incredibly skilled mathematicians – how often do you see that in everyday cinema?

Studio: Twentieth Century Film Corporation

This film won’t educate you in the complexities of space orbit, you probably won’t know any more about Euler’s method after watching it, but this is not where its significance lies. Its gravity (if you’ll pardon the pun) is its ability to expose the idea that becoming a successful mathematician has anything to do with race, age or gender, as perhaps it has been displayed to us years previous. For me, watching Hidden Figures has unlocked an extra bit of determination and willingness to persevere. This could be down to the lively, upbeat soundtrack that features Pharrell Williams, it could be down to my immediate, uncontrollable love for Johnson’s marvellous cat-eye glasses or it could just be because I’m a woman who has been told (sometimes subconsciously and sometimes purposefully) that science, technology, mathematics and engineering are a white man’s domain. Yet here I am, watching a black woman solve equations longer than my arm and showing Kevin Costner who is boss. I am watching black women succeed. This is why I think this film is so important and why I, for one, am so glad their story is no longer hidden. So, I would encourage you to show this film to your Granddad and you Grandma, your Uncle and your Aunts, your Sons and your Daughters because it’s not only an Oscar-Nominated fun time – it’s a piece of work that just might help change the world for the better.

That’s almost it for now! Below is my favourite tweet of the week. Thanks for the reminder on the importance of proof reading! Something for me to remember as I continue this blog!

]]>