Thursday, 29 December 2016

Should historians learn system dynamics?

The magazine Mathematics Today (published by the Institute of Mathematics and its Applications) recently published an article: "Green Transport Planning Paradoxes".  The authors (Stuart Berry, Chris Parkes, University of Derby) used basic ideas of system dynamics to show that mass transport systems grow and expand until a fresh system replaces the first one.  They take as examples from UK history, the development of canals, replaced by railways, replaced by road transport, and - in some places, the introduction of mass transport rapid systems.  However, the theme of the article is that there are spin-off effects on society which are not always 100% desirable.  In particular, although mass transport rapid systems are greener than road transport, they lead to urban sprawl and increased house prices.
To illustrate their arguments, they take some simple feedback loops, such as this:
The loop works like this:
  • Rail demand growth leads to Rail network growth
  • Rail network growth leads to Travel time by rail reduction
  • Travel time by rail reduction leads to Rail demand growth
  • and
  • Rail demand growth leads to Rail network growth
and so on
The same loop applied to the boom in canals in the UK during the late 18th and early 19th centuries, until the railways provided a "better" means of transport.   So the feedback loop for canal, similar to that above, interacts with the feedback loop for rail.
But rail network growth also leads to urban sprawl and the concept of the commuter.  All over the UK there are streets of houses built during the late 19th and early 20th centuries by workers (especially office workers) who found that they could commute by rail from the nearby stations.  Now that some of those stations have closed, those houses (such as those in Okehampton, below) lack the advantages they had a century earlier.
Houses below the former station in Okehampton, near the railway, a long way from the town's main street
The same phenomenon was particularly evident in the spread of the London Underground system in the late 19th century and the first three or four decades of the 20th century. 
This is illustrated by the feedback diagram above; plus signs by an arrow mean that "up leads to up" and "down leads to down", and minus signs mean "up leads to down" and "down leads to up".  So, as rail demand increases, it leads to increased house prices, more rail development, more urban sprawl, more rail passengers, fewer road users and more rail demand. 
When I came across the article, I intended to include mention of it in this blog to ask the question - how does it apply in other nations and societies where transport systems have not followed the same successive phases of development.  In countries where there were no canals, what did the railways displace?  Can one model the growth of domestic air flights in the USA as replacements for inter-city rail travel? 
You don't need a deep knowledge of system dynamics to understand these diagrams.  But their applications are very widespread in human history.  Thanks to my flat-mate as a student, I am a co-author of a research paper in a journal of history (it gives me bragging rights in some academic circles!); he was looking at the growth of coal mining in Cumbria in the 18th century, and there were some statistical questions to be answered.  There the feedback loops were concerned with changing transport and changing technology for mining.
  • Increased demand for coal led to Expansion of the mines
  • Expansion of the mines led to Construction of wagonways to carry the coal to the port
  • Expansion of the mines led to Investment in new technology such as steam pumps
  • Investment in new technology led to (eventually) Reduced prices for coal
  • Construction of wagonways to carry the coal to the port led to Reduced prices for coal
  • and
  • Reduced prices for coal led to Increased demand for coal
More recently, I picked up a book in Exeter Library which - at first sight - seemed to have been shelved in the wrong place.  It was about the history of Roman roads in Britain, and had been shelved with books on warfare.  It transpired that the author's thesis was that the road system in Britain was not created by the Romans, but the Roman occupation was one element in its development.  Roads pre-dated the arrival of the Romans in 43AD, and the system developed to meet the needs of successive rulers, through medieval times to modern days.  The author catalogued numerous battles fought on British soil (hence the library's shelving) and their proximity to the major roads of the country.  With system dynamics in my head, I thought that the book had missed a trick or two by ignoring feedback loops.  Two struck me:
  • Increased unrest in the land leads to Increased military strength by the ruler
  • Increased military strength by the ruler leads to Increase in the road system
  • Increase in the road system leads to More communication of grievances among the populace
  • More communication of grievances among the populace leads to Increased unrest in the land
  • and so on

  • More subdivision of the land into power blocs leads to More strife at the boundaries
  • More strife at the boundaries leads to Reduction in transport between the blocs
  • Reduction in transport between the blocs leads to Deterioration of roads between blocs
  • Deterioration of roads between blocs leads to More subdivision of the land into power blocs
  • and so on 

So, maybe historians should learn system dynamics.

References:  Green Transport Planning Paradoxes by Stuart Berry and Chris Parkes: Mathematics Today, volume 52, no 4, August 2016, pp193-197
The Secret History of the Roman Roads of Britain by M C Bishop (Pen and Sword, 2014, ISBN 978 1 84884 615 9) 
The Land Tax Returns as a Source for Studying the English Economy in the Eighteenth Century by J V Beckett and D K Smith Bulletin of the Institute for Historical Research 54(129):54 - 61

Friday, 23 December 2016

Designing the best tarpaulin for the world

Sometimes there are problems which have conflicting objectives which have few numbers associated with them.  Not all operational research needs numerical data.  There are qualitative aspects to O.R. as well as quantitative ones.  And this is about one such problem.

Tina and I support the medical charity MSF, Medecins sans Frontieres, Doctors without Borders.  A recent issue of their newsletter for supporters included a two page spread by Patrick Oger about designing the perfect humanitarian tarpaulin, or tarp.  You can read the article, with pictures, here.  Another blogger has picked up this story, here.

Tarp is used for many different things in emergency situations; it makes shelters for people and animals and equipment; it makes fences; you can cover food with it to protect it from the sun, wind, rain, snow, chemicals; you can use it as ground cover when you are sharing out supplies.
  • It has to be tough so must have strength in all directions.
  • It has to be waterproof.
  • It has to last a long time in harsh conditions, such as strong sunshine or high, gusty winds or heavy rain.
  • It has to be the right size.
  • It should be easy to repair
  • It should be light enough that large numbers can be carried to the place of need easily and quickly
And ... it has to be cheap.  Relief organisations will use thousands of tarps every month.  A tarp that is tough, not heavy, waterproof, and long-lasting, but which costs a fortune to make will not be acceptable.

Patrick Oger was responsible for finding the best tarp at the best price.  He looked for the faults in the tarps which were on the marketplace.  As an engineer, he repeatedly asked the question, "Why?"  Why is this material unsatisfactory?  Why is material A better than material B?  And he asked the question that marks out operational research work - "What happens if ...?" Having found the base material, which used black fibres, he found that the question "What happens if we make the tarp black?" would be answered by "It will be too hot for human shelter".  So he knew that it couldn't be left as a black product.  So he experimented with a coloured coating, to find the optimal colour.

Inevitably, there were some questions which were answered with numerical measurements.  But the psychology was important too, as it is for operational research to gain acceptance by the client; would the relief agencies use something new?  Would the people they served use the tarp?  If so, why?  If not, what was wrong? 

This Chinese company now makes tarps to the MSF specification
His research, carried out on top of his regular job, took three years.  But the product that he specified is now used by many NGOs across the world.  I don't know if he knew the concept of operational research (recherche op√©rationnelle as Patrick is French), but he has followed the methodology successfully.  And if, having read this, you want to support a relief charity, one of Patrick's tarps will only cost about 10 US dollars.

Christmas is a time of good cheer (for humans and robots)

It was a very good Christmas party ... and my friend started talking about an aspect of his life of which I was completely unaware.  And, once again, I found myself in the company of an enthusiast, whose hobby raised some interesting questions about optimal design.
He said that he and his son had worked together on a battle robot which had been good enough to appear on the TV series "Robot Wars".  The series, and similar ones in other countries, features radio controlled robots whose aim is to incapacitate or destroy another one.  There are some "house robots" which are created with sophisticated weapons.  One of the house robots is "Shunt"
Shunt from "Robot Wars"
There are numerous sources of information about how to start designing such a device.  This blog entry is not about those sources.  It is simply a short reflection about the conflicting objectives faced by the designer.  The robot needs to have offensive and defensive equipment.  Offensive equipment will protrude from the body, and poses a weakness in the defensive shield.  (Medieval castles, wartime pillboxes, army tanks, navy ships - all have the same conflict - in order to be able to shoot arrows, firearms, tank missiles ... there must be an opening, which becomes a target for hostile fire.)  So you protect your offensive equipment especially well.  But the more weight you add to the armour, the more power you need, and the less manoeuvrable the robot.  
Another conflict arises between weight and abiliy to manoeuvre.  The heavier the robot, the harder it becomes to accelerate and turn, so to make it easier, you add more powerful engines  which adds to the weight.  
I could go on.  Suffice it to say that different people have solved these conflicting elements in many different ways.  Next time one of these programmes is on TV, just think - operational research has been used, unknowingly, to solve the problems of conflicting objectives.

Monday, 12 December 2016

Memories of Lyn Thomas

Earlier this year, Lyn Thomas, one of the UK's leading researchers in Operational Research, died.   He had been professor at the University of Southampton, and a prolific writer about many topics in O.R., particularly about credit scoring, start-up firms and finance  His contribution through articles, books and lectures over the past 30 years has been immense.
I met Lyn many times and he was always a perfect gentleman and good correspondent.  I was thinking about him recently when I recalled correspondence we had exchanged about the lighter side of O.R.  I had presented a paper at a conference about dynamic programming and board games, which was eventually to become a published survey paper on the subject.  Lyn was researching and modelling for his paper "The best banking strategy when playing The Weakest Link" published in the Journal of the Operational Research Society (, Volume 54 (issue 7) pp 747–750) whose abstract reads: The paper uses dynamic programming to investigate when contestants should bank their current winnings in the TV quiz show, ‘The Weakest Link’. It obtains the optimal strategy for the team as a whole and then looks at two possible reasons why the contestants tend to use other strategies in reality.
He sent me his models to test and comment, and that led to a further exchange about models for the Microsoft online solitaire game "Freecell"In my presentation I had commented on the original version of this which had 32,768 starting positions and all but one were soluble.  He asked about the way that this analysis had been done, and whether some starting positions were harder than others.  The answer to the first question is that people had solved the 32,767 soluble cases, and then had used a Dynamic Programming approach to show that the final one was not soluble.  For the second question, I could point him to some analyses of the moves to a solution.  Solving a given starting position requires a sequence of moves.  For some starts, there are numerous possible opening moves, and the tree of possible moves becomes very broad.  For others, there is a unique sequence of moves which transforms the starting position into one from which a tree of possible moves follows on.  The longer that sequence, the harder the problem.  Other problems have a diversity of opening moves, which converge on one bottleneck position, which all sequences pass through.  Lyn saw parallels between this solitaire game and some of his work on scoring, and I was delighted to be a distant part of that work.  
Why think of this now?   Freecell is one of the solitaire games provided by Microsoft as a free game, but with twists.  Along with other games, there are four standards of difficulty in the "Daily Challenges".  For Freecell, with complete information available to the player, the problem is to find an appropriate sequence, which may be unique or one of a small number, or one of very many.  So, somewhere, Microsoft have access to a solution tool which measures the complexity of the set of possible sequences for this game.  I wonder how it is calibrated.  I am sure that Lyn would have been interested too.

Friday, 18 November 2016

A thought-provoking day

Yesterday I made the long return day trip from Exeter to London (for non-UK readers, it is a 3-hour rail journey each way, so a day trip means at least six hours in trains).  I wanted to attend the Operational Research Society's annual Blackett lecture.  This year Professor Andrew Blake from the Alan Turing Institute spoke on "Machines that learn: big data or explanatory models".  It was a stimulating lecture, and it was good to see many old friends (sadly, old is appropriate, as most of my friends are retired or close to that age).
One of the side benefits of a trip to London is to observe life and the changes in the capital.  I picked up a copy of the free evening newspaper, the Evening Standard.  Maybe someone should do an O.R. study of the advantages of a free newspaper, paid for by the advertisers, and determine the critical number of copies when another city might offer a daily, local free newspaper.  There was a fascinating article about an anaerobic digestion plant that processes 54,000 tonnes of London's food waste each year.  You can read the article here.  A few years ago, I wrote about meeting the owner of a local digestion plant (article here) and discussed some of the O.R. aspects of running such a business.  I also commented that O.R. is not well suited to start-up businesses.  The article in the Evening Standard commented that the business had started very small and had grown rapidly.  Would O.R. have helped? 

Mr Killoughery, the chief executive, is a qualified accountant and engineer who joined the family business recycling building materials when he was 26. Seven years ago he saw the writing on the wall for landfill and decided to go it alone and branch into food waste.
“I bought one truck and began collecting food waste from local schools,” he said. “Since then, the Government’s landfill tax escalator has caused the price of landfill to rocket from £20 to £100 a tonne and Bio Collectors has expanded on the back of it to 30 trucks.”

Sunday, 13 November 2016

Silly statistics, to be taken with a very large pinch of salt.

The headline reads: "UK food goes global", and the story went on to tell the readers that "a new study reveals that in 2016 most people consume twice as much international food as traditional British dishes".
Read on, and you find some amazing deductions from a survey of 2000 people, commissioned by a restaurant chain whose philosophy is to introduce diners to international flavours.  Their set menu for evenings starts with: Salt & Pepper Squid, or  Tacos locos, or  Halloumi skewers, or World breads.  Nothing there that is a "traditional British dish", so it is not surprising that the spokesperson for the restaurants said "At our restaurants, we've noticed an ever-increasing hunger for dishes from further afield".
I haven't been able to find the survey questions.  So I don't know which traditional English dishes were compared with which international food.  Would roast lamb served with rice be British or international?  What would curry and chips count as?  If they are both "international food" because my grandparents would not have eaten such dishes, then the finding in the first paragraph could be a reasonable deduction from a survey.
But the report went on, and I did wonder whether the writer had really engaged his or her brain with  what was being reported: "The average person will eat 2079 American meals, 1890 Indian dishes and 1701 Chinese meals in their lifetime".  2079, not "about 2100", please note.  How do you measure that from a survey?  It is a Gee-Whizz statistic.  Take some dubious data, extrapolate it far beyond what is reasonable, and present it as an accurate fact.  Incidentally, what is the significance of distinguishing between "meals" and "dishes"?  And Italian food is even more popular than American meals, according to the survey.  
I'd better stop; it's time to eat.  We'll start with Bean sprout soup (Indian) with a flatbread (Middle East), go on to Lemon chicken (Chinese/Thai), Baked potatoes (are they English - or an import from America 400 years ago?), Sweetcorn (US), and end with Tiramasu (Italian) with French white wine, Port (Portuguese) and a cup of tea (we like a Kenyan blend).  (oh, and we'd better have more meals like this, or we won't be average)

Tuesday, 8 November 2016

Parking Permit Problems

Exeter, like many cities and towns, has a parking problem.  There are many streets which have no provision for off-street parking for residents and businesses.  Some were built in the 19th century, before cars, others date from the 20th century and the houses were built on false assumptions; either that local people would not have cars, or, in many parts of the city, the houses were planned when cars were smaller.  (The latter is seen in at least two ways; the plots for garages were made the wrong size; houses were built too close together and the garages were built behind the houses.)  And increasingly, households own more than one car.  So many people park their cars on the roads outside their homes.
However, if this parking is not regulated, chaos may follow.  If the streets are close to places of work, then commuters may try to park there.  Often there is not enough space in a street for every house to have one parking space, let alone have space for more than one.
So, residents in many streets obtain parking permits.  These allow the car to be parked anywhere within a zone around the owner's home, generally including the street in front of their home (but not always, because it may be a major traffic route).  Exeter has several zones, and cars may only have a resident's permit for one.  Business users may have permits for some vehicles, and there is a category of "essential visitors" as well. 
The operational research problem is the establishment of the zones.  It is not like the problem of establishing wards for elections, since not all streets need to be allocated to a zone; there may be sufficient parking in a residential area so that no restrictions are needed.  The zones do not overlap, so one could pose the problem as one of dividing the whole city into parking permit zones and the rest.  If you did that, the "rest" might be quite hard to define - it seems better to simply say that the problem is of defining zones for parking.    A zone must be contiguous, have natural boundaries, be easy to define, and must be "fair" to residents and businesses.  And it must not be too large.  (A large zone could lead to people commuting from one side (home) to the other (work or shops or transport hub) especially if the zone touches areas of business or commerce.)    So there are multiple objectives to be satisfied. 
One approach would be to create one zone at a time.  It might not be optimal, but it might give a "good enough" solution.  Heuristic methods can be pretty good!
All over the city, such zones have been set up.  Generally, people are happy with them, even though you have to pay for the privilege of parking outside your own house, or as near as you can find a space.
However, changing the zones can be controversial.  Recently, the city has added new zones where there was unrestricted (read "free for all") in the past.  Not everyone was happy, because it was necessary to draw boundaries where the residents were in the former habit (of necessity) of parking in one of several nearby streets, and these were now in different zones.  But the council does not issue two permits for one vehicle. 
So, here is a practical problem.  I have suggested one solution method.  Is there a better one?