Coding Projects

RTA app

I created an R app to visualise UK government data on serious and fatal road traffic accidents. All code is available on my Github. In this project I enjoyed getting the maps to interact and learned about shape files and the leaflet library. The link below will take you to shinyapps.io where the application is hosted.

Sprint 1 – Dynamic programming

An interesting task in this sprint was to produce a visualisation of an optimal booking control policy for a problem with an airline theme. Consider a network of two legs. Leg 1 services Frankfurt to London with 20 seats capacity. Leg 2 services London to New York with 40 seats capacity. Passengers may book either a single leg journey or a two-leg journey. The time until departure is 100 days, the prices of each of the 3 tickets was detailed in the question, each with a different probability of booking requests being made. At any time we can accept a requested booking or reject the booking. What is the optimal policy to maximise the expected revenue?

It turns out this problem can be solved exactly with the Bellman equation, and I wrote a small app to visualise the optimal policy.