LPSolve in R for Transportation Problems

.........................................................

Recently I’ve been doing some work involving the transportation problem. The Transportation Problem is an allocation optimisation problem that requires the optimal assignment of demand, in my case patients by Output Area, to known, fixed, supply points, in my case doctors surgeries (General Practices). Rather than use a euclidian or manhattan metric to model distance from the demand site to the supply site I have used public transport travel times from TfL.

Initially this seemed a difficult task, and early attempts only provided partial, or non-optimal, solutions. However, once I had found the linear programming functionality in R through the package LPSolve it became very easy to create a model with the constraints I wanted and get a solution very quickly. Key to the success of the R package was the ability to set the constraints I needed, crucially integer constraints so that people were not subdivided, and constraints on the number of patients doctors could take.

Mapping the outcomes in ArcGIS was straightforward due to R’s built in csv-export funtionality.

Here is an example of the output.

catchment06gpconstraint

The legend denotes the 44 physical practices in the London borough of Southwark, some doctors exist on the same site and so these practices were agglomerated. The grey areas represent unallocated demand caused by capping the size of the General Practices. In another definition of the model I ran I set the GPs up as uncapacitated so that all the demand would be satisfied. This model uses data from 2006, I have data from 2009 for which I will also run the model.

Some earlier work I did on this is available in the Proceedings of GISRUK ’09.

~ End Article and Begin Conversation ~

~ Now It's Your Turn ~

Feel free to use <strong>, <em>, and <a href="">

[]

The Blogroll

Search this Site


[]