Sunday, 19 March 2017

The utility value of a towel

Sooner or later, students of operational research encounter the economic concept of utility.  It can lead to an interactive lecture, when one offers a volunteer from the class a fair bet of either £0 or £10, and then offers to exchange that bet for a certain amount £X.  What value of X do you select?  (I found it helped to actually have a £10 note in my hand when I did this.)  With suitable repetitions it is possible to select a few points on that volunteer's utility for money curve, and then sketch the general shape of it.  Most students are risk-averse and this is the typical concave-downwards curve, so X will be less than 5.
 In general, a risk-averse person offered a fair bet between £S1 and £S2 will exchange that bet for an assured amount < 0.5(S1+S2)
This discussion - when I taught it - following the example of the text books - leads on to assessing the utility of non-monetary outcomes, as a way of looking at the results of management decisions.  There was a story, often quoted, of the student who assessed the choice between his status quo for the next academic year and a free ticket to every campus event for the next twelve months.  He preferred the status quo, on the basis that he would not have the numerous temptations of missing classes and essays.
One morning earlier this year, Tina and I arrived at the city swimming pool to find two damp towels in the rubbish bin, and two damp swimming costumes, and a receipt from a (low cost) city centre shop for these four items, dated the previous day.  We recovered the items, put them in the next domestic washing machine load, and gave them to a charity shop later on.
We tried to reconstruct the back story for this purchase and disposal.  One credible account for it was:
Two people were visiting the city and staying in a hotel; they wanted a swim, so made the purchase, and then had the damp towels and costumes to cope with.  Because they were visiting, they had no way of drying them, or wish to take them away, so they chose to dump them.  
Now consider the choice these two had made.
Either:
(Plan A) Don't swim - cost zero
Or
(Plan B) Swim: cost of a towel, costume and one pool entry each - about £15 each
Not everyone would consider the utility of Plan B to exceed that of Plan A; would you?
Meanwhile, Tina and I had the choice:
Either
(Plan Y) Leave these wet items where they were
Or
(Plan Z) Carry them home and spend a little time dealing with them
... and you can work out which had the greater utility for us.


Saturday, 18 March 2017

Where does operational research fit into a community plan?




It is generally assumed that O.R. people are attached to the management pyramid, and the alternative title of “Management science” for the discipline is a reminder of that.  I am grateful that those who taught me to think like an O.R. person included a few reminders that operational research can be used to help any area of business or commerce where decisions are being made.  These areas are generally, but not exclusively, in the area of management and control.  But O.R. can be used for personal decision problems.  It can be used to clarify issues for anyone (or any group) facing choices.  Hence the development of the topic of “Community O.R.” and the increased prominence of pro bono work, not for managers, but for less structured groups of clients. 

A local development (Atmos Totnes) reminded me of this.  Totnes is a very interesting town in Devon, in the South Hams, about thirty miles from Exeter.  It is an ancient town, with a history going back over a thousand years.  It is associated with the family of the computer pioneer Charles Babbage, and the museum’s Babbage Room pays tribute to his contribution to O.R. – a century before the term was invented.  The community there is independent by nature – it used to be known as a centre for alternative lifestyle. 

In Totnes, the milk depot closed down 10 years ago, leading to the loss of over 150 jobs, and leaving an 8-acre brownfield site close to the railway station.  What should be done with this site?  Should it be sold to the highest bidder?  In which case, O.R. would be used to schedule the redevelopment of a plan that met the corporate goals of that purchaser.  Or, could the community of Totnes do something innovative?  That was what happened.

The community chose to write a brief for the regeneration of the brownfield site.  Meetings were held, structured in ways that we in O.R. would recognise, despite not being given that name in the meetings.  Yes, there had to be a group of organisers, but they endeavoured to involve as many people from Totnes as possible, in those structured meetings – all with a goal of reaching an appropriate and socially optimal plan for the site.  They used common sense, and that is sometimes the best kind of O.R. – but they coupled that with sound economic models (good numerate O.R.!)


British legislation has recently been changed to allow community support to back a large planning application.  So the former depot is going to be renewed, over the next five to seven years.  One building – Brunel’s atmospheric pumping station from his ill-fated experimental railway in the 1840s – will be retained.  

The site will have 99 new houses, two thirds being genuinely affordable, and one third for older people (A numerical decision – what criteria led to that?)  There will be employment space, a school for entrepreneurs in food industries, a bakery, hotel, health and well-being centre. 

Hydro power will come from the nearby river, there will be PV panels on roofs and a biomass boiler – which together should make the new site self-sufficient, and may produce an excess.  (Again, someone has done some O.R. related calculations.)

This development is seen as a model for other community schemes; I hope that the lessons in decision-making from Totnes will be learnt by others. 

Monday, 13 February 2017

A piece of operational research (and graph theory) trivia

Graph theory was "born" with Euler's problem of the seven bridges of Königsberg.

Those seven bridges were named: Krämer, Schmiede, Holz, Hohe, Honig, Köttel and Grüne.


Tuesday, 7 February 2017

Improving the Urban Environment

"What would you do if you had a million pounds to spend on improving Exeter for cyclists?"

It was a strange question to be thrown at me in a discussion about recruiting an operational research scientist for a local enterprise.  Out of the blue I had been invited to the offices of a hi-tech company on the business park east of Exeter.  Someone there had read this blog and knew that I was interested in O.R. and lived locally, and that there are not many O.R. specialists in the city - or its environs.  The organisation wants (as of the date of writing) to recruit a modeller for sustainable transport planning, with an ambitious project in mind which would help improve the environment in various ways.  So we were talking about transport models, and the problems of a medieval city with a road system that is little changed over many years.  On top of this historic legacy, Exeter has a catchment area which stretches across a radius of 20-25 miles - and these commuters bring their cars into a city which is close to gridlock.  So obviously, making Exeter even more cycle-friendly is important, but the question came quite suddenly.  I wrote about this topic from a different perspective in this article.

I wondered if it was one of those searching interview questions that are used to see how well a candidate can think "outside the box", rather like those reputedly asked at interviews for Oxbridge colleges, or to work for dotcom giants like Google. 

So how might I spend a million pounds on improvements for cyclists?

My gut reaction was that the arterial roads should be made more cycle-friendly.  I had ridden my bicycle to the meeting, and the route-finder had shown what I already knew, that if I followed cycle-paths and quiet roads, it would be more than 10% longer in time and distance than the arterial road which is more direct.  The downside of going direct was the large number of vehicles, but I accepted that.  For some journeys in Exeter, following cycle-paths and quiet roads can be significantly longer than the direct route; sometimes it is worth it.  However I am not sure how much could be achieved with one million.

The next reaction was to use the money to provide locked cycle storage at the "Park-and-Ride" car parks on the edge of the city.  Buses run from these car parks to the city centre, and one or two major employers, but they are not convenient for everyone.  Hence offering an option for cycling rather than bus-riding.  As an extra for this, one could have bike-hire stands at the car parks; already, Exeter has some bike-hire points with electric bikes (and no doubt I will write about these in the near future).

Tina and I ran the question past each other in the evening, once I had dried out from cycling home through a storm.  Thinking outside the box, our first idea was to use the money to impose a 20mph speed limit across the whole city, which would make travel by bicycle almost as rapid as by car or bus.  We decided that an outright ban on cars would not be feasible, and too low a speed limit would annoy the motorist.

Then we proposed that the city council should send out a £25 voucher to every household in the city, to be redeemed in cycle shops for equipment - and every voucher would also qualify for as many free hi-viz jackets and sets of cycle lamps as the householder had bicycles.  (there are about 40,000 homes in the city).

Our third proposal was to require that every new house or flat should have covered storage for bicycles as a local by-law.  Here, new properties must have either a garage or a dedicated parking space.   The former would offer space for cycles, the latter would not. 

With these three off-the-wall ideas, we started to consider another aspect of the commuters into the city.  In various places in the Exeter catchment area there are ad hoc car-sharing schemes, whereby two or more drivers agree to meet at a convenient place to leave cars for the day and share the remainder of the journey.  Some of the trysting places are the park-and-ride sites which are free to use (you pay for the bus fare), some are lay-bys near road junctions, some are on patches of waste ground.  (In some countries, planners deliberately create such places to park at intersections.)  Bureaucracy has closed one local site, by imposing a two-hour maximum stay on vehicles using a lay-by.  And that is a shame.  However, we realised that several local dormitory towns have out-of-town supermarkets with car parks.  Only customers are allowed to use these spaces, and the shop imposes penalties for those who stay too long.  Some, I suspect, monitor the parking with CCTV as well as patrols.  But, suppose Exeter City Council negotiated with the store to provide a limited number of spaces for park-and-share commuters.  There would be a charge, and users would have a permit to display, but many supermarket car parks are over-designed. 

And all these thoughts stem from that one quick question.  If you are coming to Exeter for an interview about working in O.R. and sustainable transport, this may have spoilt the surprise.  But there will be others, and the bigger question - can you handle the proposed project?


Wednesday, 1 February 2017

Games that Trees Play

I never expected to find the term "Game theory" in a book about trees, but - I was wrong.  Reading Max Adams' "The Wisdom of Trees" I read the following:
Seeds and their germination ... are hailed as an example of so-called game theory, whereby (in its biological context) evolution tests all possibilities to find successful strategies for an optimum number of best-fit species. (page 59)
I'm not happy with "so-called" applied to game theory - users of the subject know what it is, and because of my faith, I would be inclined to apply the mind of God to evolution as well, but the idea is intriguing.  Adams lists six characteristics of the seeds of trees which vary to fill niches in ecology: seed size; quantity of seeds; age of first production; method or means of distribution; how the seed germinates; frequency of seed production.  The OR person spots that four of those are numerical, even if slightly fuzzy. 

The author goes on to discuss some of the varied combinations of those six characteristics which may be observed with different species.  An oak tree produces medium to large seeds, in a quantity which is somewhere between the fine dust of tens of thousands of hazel seeds and the dozens of giant nuts of a coconut palm, and starts to produce when the tree is forty years old or more - while the fruit trees in my garden produce their first crop after four or five years.

The qualitative characteristics are extremely varied.  Seed that is spread by the wind, by birds which bury the nuts and forget (or die), by being buried until there is a fire or a flood.  There are so many possibilities, and so many subtle differences between them.  As a challenge, consider two native trees that you know growing close together, and see how they compete to survive.  (Theey ought to be native, because imported plants may not fit the ecological niche here that they belong to at home.)

Adams goes on to discuss yet another dimension to ecological niches; the variation from year to year in the number of edible seeds produced by trees.  This leads into another topic from OR - predator-prey models.  If a tree species produced the same number of seeds every year, then the population of a bird or animal that fed on those seeds would tend to a stable value by Lotka–Volterra models.  The predator would consume the harvest and there would be very few seeds left to be the potential for the next generation.  So trees do not yield similar crops every year.  In some years there is a bumper harvest for future plants and the predator species, in others, the predator may be starved.  The plum trees in my garden vary in their yield, partly through natural variation from the species, partly through my intervention in pruning, and partly through the random effect of climate at the time of the plum blossom.  And my story could be repeated over countless orchards and plantations of fruit. 

Now, what is the game theory approach to weeding my garden?


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

and
  • 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.