Monday, 10 October 2016

The best angle for traffic light louvres

Certain traffic signals in the UK are covered with louvres so that the light in the signal is only visible when your eye is aligned with the gap between the louvres.  Not everyone is happy with them.  In an online discussion, I found the following explanation:
The proper use for the louvred aspects on signal heads is to avoid conflicting signals being displayed. For example, if you have a pedestrian crossing within a few yards of a signal controlled junction, if there is a chance that drivers may misread an aspect being shown on the pedestrian signals [green] as the aspect for the junction then the louvres are fitted to ensure that you only see it from a certain distance from the stop line. This is also the case for the pedestrian aspects as well if the phasing is not all the same and you have another button to push in the centre refuge. It may appear 'difficult' to see in some circumstances but it does avoid confusion as you are required to check you are on green before proceeding.
However, not all drivers were happy with the introduction of such louvres, because they were driving trucks and the angle of the louvres was set for the benefit of car drivers, much lower on the ground.  The discussions did not mention the problem for cyclists, whose eye level is also higher than for car drivers.  As a cyclist in Exeter, there are some louvred lights that I cannot see unless I am close to them, because the light is "directed" down towards a car driver.  Geometry says that if the driver is supposed to first see the light when they are 40ft away, a cyclist or truck driver is likely to be about 20ft away when they see it.
 The louvres in this picture are set horizontally, with openings at the base.  Other examples do not have the openings, and have louvres set at an angle ... and as the angle is a number, there is mathematics involved and someone should try and optimise that number.   What criteria to use?  I leave it as an exercise in multiple objective decision-making

Scheduling electrical power supplies - the effect of on-demand TV

When a popular TV programme comes to an end, viewers rush to put the kettle on for a hot drink.  For some programmes, the resulting surge in demand for electricity put a strain on the power system, and so the power companies had generators ready to be brought online to meet the demand.  One of my industrial contacts worked for a power supplier, and we discussed the problem that his business faced.  It was an interesting application of O.R., and like so much O.R., it was hidden from view.  The company needed to know TV schedules, and forecasts of viewer numbers and the step in numbers between programmes, and what fraction of those who stopped viewing would use high wattage equipment. Occasionally, I used this as an example for students to consider how they would tackle such a forecasting and scheduling problem.
However, changing habits in TV viewing have reduced the size of "end-of-programme" surges.  Many people watch programmes on catch-up TV, so want their hot drinks at a time which bears no resemblance to the end of the original programme.
Fifteen years ago, the surge (called a "pick-up" in the power companies) after an episode of the popular soap, EastEnders, could be up to 660Megawatts.  Now there is still a surge, but only 200Megawatts.
Jeremy Caplin, the Energy Forecasting Manager for the National Grid, has the overall responsibility for developing models for forecasting demand.  He was recently quoted as saying: "We see as many spikes in demand, but they are much, much smaller than they were.  The way that people watch TV has meant that they have come down in size."  Nonetheless, during the summer's Olympic Games, there were many sizeable spikes, because so many people wanted to see events as they happened.
From an O.R. perspective, the integration of forecasting and resource allocation is an interesting case of several techniques coming together to deal with a problem, and it is one which occurs several times each day.
Besides forecasting the surges, the forecasters at the National Grid have had to forecast the effect on solar farms of a partial eclipse of the sun, and there is an infographic available (below) of the changed demand during the 1999 total eclipse of the sun when crowds of people stopped using power to watch the eclipse.

Putting on the kettle is not the only activity that follows a popular TV programme.  I met an engineer who had studied the variation in the flow in sewers during advertising breaks and at the end of TV programmes.

Thursday, 12 May 2016

Queuing for Beginners - a book by Joe Moran

I found a copy of the book "Queuing for Beginners" by Joe Moran in a charity shop.  It has the subtitle: "The story of daily life from breakfast to bedtime", and is a study of aspects of everyday life in Britain, and in particular, in the cities and towns.  It is a book about sociology and social history - and the mathematics of queue theory is only mentioned in passing.

The book's chapters are arranged by hours of the day from what people eat - and used to eat - at breakfast through commuting to shopping and taking smoking breaks, through to television watching in the evening,  Some of the evidence comes from Mass Observation reports in the 20th century, other data from more recent studies and commercial reports.

For the O.R. reader, there are several interesting notes in the chapter on queues - "Cashier number one, please" (for non-U.K. readers, this is the recorded announcement one hears in many banks and businesses, telling the person who is waiting which server is now available).  In the layout of the book, this queue is timed at noon, because so much queueing happens at lunchtime, when office workers are free, and cashiers are scheduled to have their lunch. 

Moran's coverage of queues starts with 19th century references to waiting for service, then continues into the wartime queues for rationed food.  " ... the myth of the British as patient queuers developed during the Second World War.  In this time of rationing and shortages, there was nothing trivial or decorous about queueing etiquette.  Waiting in line was a fraught, politically charged activity ..."  After the war, queues became politically charged, leading to a famous poster in 1978-79.
Moran writes briefly about queue management systems, and the snaking queue system which is found at airports and in amusement parks.  Disney discovered the psychology of these, that they give the impression of movement when the queue is hardly moving at all.

Finally, he distinguishes between the camaraderie of some queues - for tickets to Wimbledon, or to buy a new mobile phone - with the everyday frustrations which "do not have the same warm glow of togetherness".

All in all, an interesting, sideways look at queues, as one important aspect of everyday life (and in O.R. we know how important they are!)

Monday, 9 May 2016

Discrete optimisation for fun

I have mentioned Bob Bosch and his mathematical art before; recently the (US) National Museum of Mathematics released a video on Youtube of Bob giving a lecture there on some of his work ("Math Encounters - Life is Beautiful: The Startling Consequences of Three Simple Rules")  It is a lecture on creating artworks that use patterns from John Conway's "Game of Life" as the building blocks and using discrete optimisation software to lay out those patterns in a picture.  
I thoroughly recommend it!  There is a plug for O.R. during the lecture and the first person in the audience to join in the questions (at 1:13:14) expresses delight in that publicity.  
As an undergraduate maths student, John Conway taught me Number Theory.

Tuesday, 29 March 2016

An app for better vehicle scheduling

I used to lecture a little about vehicle routing and scheduling.  One of the regular problems that came into the discussion of the reality of the subject - as opposed to the theory and mathematics - was that of vehicles returning empty.  A lorry would take a load from A to B and then have to return from B to A empty.  As a class, we would discuss ways that the haulier could avoid such empty returns - and as a mathematical exercise we would consider the availability of loads at C1, C2 and C3 (close to B or on the route from B to A) to be taken to near A.  Given the appropriate parameters of cost of the lorry per unit distance, when empty and loaded, the cost of loading and unloading, the cost of extra time on the road, and so on, it was a straightforward calculation to decide whether any of those loads was worth taking. 

Now I learn that a start-up company, Quicargo, has devised an app to help with this.  A customer needs a haulier, and broadcasts the specification.  Hauliers with the app can make a quote for taking the load, rather like the apps used for finding a taxi in many cities.  There are differences; some hauliers will not want to take loads on some routes, and other hauliers are contracted to a limited number of clients.  We will see what happens.

The size of wheels and castors

In the early 1960s, Dr Alex Moulton launched the bicycles that are known by his name.  They were a revolutionary design - for well over half a century, bicycles had (almost) invariably a diamond frame and wheels about 26inches in diameter, and no suspension.  Moulton bicycles had suspension, small wheels (17inches in diameter) and an open frame.  The smaller wheels meant that the tyre pressure had to be higher than was then normal, and the suspension was essential.  It was about 25-30 years before suspension became common on "traditional" sized bicycles.  Modern small-wheeled bicycles have slightly larger wheels (20inches is common).

There continues to be debate about the comfort and ease of riding bicycles with different sized wheels.  There is not much choice, because they are standardized.

Not so castors and wheels on trolleys used for moving goods around shops.  The first vendor that I found in the UK offers castors with diameters: 50mm, 75mm, 80mm, 100mm, 125mm, 150mm, 160mm, 200mm, 250mm, 260mm, 330mm, 370mm and 400mm (and I may have missed some out!).  If you want, you can have castors made to measure.

An assortment of castors
Bicycle wheels need to match the other components of their vehicle.  However, castors can be chosen for the purpose.  They don't need to match mudguards and frames.

The cleaner in the shopping centre this morning was struggling with his trolley, when I stopped to chat.  The shopping centre is paved with small slightly rough flagstones, about 300mm square.  The trolley was not designed for use on such a surface.  It had 100mm castors, and they didn't cope.  Actually, I think they were a little too small for use on a hard surface indoors, because of the load being carried.  Some designer had economised - someone who didn't have to move the trolley around that shopping centre - and there was no feedback to suggest a change in the design.   For the sake of a few pounds, the cleaner's work was being made harder.  Now, if the designer had applied a little operational research "What if?" analysis, things might have been much better.

Later in the day, I found a trolley of similar dimensions, with larger wheels, which was much easier to handle.  It was in a department store, and moved bags of clothing across the smooth floor with ease.  Well done, that designer!

Sunday, 6 March 2016

Supermarket plastic bags and credit cards

Since October 1st 2015, in England, supermarkets are not allowed to give away plastic carrier bags.  They make a charge of 5 pence (about 4 US cents) for each bag.  Up to that date, shoppers could take away a free bag in most of the larger chains of supermarkets.  There are some exceptions to this law, and smaller shops are allowed to give away a free bag, but very few do.  A few days ago, a news item recorded that one company making plastic bags for supermarkets had been forced to close, leading to 40 employees losing their jobs.  That was sad news, but was one demonstration of the way that the nominal charge of 5 pence had altered the behaviour of the shopping public.  Instead, people have bought long life plastic bags (see next paragraph and later) or cloth bags which they bring with them to the stores.  Estimates from the retail sector suggest that the consumption of "One trip" bags has fallen by 80%.  Hence the effect on the manufacturer.

Supermarkets sell long life plastic bags, which are tougher than the free bags - but most of them have a policy that you can exchange a worn-out long life bag for a new one for no charge.  The long life bags are, naturally, emblazoned with the shop's logo and name, to act as a mobile advert.  The same news item that revealed the closure of the manufacturer reported the obvious phenomenon that shoppers are taking the bags from company X when they shop at supermarket Y.  Tina and I have been doing that for ages.  We have a "bag of bags" which contains long life bags from at least four different companies. 

I wonder how effective the long life bags are as mobile adverts.  This is the sort of question which O.R. scientists might study with the aim of determining an appropriate marketing strategy.  My gut feeling is that they will have a tiny effect on other shoppers;  when did you last notice the brand of the carrier bags of the person at the neighbouring check-out?  Yes, I have been aware of them a few times - once when I passed a shopper with a bag for life from a French hypermarket, and a couple of times when the bag seemed out of place, with a discount supermarket bag in an upmarket store, and vice versa.  But there is a possible marketing opportunity to target the owner of the long life bag.  And it depends on using big data.

Supermarkets issue loyalty cards which offer their users different benefits (Tesco Clubcard, Sainsbury use Nectar, Morrisons has "Match and More", Waitrose use MyWaitrose).  Using one of these loyalty cards allows the supermarket to build up a picture of the shopping habits of the owner of the card, which can be coupled with the data that had been needed to register the card.  And some of the supermarkets have credit cards linked to the loyalty cards.  So, without giving away too many details, we have two such credit cards.  The first we use for most of our shopping, whether in the parent supermarket or not.  The second we use in its parent supermarket and for online shopping.  So the first parent supermarket can track how much we spend in some of its rivals, and know that we are not completely loyal to it.  The second can see that we do not do all our grocery shopping with them.

What incentive could these stores give us to try and change our habits?  Could they devise an extra incentive to encourage regular loyal shopping?  And I suggest that bags for life could be used. 

Consider the scenario.  This shopper has a credit card linked to supermarket Z.  According to the big data, that shopper spends 40% of their monthly food shopping at Z and the other 60% at two or three others.  Supermarket Z might find it to their advantage to offer the shopper a free bag for life with a minimum spend, or a discount if they do their shopping in Z with an old bag for life from Z.  The data exists - how do you want to use that data to make profits?