Showing posts with label Operational Research practice in daily life. Show all posts
Showing posts with label Operational Research practice in daily life. Show all posts

Tuesday, February 11, 2014

What I learned from a sabbatical year

I spent 2013 'overlanding' through South America with my partner. 1 year, 1 continent, 1 simple car, 2 people, 13 countries, 40,000 km. After moving from Canada to the UK 5 years ago, and setting up a new life there, we gave up our jobs, salary, friends and all the comforts of life in one of the greatest metropolis in the world. A lot to let go, but we gained so much more.

Above all, I learned how little I need to live on to be happy, material-wise. We converted the back of our little van into a bed, so we slept in it a lot of the nights. Wild camping at some bizarre and cool spots, like 24-hour gas stations and garages, road-side somewhere in the country, cliff edge by the sea, a lot of central plazas and town squares, in front of police stations (with permission), and once within a secure military compound. The living was rough, and it took some getting used to. I had very few possessions; I was happy; and my eyes were filled with wondrous things throughout the year.

Communities kick ass in supporting overlanding travellers of all modes, by car, motorcycle, bicycle, uni-cycle or even by donkey(!). A few hundred people gathered on a Facebook group were the best near real-time information providers. Almost all overlanders are super eager to share information with each other and help, because we've all known a few hard moments on the road. Most people have never met each other in the cyber community, but are ready to answer questions when asked.

One can have too much of a good thing. I love travelling, and still do. 60+ countries later, my imaginary list is still quite long. Doing a year of pure travel is super fortunate, and I almost don't dare to utter that sometimes I found it hard to drag myself for the 11th time in 3 months to drive through yet another beautiful wine country with breath-taking alpine scenery, or more Andean mountain villages, or serene beaches... etc.. Managing the trip is a huge challenge, but I also missed work a lot, missing the other challenges. So, in the evenings I:
  • brushed up on R and some Machine Learning techniques through Coursera (awesome!)
  • learned something new, OctavePython, more Machine Learning techniques
  • read a lot of blogs on ORanalytics and data science
  • wrote a few blog articles here (definitely neglected when I was working a busy job)
  • thought long and hard about what I want to do when I get back

A bunch of random stuff I learned a bit about:
  • Navigating in places I've never been before. "Don't listen to the British lady (aka the GPS voice), she's never been to Venezuela", and she's leading us down a dead-end.
  • Spotting and dodging potholes, rocks, livestock, cowboys, donkey carts, tree stumps, burned tires (12 day riot aftermath), flying fallen ladder (kid you not from the truck 15m in front at 90km/hr), alignment-breaking and bottom-scraping grooves in the road from heavy Brazilian trucks ... ...
  • Making it Swimming through potholes the size of a swimming pool, with muddy and seemingly endless bottoms, with a 2x4 car that had 6" clearance (nope, didn't get stuck even once! 4x4 is not a necessity for everyone)
  • Fixing cars and dealing with mechanics, and their other-worldly Spanish
  • Playing with the police to always avoid paying bribes (wasn't too often)
  • Finding out just how friendly people are (lots of home-stay invites)
  • Playing the Quena (Andean flute) is way harder than it seems - sticking with my uke instead
  • Optimising the journey in Travelling Sales Man fashion (had to return to the origin to sell the car) - yes, Operations Research is useful in every walk, or drive, of life
  • Optimising decisions under uncertain conditions
  • And of course, learning Spanish, with all sorts of accents and idioms, and the 13 countries' history, culture, landscape, food and people (P.S. mechanics and old country farmers are really hard to understand)

Having finished the year-long journey over a month ago, I was inspired to write this article after reading "Why I put my company on a year-long sabbatical". This is not a PR article, but one to say that anyone can do this sabbatical thing, and you will learn a ton. You don't need the best car all decked out. You don't need to be young. You don't need to be retired. You don't need to be without kids (met a lot of families, with kids from 6-months to 17-year olds). You don't need to have a partner. You don't need to be rich (our all-in costs: £10,000 per person, assuming 2 people sharing). Actually, you will learn how little you need at all. All you need is a bit of discipline to save some money, a bit of gut to throw yourself at it, some luck and common sense to be safe, and a lot of curiosity to explore.

In case you are inspired to consider a sabbatical year, here are some great overlanding resources:

2014 is going to be great. I am never more ready.
First step, land an awesome job.

Monday, August 12, 2013

Value chain trumps good design - ColaLife

Babies in Africa suffer and die from diarrhoea, but it's easily treatable with medicines that costs pennies. The problem is getting the medicine into the mothers hands - a supply chain problem in a rural and sparsely populated area.

Here comes ColaLife: Turning profits into healthy babies.

Inventing medicine packaging to fit into coca cola bottle gaps is ingenious, but understanding the value chain, so that all hands that touch the supply chain of the medicine has an incentive to ensure its stock and flow, is even more important.

If there is only one message to take away, I would choose:
"What's in it for me?" 
Always ask this to make sure there is a hard incentive for all players to participate. Free give-aways are often not valued, resulting in poorly managed resources and relatively low success rate. Ample training and advertising for awareness and effective usage is also key for product / technology adoption.

Sunday, July 28, 2013

Even Google can't get their numbers straight

Google has so many various entities and products, either grown within the organisation or externally acquired. It appears that even Google, the leader in Data Science and Analytics, cannot get all the numbers straight across their products: Google Analytics vs. Blogger.

Is this blog really that popular? Really?

While I was checking this blog's traffic numbers on Blogger's built-in "Stats" function, I was really surprised that the blog seems to be really popular, even though I have not been good (sorry!) at writing much for some time. As an ex-SEO'er, I had an inkling that something is not right. Up comes Google Analytics.

Blogger Stats numbers are 4.5 times bigger than Google Analytics'.

After checking my Google Analytics (GA) numbers. I was really surprised to see that the Blogger Pageview numbers were 4.5 times bigger than the GA numbers. That is a staggering difference!

After some research on the web, I concluded that:
  1. GA is much closer to the truth (but not quite completely true, see 3 below).
  2. Blogger stats include all kinds of bots traffic, so it's heavily inflated (GA tries to filter most out).
  3. GA cannot count any traffic if the user has disabled Javascript. Some folks suggest it undercounts traffic by 50%, but there is no hard evidence to back it up, so take it with a grain of salt.
  4. Blogger seems set on reporting only Pageviews, not any other useful metrics, such as Visits or Unique Visitors. Not sure why.
  5. This blog has probably been targeted by a spam bot. Upon closer look, one of the bots probably comes from a particular Dutch ISP.

Share best practice and be consistent.

I would have expected Google, the leader in Data Science and Analytics, to share best practice amongst its entities and products, such as reporting on key metrics (not just Pageviews).

I would also have expected Google to be able to have a consistent set of numbers amongst its entities and products. Doesn't appear so neither.

The majority of a Business Intelligence (BI) analyst's job is spent verifying and reconciling numbers amongst various reports, more often than not. Major BI tech giants sell BI applications that often allude to reducing such activities and increasing business confidence in the numbers in their data warehouse. However, it is still a major challenge to most companies, as evidenced here. Without a good and reliable data source, the validity of any following analysis is heavily undermined.

Let's try to stay consistent.
That goes for the metric choice, and the numbers.

FYI: if you want to find out if and who is attacking your site with spam bots, read this helpful post.

Sunday, July 31, 2011

An Alternative Way to Fly (as long as expectations are managed)

The purpose of this post is to share the discovery of an alternative way of operating an airline (flight schedule and route wise).

No matter how airlines degrade their service standards these days in the West, I think it's fair to say that most of us still believe that most airlines *intend* to:
  • Take off on-time
  • Land on-time
  • Fly us from A to B as the ticket says, without surprise stops
  • (Oh, and have toilets, of course)

On a recent trip to Ethiopia, we have been shown a rather different way of operating an airline. It contradicts with all of the above, but it works. We took 4 internal flights.

Here is how we experienced them first hand:
  • 1 left on time as per the ticket, and even got us there early (bonus!), because...
  • None of the 4 flights flew the original path it said it would: stopovers were skipped to go direct instead, or the direct flights got stopovers added onto it last minute
  • None of them arrived late, because...
  • Some of them took off earlier than stated
  • Additionally, the air stewardesses were lovely, and they gave passengers snacks and drinks (*gasp* what novelty!)
  • To their credit, they did try to inform passengers of the changes a couple of days ahead of the flight (in our case by email, which we only read after we got back to London).
  • They also tell passengers to double check the flight times a couple of days before, to be aware of any late changes.
(For your curiosity: the international flights from London to Addis Ababa was quite standard. The only oddity was that they weighed everyone's carry-on luggage at the gate, because it's apparently a popular flight to take lots of stuff with you!)

IMHO, an airline would play this game, because: (we suspect - unconfirmed)
  • It wants to minimise costs - mainly fuel in this case.
  • It has 1-2 planes that fly in circles to cover off a handful of popular destinations.
  • As the airline gets more and more requests for seats through the form of purchased tickets, it is faced with an optimisation problem to fly all its customers to their expressed destinations with minimum cost. The best way to do this is probably through re-shuffling the schedule. For instance, if a plane is hopping from A to B to C in sequence, where B is closer to A than C is, and if we discover 2 days before the flight that the plane is filled with 2/3 passengers going to C, and 1/3 going to B, then flying A->C->B is cheaper than A->B->C. What if there are customers wishing to go from B to C? We hear that the airline is known for cancelling flights as well. Luckily, we didn't experience this.
This way of operating an airline is possible, because:
  • It is a monopoly.
  • The number of flights are few, so it's easy to manage change.
  • Customers expect it and adjust flying behaviour accordingly (i.e. always check the flight times before the day of flight, and always leave wiggle room before and after the flight).
  • For foreigners who are used to the typical western airline service (i.e. expect it to take-off and land on-time and fly the route it says it would), the price justifies it and shuts people up from complaining, and instead people will have a laugh (or write a blog post!) about it.
  • It doesn't call itself "Precision Airline" (the Tanzanian airline), and can afford to deviate a little. 8-)
P.S. If you are planning to visit Ethiopia, and intend to fly within the country, you may want to consider buying the tickets within the country rather than online. It is significantly cheaper due to price control. This is true as of spring 2011, so double check this before you travel.

Monday, February 7, 2011

I heart smartphones and podcast favourites

I heart smartphones. It is the symbol of the new world, where the world is at your finger tips, and, in your pocket! There is so much information out there, digesting it is a big quest. I'd love to have the time to sit down and browse the net for a couple hours every day to catch up on all the news and events, but now I can do all this while on the move.

I am an owner of an HTC Hero on Android. It is the only digital device I carry in my hand bag (other than my obligatory work phone). Living in a busy city like London means I spend a fair amount of time in transit. If you are a Google fan like me, then Google Reader and Google Listen would be your good friends. My favourite activity during transit when I'm not walking about, is to catch up on the news and my favourite blogs through the RSS reader. My favourite activity during transit when I am walking about, is to plug into one of the following podcasts, which keeps me informed and entertained. If this is not optimising your time, then I don't know what would. I guess the next step is to jog to work while listening to podcasts: information downloading and calorie offloading all at once!

  • LSE lecture and events: London School of Economist half hour to hour long lectures or guest speakers plus Q&A session (frequent publishing of events)

  • The Economist: I like the magazine, but there is so much content to digest. The podcasts do a great job summarising the highlights (weekly publishing or more frequent ones available too)

  • NPR News: short bursts of news that keeps me informed of the North American highlights (hourly publishing)

  • Science of Better: Operations Research podcasts/interviews by INFORMS (monthly publishing)

  • More or Less: BBC radio programme making sense or debunking the numbers behind the news

  • Freakonomics: spin off by the authors of the ever so popular Freakonomics book/movie/blog/etc.

What are some of your favourite podcasts?

Aside from being my RSS reader and podcast player, my smartphone is also my:
- phone (first and foremost)
- email
- calendar
- access to the internet
- Skype to call anyone around the world
- instant messaging to keep in touch with friends
- handy document storage
- camera / video cam
- GPS and compass
- maps (offline maps too)
- ebook reader
- notebook (takes my hand scribbling too)
- news reader
- scanner
- games when I'm bored waiting in a queue somewhere
- MP3 player
- all the other things that come with a phone (alarm clock, calculator, voice recorder, etc.)
- and thousands of other applications available for download (often for free) that keep my life organised and what not

Wednesday, October 13, 2010

Oyster Card Optimisation

Transportation is an industry where a lot of Operations Research is practiced. In the following article I would like to share an example of optimisation that I have noticed in the fare pricing system on the London Underground.

Public transportation in London, England has a convenient and efficient means of collecting fares from travellers. Introduced back in 2003, the Oyster Card is the size of a credit card and is pre-loaded with money by the traveller. On each trip they take, the traveller touches the oyster card to a reader, registering their journey with the system which deducts payment from their balance. Each single journey is charged at a different rate depending on the origin zone, destination zone, and time of day.

A daily capping system is in place such that you will never pay, in a day, more than the price of a day-pass covering all of your journeys for the day. For example, in a day where you only travel in zone 1 off-peak your journeys will cost £1.80, £1.80, £1.80, £0.20, £0, £0 and each journey after that is free, as you essentially now have a day-pass on your card when your daily cap has reach at £1.80*3 + £0.20 = £5.60.

A Canadian friend of mine, currently residing in Australia, visited me here in London the other weekend. Knowing the ease, convenience, and price-capping guarantee, I recommended that he get an Oyster Card. He loaded it up with £10 at Heathrow and came into town to drop his bags at my place. After a short jet-lag nap he headed out into the core to see the tourist sights, travelling frequently on the underground. At the end of the day he reported that his Oyster Card credit had run out and that he had needed to top up the balance. This surprised me, so we worked out his journeys and payments:
  • Zone 6 (Heathrow) to Zone 1 at Peak - £4.20
  • 6 x Zone 1 Off-Peak - £1.80 each

Because he travelled from Zone 6 to Zone 1 at peak, his cap for the day was £14.80 even though had he bought a Zone 1 day-pass at Heathrow he would have only paid £5.60 + £4.20 = £9.80. So the Oyster Card is convenient and comes with a price capping system, but there are holes in that system. In this case it cost him £5.00 which is about an hours work at minimum wage in the UK, so not trivial.

Any individual travelling on a public transportation network wants to perform an optimisation. In this case, they want to minimize their total cost by selecting the most efficient combination of fares to cover all of their journeys. This problem presents itself as a classic optimization problem; Subject to constraints, like the requirement to purchase tickets to cover all journeys, the goal is to minimize total cost, a function of the decisions to buy tickets. An optimisation problem like this can be formulated mathematically and solved by computers using a discipline called integer programming, one of the tools in the Operations Research practitioner's toolbox.

If this problem can be solved by computers, why doesn't the Oyster Card system provide a lowest price guarantee rather than the evidently imperfect price-capping system? Consider for a moment the requirements of the system:
  • Daily ridership of around 3 million
  • At the end of their journey, users must be told almost instantaneously what the cost was and what their remaining balance is

Optimisation problems of this nature are not always fast, easy, or even possible to solve optimally. The computers of today are fast, but there's plenty still beyond them. The tube system isn't even using the latest technology. I've been told that some Underground components still use punch cards! Every time a customer makes a journey this optimisation must be calculated and that must be done 3 million times a day and that is unfortunately too much.

When an optimisation problem is too big or too complex to solve directly and perfectly, analysts use something called heuristics to come up with near-optimal solutions. There are commonly used methods, but depending on the problem, customised heuristics can be developed, using the unique structure of the problem in question to produce a near-optimal result. That is exactly what the price capping system is; It is a heuristic used to make a good approximation of the lowest price.

There are effectively only two types of tickets in the system: single tickets and day passes. Day passes are the only way to save money. It is rarely worthwhile buying two separate day passes. It follows naturally that a simple rule of thumb for cost optimisation is to compare your daily total of single trips to the price of a day pass covering all those journeys and choose the lower option. The conditions that I list at the start of this paragraph are essential consequences of the structure of the problem, and we can exploit them to arrive at our simple heuristic, the same one that the oyster cards use.

In a future article I hope to look into formulating the optimisation problem of the London Underground and consider alternative heuristics.

Saturday, October 9, 2010

Expedia Revenue Management at Check-out or Rule Compliance

We have all been shopping online for something only to be told after making the purchase decision that it is no longer available or no longer available at that price. This often happens when buying flights, as prices can change minute-to-minute and you can be left with a much higher ticket price which makes you abandon your purchase. Disappointment all around.

However, the opposite happens from time to time as well! The price of a London to Seattle flight, when I found it was £649.07 (including all fees). I clicked to start jumping through all the purchase hoops, but after a couple steps into the check-out process, it flagged up, rather alarmingly, as £616.07. That's a 5% decrease in price. (See, I'm not making it up!)

I was pleasantly surprised, of course. But why would they do that?

I've got 2 suspicions.

1. Revenue Management / Yield Management / Consumer Psychology
In the weeks prior to this screen capture, I've been to the site a few times already looking for the exact same flight. Even though I'm not logged in, I'd venture to guess that the site has looked up my cookies and knew that I've been looking for these flights. Therefore, it should know that I was a likely buyer, rather than a window shopper (pc pun intended). I've been at the check-out stage before, but have abandoned the shopping cart eventually. It would be quite logical for the site to entice me with a lower price as a 'pleasant surprise' to finally get me to spill my moola. Not to mention the positive impression it's left with the shopper (look what I'm doing now - free advertising!).

However, is it worth the 5% price drop? How does Expedia decide 5% was the right balance of customer incentive and revenue loss? I was already a willing customer, ready to bite. Isn't it just giving the 5% away for free? In my case, it's difficult to say whether the move has gained my loyalty to Expedia, because I was already a frequent visitor and buyer there. It may have re-enforced my loyalty though. It would be very interesting to analyse a few year's purchase and cart abandonment data of customers where this has happened to, versus a control group. Would we observe a lower purchase completion rate, which would drive a higher lifetime revenue per customer?

2. Airline price adjustment rule compliance
There could exist such a regulatory rule in the online airline pricing world to protect consumers, such that the vendor must notify the buyer of last minute price changes before the final purchase is completed. Now, I don't know if such a rule exists, but it is possible. However, it sounds extremely difficult for the regulators to enforce and monitor compliance.

I personally think it's more the former than the latter. One way to test the real reason behind the price drop could be to see if it's always a 5% decrease. Time to do some more flights window shopping!

P.S. In a previous article where we observed operational inefficiencies at London's Gatwick Airport, we erroneously stated that the airport operator was BAA (British Airports Authority). In fact, BAA was forced to sell Gatwick to please regulators seeking to break a monopoly on UK's airports. Our apologies to BAA. The current owners are Global Infrastructure Partners, who also owns 75% of the London City Airport.

Responding to two unconstructive comments, one of which was downright rude and was deleted, we thought we would add to this article.

The commenters suggest that Expedia is not a price setter, but just a re-seller making possibility one above unlikely. That said, the question still stands, "What's going on here?". If the prices that Expedia gives you when you search are cached and not live, that seems to be to be a surprising shortcoming. If they are, why offer a lower price to someone who appears to have already made the decision to purchase?

There are probably a number of factors at play that someone from the online travel community could answer.

If I were reselling through Expedia, I would want my price-updating algorithm to give the higher of the two prices at the point of payment, i.e. more profit. Both Expedia and the vendor are motivated to collect a higher price and therefore a higher commission as a percentage of the selling price.

The commenters may be very correct in saying that Expedia doesn't set the price, but merely re-sells at whatever the price the vendor names. That's why we said there were two possibilities, the second being not revenue management. However, if Expedia is not practicing revenue management in this way, they probably should at least experiment with it. Their commission represents a headroom within which they can optimize and the goal, after all, is not to make the greatest profit on each sale, but instead the greatest profit across all possible sales.

Wednesday, September 15, 2010

Restaurant Systems Dynamics - Influence Diagrams

Systems Dynamics is a discipline that floats about in the management science/management consulting ecosystem. It is genetically related to Systems Thinking, though Systems Thinking contains much more, but no aspect of simulation. The two most important aspects of Systems Dynamics are influence/causal diagrams and continuous simulation. Today I would like to outline an example of the use of influence diagrams to study a simple system, gain strategic insight, and form the basis of a stock and flow continuous simulation.

I was in Paris the other weekend, looking for a restaurant for Sunday lunch. Finding a good restaurant as a tourist is always difficult because tourist restaurants just aren't very good. The restaurants in my neighbourhood in London rely a lot on repeat business and referrals from friends and engage in a repeated interaction with their customers. The restaurants in touristy areas on the other hand get the majority of their business based on location. My local restaurant wants to delivery value for money so that I or my friends will come again. The restaurant in Venice never expects to see me again and is motivated to give me the lowest value for money to maximize profit. We have an example here of repeated and non-repeated games, but this is not an article about game theory.

As regular travellers, we have a strategy for finding the right place. There are a number of aspects to that strategy, but the one I want to highlight today is: Find busy restaurants. We are by no means the only people employing this strategy, as it is clear that busyness should be an indication of quality.

Where is this all going? I'm telling this story because I want to use an influence diagram to study restaurants in general, study touristy restaurants in particular and gain strategic insight from that. Influence diagrams are used to study the interactions in a system, particularly the between key strategic resources. In the case of our restaurants these will be:
  • Customers occupying tables
  • Customers queuing for tables
  • Perceived restaurant quality
  • Available customers

Figure 1. Simple Tourist Restaurant Influence Diagram

The make-up of an influence diagram is relatively simple:
  • Strategic resources, flows or other system variables
  • Arrows indicating one influencing another
  • An indication of a positive influence or negative influence
  • Optionally indications of re-enforcing and balancing loops

Consider Figure 1 above, the influences shown are as follows:
  • As the number of "New Customers Arriving" increases, the number of "Customers Occupying Tables" increases
  • As the number of "Customers Occupying Tables" increases, the "Perceived Restaurant Quality" increases
  • As the "Perceived Restaurant Quality" increases, the "New Customers Arriving" increases
  • As the number of "Customers Occupying Tables" increases, the "Length of Queue for Seating" increases
  • As the "Length of Queue for Seating" increases people will be discouraged and it will reduce the number of "New Customers Arriving"
  • As the number of "New Customers Arriving" increases, the number of "Available Customers" decreases
  • As the number of "Available Customers" decreases, the number of "New Customers Arriving" decreases

Re-enforcing loops can be exploited to achieve exponential growth and profit, but can also cause exponential collapse and bankruptcy. Balancing loops are often related to limited resources which limit what we can achieve, but also serve to mitigate damage.

Loop B1 is a balancing loop: As more customers choose to enter our restaurant, the total number of potential customers is diminished, thus reducing the flow of new customers. This puts a natural limit on our business, the number of potential customers.

Loop B2 is a balancing loop: As more customers arrive, our tables experience a higher and higher occupancy and customers must wait in a queue either for other customers to leave or for dirty tables to be turned over. Here is another resource constraint on our system: capacity.

Loop R1 is a re-enforcing loop: More customers leads to an increased perception of quality which then leads to more customers. This is they key re-enforcing loop that we should study further.

The key strategic conclusion that can be drawn form studying this influence diagram comes out of loop R1, the re-enforcing loop. The consequence of this loop is that full restaurants tend to stay full and empty restaurants tend to stay empty. Given that each restaurant starts empty each day, the key challenge appears to be in first becoming not empty. Easier said than done.

Restaurants and bars have a number of ways of achieving this. The first, but least interesting, is simply good quality. A regular customer base or recommendations in guide books will provide the seed customers from which a full house can grow. Alternatively, we need some other means of getting people in the door. This makes me think of my time in Turkey on the Mediterranean coast. Walking along the waterfront in a tourist town, a restaurant owner offered me a half-priced beer as long as I would sit along the front edge of his balcony. If this makes you think of happy hour there's probably a good reason.

I will admit that the "strategic insights" discussed above with respect to the restaurant industry are not earth moving, profound, or even unexpected. However, this article provides a simple real-world example of a dynamic system, and demonstrates the concept nicely. Had we not already known that full restaurants stay full and empty restaurants stay empty, going through this exercise could have revealed that to us.

The next step would be to design a simulation based on the influence diagram, something that I will endeavour to do in a future article.

Wednesday, September 1, 2010

What motivates us the most

First let me make clear that I am talking about the motivation in workplace. In personal life it's easy - in first half of our life it's the Sex, in second half it's the Comfort. (So to speak with tongue in cheek)

But the workplace motivation is more intriguing. And that is the area that every OR specialist should always keep in the forefront of their mind - the questions and aspects of human motivation. Here's an excellent animated video derived from the talk of one Dan Pink at RSA. Seems that Mr. Pink also excels in self-motivation, since this lecture is a small masterpiece.
True, these research findings are popping up here and there for the last two decades, at least, and lots of companies are adopting some of those principles, however this short video sums it up in excellent concise way. Enjoy!

However, I personally think that all these findings are missing some essential qualifications. I thinks that it reflects the motivation of people in developed countries, where there is no hunger and war is something nobody really remembers.
To echo the words of Mika Waltari in his book Egyptian Sinuhe, where he describes one lucky country he travels through, "...and the people who knew neither hunger no war, were already in middle age...".
I wonder, how the same research would turned out in war torn Angola, or Iraq.
I suspect that this type of "Make the world a better place" altruism grows best in economically nutritious Petri dish - relatively wealthy society. But what do I know about the poor countries. Maybe they would surprise us the most. The world is changing after all. It's the Internet age now.

One observation I made about the phenomenon of people working in their free time for free. (Linux developers, etc.) First I would liken it to simple hobby-ism. And I think that it indeed has the roots in hobbies. Everybody at some time in their life likes to build some "model airplane" and see it fly. But, and here comes my observation, they would like more to see it soar, than just fly. In other words, people don't mind to work for free on somebody's else project (i.e. Linux), but they prefer to jump on winning bandwagon. The likelihood of overall impact (let's even say world wide impact) is a specific motivation on its own.

It's the Internet age now.

Sunday, June 27, 2010

Travel, being an OR consultant, and another blog

Activities on the ThinkOR blog has been a bit thin in the last month or so. Summer has arrived and we have been busy enjoying it as much as we can in London. So far it's been a great half year: Exeter UK, Istanbul, Bursa, Ayvalık, Bergama (Pergamon) TR, Riga LV, Berlin DE, Milan, Venice, Padua, Verona IT, the Algarve PT, New Delhi, Agra, Udaipur IN, Bahrain BH, Malaga ES, Reykjavik IS, and of course Canada and the US. Not bad, eh?


To travel this much for leisure (18 countries last year), and to cover as many interesting cities as possible that span the continents, i.e. objectives; to not break the bank, to use as few vacation days as possible (we've only used 9 so far), to avoid anticipated bad weather, to not leave work too early for flights, and to not overdo it to tire ourselves out, i.e. constraints; means that we need an optimised strategy. We travel on weekends and use bank holidays as much as possible. We travel budgetly with lean (polite for 'cheap') airlines like EasyJet and Ryanair flying out after 5pm on a Friday, to trade off between more time in the destination and the cost of 1 extra night of hotel, as well as a peak rate for flights after 5pm. We make a judgment on the trade off between the central location of hotels with the higher cost usually associated. We also need to do our research on the temperature and the likelihood of rain for the cities on our list, and line the cities up with the weekends we would like to travel, but our list is often dictated and changed by the destinations of the airlines and the routes on sale. Our part time job is a travel agent, because it is quite time consuming. However, we usually plan a couple months in a batch process, and don't need to think about it again once it's in the diaries. It's kind of fun planning it, and more fun zipping away every second or third weekend.

Being an OR consultant

I just started a new job at Capgemini Consulting's operational research team. Already did one project with a major consumer product manufacturing and distribution company. Very interesting project, in which I enjoyed working on modelling their supply chain and the cash to cash cycle, and the impact of one seemingly simple decision's impact on the bottom line. This is exactly what OR is for - helping businesses make more informed decisions. The project was quite short and intense. I feel like one of the most important attributes OR people bring to the table in situations like this is what and when you can use averages, what assumptions are ok and what would come back and bite you in the butt. Perfection mostly takes second seat to delivery deadlines. It reminded me of what an advisor told me at uni, "what you learn at school will get applied very little in real life, because businesses never have the time to give to an OR guy to properly figure out the problems and solutions. They want quick answers and they want it now."

Another OR blog

Capgemini has a very cool group of OR people, and they have an OR blog too! Figure it Out. Check it out. Interesting articles on the real life applications of operational research, particularly relevant to UK topics. Of course, I will be writing for them too, as soon as I acclimate a little bit.

P.S. We at ThinkOR are very honoured to be named as one of the favourites in the OR blog world by Maximize Productivity with IE & OR Tools. Thank you very much. It is a real honour. Please let us know any topics you'd like to read about more, and we will try our best to research and write about them.

Thursday, May 13, 2010

Security Screening: Discrete Event Simulation with Arena

Simulation is a powerful tool in the hands of Operations Research practitioners. In this article I intend to demonstrate the usage of a discrete event process simulation, extending on the bottleneck analysis I wrote about previously.

A few days ago I wrote an article demonstrating how you could use bottle neck analysis to compare two different configurations of the security screening process at London Gatwick Airport. Bottleneck analysis is a simple process analysis tool that sits in the toolbox of Operations Research practitioners. I showed that a resource-pooled, queue-merged process might screen as many as 20% more passengers per hour and that the poor as-is configuration was probably costing the system something like 10% of its potential capacity.

The previous article would be good to read before continuing, but to summarize briefly: Security screening happens in two steps, beginning with a check of the passenger's boarding pass followed by the x-ray machines. Four people checking boarding passes and 6 teams working x-ray machines were organized into 4 sub-systems with a checker in each system and one or two x-ray teams. The imbalance in each system was forcing a resource to be under utilised, and Dawen quite rightly pointed out that by joining the entire system together as a whole such that all 6 x-ray machines effectively served a queue fed by all 4 checkers, a more efficient result could be achieved. We will look at these two key scenarios, comparing the As-Is system with the What-If system.

The bottleneck analysis was able to quantify the capacity that is being lost due to this inefficiency, but as I alluded, this was not the entire story. Another big impact of this is on passenger experience. That is, time spent waiting in queues in the system. In order to study queuing times, we turn to another Operations Research tool: Simulation, specifically Process-Driven Discrete Event Simulation. Note: There may be an opportunity to apply Queuing Theory, another Operations Research discipline, but we won't be doing that here today.

Discrete Event Simulation

Discrete Event Simulation is a computer simulation paradigm where a model is made of the real world process and the key focus is the entities (passengers) and resources (boarding pass checkers and x-ray teams) in the system. The focus is on discrete, indivisible things like people and machines. "Event" because the driving mechanism of the model is a list of events that are processed in chronological order, events that typically spawn new events to be scheduled. An alternative driving mechanism is with set timesteps as in system dynamics, continuous simulations. Using a DES model allows you to go beyond the simple mathematics of bottleneck analysis. By explicitly tracking individual passengers as they go through the process, important statistics can be collected like utilisation rates and waiting times.

During my masters degree, the simulation tool at the heart of our simulation courses was Arena from Rockwell Automation, so I tend to go to it without even thinking. I have previously used Arena in my work for Vancouver Coastal Health, simulating Ultrasound departments and there are plenty of others associated with the Sauder School of Business using Arena. Example. Example. Arena is an excellent tool and I've used it here for this artilce. I hope to test other products on this same problem in the future and publish a comparison.

In the Arena GUI you put logical blocks together to build the simulation in the same way that you might build a process map. Intuitively, at the high level, an Arena simulation reads like a process map when in actuality the blocks are building SIMAN code that does the heavy lifting for you.

The Simulation

Here's a snapshot of the as-is model of the Gatwick screening process that I built for this article:

Passengers decide to go through screening on the left, select the boarding pass checker with the shortest queue, are checked, proceed to the dedicated x-ray team(s) and eventually all end up in the departures hall.

An X-Ray team is assumed to take a minute on average to screen each passenger. This is very different from taking exactly a minute to screen each passenger. Stochastic (random) processing times are an import source of dynamic complexity in queuing systems and without modelling that randomness you can make totally wrong conclusions. For our purposes we have assumed an exponentially distributed processing time with a mean of 1 minute. In practice we would grab our stop-watches and collect the data, but we would probably get arrested for doing that as an outsider. Suffice it to say that this is a very reasonable assumption and that exponential distributions are often used to express service times.

As in the previous article, we were uncertain as to the relationship between throughput of boarding pass checkers and throughput of x-ray teams. We will consider three possibilities where processing time for the boarding pass checker is exponentially distributed with an average of: 60 seconds (S-slow), 40 seconds (M-medium), 30 seconds (F-fast) (These are alpha = 1, 1.5 and 2 from the previous article). In the fast F scenario, our bottleneck analysis says there should be no increased throughput What-If vs. As-Is because all x-ray machines are fully utilised in the As-Is system. In the slow S scenario there would similarly be no throughput benefit because all boarding pass checkers would be fully utilised in the As-Is system. Thus the medium M scenario is our focus, but our analysis may reveal some interesting results for F and S.

We're focused here on system resources and configuration and how they determine throughput, but we can't forget about passenger arrivals. The number of passengers actually requiring screening is the most significant limitation on the throughput of the system. I fed the system with six passengers per minute, the capacity of the x-ray teams. This ensured both that the x-ray teams had the potential to be 100% utilised and that they were never overwhelmed. This ensured comparability of x-ray queuing time.

I ran 28 (four weeks) replications of the simulation and let each replication run for 16 hours (working day). We need to run the simulation many times because of the stochastic element. Since the events are random, a different set of random outcomes will lead to a different result, so we must run many replications to study the possible results.

Also note that I implemented a rule in the as-is system, that if more than 10 passengers were waiting for an x-ray team the boarding pass checker would stop processing passengers for them.


Scenario M - Throughput Statistics

First let's look at throughput. On average, over 16 hours the what-if system screened 18.9% more passengers than as-is. The statistics in the table are important. Stochastic simulations don't given a single, simple answer, but rather a range of possibilities described statistically. The average for 4 weeks is given in the table, but we can't be certain that would be the average over an entire year. The half width tell us our 90% confidence range. The actual average is probably between one half-width below the average and one above.

Note: I would like to point out that this is almost exactly the result predicted analytically with the bottleneck analysis. We predicted that in this case the system was running at 83.3% capacity and here we show As-Is throughput is 4728.43/5621.57 of What-If throughput = 84.1%. The small discrepancy is probably due to random variation and the warm-up time from the simulation start.

But what has happened to waiting times?

The above graph is a cumulative frequency graph. It reads as follows: The what-if value for 2 minutes is 0.29. This means that 29% of passengers wait less than 2 minutes. The as-is value for 5 minutes is 0.65. This means that 65% of passengers wait less than 5 minutes.

Comparing the two lines we can see that, while we have achieved higher throughput, customers will now have a higher waiting time. Management would have to consider this when making the change. Note that the waiting time increased because the load on the system also increased. What happens if we hold the load on the system constant? I adjusted the supply of passengers so that the throughput in both scenarios is the same, and re-ran the simulation:

Now we can see a huge difference! Not only does the new configuration outperform the old in terms of throughput, it is significantly better for customer waiting times.

What about our slow and fast scenarios? We know from our bottle-neck analysis that throughput will not increase, but what will happen to waiting times?

Above is a comparison between as-is and what-if for the fast scenario. The boarding pass checkers are fast compared to the x-ray machines, so in both cases the x-ray machines are nearly overwhelmed and the waiting time is long. Why do the curves cross? The passengers that are fortunate enough to pick a checker with two x-ray machines behind them will experience better waiting times due to the pooling and the others experience worse.

This is a bit subtle, but an interesting result. In this scenario there is no throughput benefit from changing, there is no average waiting time benefit from changing, but waiting times are less variable.

Finally, we can take a quick glance at our slow S scenario. We know again from our bottleneck analysis that there is no benefit to be had in terms of throughput, but what about waiting times? Clearly a huge differenence. The slow checkers are able to provide plenty of customers for the single x-ray teams, but are unable to keep the double teams busy. If you're unlucky you end up in a queue for a single x-ray machine, but if you're luck you are served immediately by one of the double teams.


To an Operations Research practitioner with experience doing discrete event simulation, this example will seem a bit Mickey Mouse. However, it's an excellent and easily accessible demonstration of the benefits one can realize with this tool. A manager whose bottleneck analysis has determined that no large throughput increase could be achieved with a reconfiguration might change their mind after seeing this analysis. The second order benefits, improved customer waiting times, are substantial.

In order to build the model for this article in a professional setting you would probably require Arena Basic Edition Plus, as I used the advanced feature of output to file that is not available in Basic. Arena Basic goes for $1,895 USD. You could easily accomplish what we have done today with much cheaper products, but it is not simple examples like this that demonstrate the power of products like Arena.

Related articles:
OR not at work: Gatwick Airport security screening (an observation and process map of the inefficiency)
Security Screening: Bottleneck Analysis (a mathematical quantification of the inefficiency)

Tuesday, April 27, 2010

Security Screening: Bottleneck Analysis

Earlier Dawen wrote an article about her recent experience in security screening at Gatwick Airport. I thought this was an opportunity to demonstrate a simple process analysis tool which could be considered a part of Operations Research: Bottleneck Analysis.

At the airport, servers in the two-step security check process were un-pooled and thus dedicated to one another. By this, I mean that a security system with four staff checking boarding passes (step 1) and six teams at x-ray machines (step 2) were actually functioning as four separate units rather than as a team. Each unit had a boarding pass checker, two of the units had a single x-ray machine and the other two units had two x-ray machines. The consequence of this was that the one-to-one units overwhelmed their x-ray teams, forcing them to stop checking boarding passes and remaining idle. The one-to-two units were starved of passengers as the boarding pass checking could not keep up, resulting in idle x-ray machines.

We know that this configuration is costing them capacity. A very interesting question is: How much?

A Bottleneck Analysis is a simple tool for determining a system's maximum potential throughput. It says nothing about total processing time or the amount of passengers waiting in the system, but it does determine the rate at which screenings can be completed. Think of it as emptying a wine bottle upside down. Whether it's a half full bottle of molasses or a full bottle of wine, the maximum rate of flow is determined by the width of the neck (the bottleneck!). The maximum throughput rate of a system is equal to the throughput rate of its bottleneck.

The throughput of the current system is the limited by the bottleneck in each unit, each sub-system. In the case of the one-to-one units we know this is the x-ray machine, as they are unable to keep up with supply from upstream and are thus limiting throughput. In the case of the one-to-two units we know it is the boarding pass checker as the x-ray machines are waiting idly for new passengers and are thus limited. It follows that the maximum throughput for the combined system is two times the throughput of a single boarding pass checker plus two times the throughput of a single x-ray machine.

The natural reconfiguration that Dawen alludes to her in her article is one where the resources are pooled and the queues are merged. Rather than having two x-ray machines dedicated to a single boarding pass checker, passengers completing step 1 are directed to the x-ray machine with the shortest queue. In this way an x-ray machine is only idle if all four boarding pass checkers are incapable of supplying it a passenger and a boarding pass checker is only idle if all six x-ray machines are overwhelmed.

What is the throughput of this reconfigured system? The throughput is equal to the bottleneck of the system. This is either the four boarding pass checkers as a team if they are incapable of keeping the x-rays busy or the x-ray machines as a group because they are unable to keep up with the checkers. The bottleneck and thus maximum throughput is either equal to four times the throughput of a boarding pass checker (step 1) or six times the throughput of an x-ray machine (step 2), whichever is smaller.

Returning to the exam question, how much capacity is this miss-configuration costing them? At this point we need must resort to some mathematical notation or else words will get the better of us.

Readers uninterested in the mathematics may want to skip to the conclusion.

Let x be the throughput rate of an x-ray machine.
Let b be the throughput rate of a boarding pass checker.

The maximum throughput of the as-is system is thus 2x + 2b (see earlier).
If step 1 is the bottleneck in the reconfigured system then the max throughput is 4b.
If step 2 is the bottleneck of the reconfigured system then the max throughput is 6x.

If 4b <> 6x then step 2 is the bottleneck.

If we were managers working for the British Airport Authority (BAA) at Gatwick Airport our work would essentially be done. We could simply drop in our known values for b and x and reach our conclusion. For this article, though, we don't have the luxury of access to that information.

Returning to the exam question again, how can we determine what the cost of this miss-configuration is without knowing b or x?

We will employ a typical academic strategy:
Let b = αx or equivalently b/x = α.

If 4b <> 1.5 then the throughput of the new system is 6x.

The throughput of the as-is system is 2b + 2x = 2 α x + 2x.

The fraction of realized potential capacity in the as-is system is the throughput of the as-is system divided by the potential throughput of the reconfigured system.

If α < x =" 1/2"> 1.5 then it is (2 α x + 2 x) / 6x = 1/3 + α/3

What are the possible values of α? We know α is at least 1 because otherwise the x-ray machines in the one-to-one systems would not be overwhelmed by a more productive boarding pass checker. We know α is less than 2 or else the x-ray machines in the one-to-two systems would not have been idle.

We know have a mathematical expression for the efficiency of the current system:

f(α) = 1/2 + 1/(2 α) where 1 <= α <= 1.5 f(α) = 1/3 + α /3 where 1.5 <= α <= 2 But what does this look like?

Depending on the relative effectiveness of boarding pass checking and the x-ray machines, the current efficiency is as follows:

If α is 1 or 2, then the as-is system is at peak efficiency. If α is 1.5 we are at our worst case scenario and efficiency is 83.3% of optimal.


Based on the graph above, depending on the relative effectiveness of the boarding pass screeners and the x-ray machines (unknown), the system is running at between 83.3% and 100% efficiency. The most likely values is somewhere in the middle, so there is a very good chance that the configuration of the security system is costing them 10% of possible capacity. To rephrase that, a reconfiguration could increase capacity by as much as 20%, but probably around 11%. In the worst case a reconfiguration could allow for the reallocation of an entire x-ray team yielding significant savings.

As stated previously, a bottleneck analysis will determine the maximum throughput rate, but it says nothing about the time to process a passenger or the number of passengers in the system at any one time. We now know that this miss-configuration is costing them about 10% capacity, but there are other costs currently hidden to us. What is the customer experience currently like and how could it improve? Is the current system causing unnecessary long waiting times for some unlucky customers? Definitely. More advanced methods like Queuing Theory and Simulation will be necessary to answer that question, both tools firmly in the toolbox of Operations Research practitioners.

Related articles:
OR not at work: Gatwick Airport security screening (an observation and process map of the inefficiency)
Security Screening: Discrete Event Simulation with Arena (a quantification of the inefficiency through simulation)

Wednesday, April 21, 2010

OR not at work: Gatwick Airport security screening

I fly through London Gatwick airport quite a bit, whose operation is managed by BAA (British Airport Authority). Usually, I'm quite pleased with my experience through the security screening. However, for my last flight on April 1st from Gatwick to Milano, I was quite intrigued by how poorly it was run. I didn't think it was an April Fool's joke. :) So, after I went through the lines, I sat down, observed, and took some notes.

This was how it was set up (click to enlarge).

To start with, Queue1a & Queue1b were quite long and slow moving. Basic queueing theory and resource pooling principles tell us that 1 queue for multiple servers is almost always better than separate queues for individual servers. Therefore, I was surprised to see 2 queues. Roughly 100+ people were waiting in these 2 queues combined. I waited for at least 15-20 minutes to get to the CheckBoardingPass server.

I wasn't bored though, because the second thing that surprised me was that within the same queue, one CheckBoardingPass server was processing passengers, while the other had to halt from time to time. It was because Queue2a was backed up to the server, while Queue2b&c were almost empty. After I saw how the x-rays were setup, it was easy to see that the unbalanced system was due to the 6 x-rays not being pooled together.

The effect was a long wait for all to start with in Queue1a&b, then some waited nothing at all (i.e. me) in Queue2b/c/d/e, while others waited in a lineup of 5-15 people in Queue2a/f. For the 4 CheckBoardingPass ladies, 2 of them were busier than the others, but all could feel the pressure and frustration from the passengers in Queue1a&b. For the staff manning the x-rays, this meant some were very busy processing passengers, while others were waiting for people to show up.

Also worth mentioning was that each x-ray was staffed by 5 persons: 1 before it to move the baskets and luggage towards the x-ray, 1 at it to operate the x-ray, 1 after it to move the luggage and baskets away from the x-ray, and 2 (1 male and 1 female) to search the passengers going through the gate, if they trigger the bleep. Seems very labour intensive. If they studied the arrival pattern of passengers needing to be searched, I wonder if it'd save some personnel here by pooling at least the searchers for a couple x-rays (if unions permit!).

We've had this type of problem cracked for some time now and it is surprising to see major problems still. Gatwick Airport / BAA was obviously doing quite well all the other times I've gone through. How easy it is for a good organisation to perform poorly just by ignoring a few simple queue setup rules. For example, in 2001, my master's program run by the Centre for Operations Excellence out in the University of British Columbia, in the lovely Vancouver, Canada, did a very good project with the local Vancouver International Airport (YVR) on just that. The project used simulation to come up with easy-to-follow shift rules for the security line-ups so that 90% of the passengers would wait for less than 10 minutes to go through. In fact, the project even caught the attention of the media, and was broadcasted on the Discovery Channel (how cool is that, and how fitting for OR work). Watch it here. Now come on, BAA, you can do better than this.

Related articles:
Security Screening: Bottleneck Analysis (a mathematical quantification of the inefficiency)
Security Screening: Discrete Event Simulation with Arena (a quantification of the inefficiency through simulation)

Update (9 Oct 2010):
in this article, we erroneously stated that the airport operator was BAA (British Airports Authority). In fact, BAA was forced to sell Gatwick to please regulators seeking to break a monopoly on UK's airports. Our apologies to BAA. The current owners are Global Infrastructure Partners, who also owns 75% of the London City Airport.

Sunday, March 28, 2010

The 5 acts of the financial crisis - review of The Power of Yes

Ever wanted answers to some of the many questions in your head on the current financial crisis? Want to know how the story started? David Hare's play, The Power of Yes, at the National Theatre in London kept me on the edge of my seat feverishly taking notes in the dark, and hanging onto every word said in the 1hr45min stage play. If you have the chance, see it. For someone like me, who's not had much to do with finance but would like to understand, this is investment 101, with interesting, non-monotone lecturers. (Actually, I did take Investment 101 in an MBA module during my master of management in operations research program at the Sauder School of Business in Vancouver, Canada, and the prof was quite fun.)

The story informatively reveals to the audience the complexity of the crisis' origin, however, mainly pointing fingers at the bankers, the governments and the mathematical models which claim to predict the future. Altogether they upset the balance of greed and fear, which the financial market and capitalism survive on. The story tells of the current (2007-present) financial crisis in 5 acts: SLUMP.

  1. Sub-prime
  2. Liquidation
  3. Unravelling
  4. Meltdown
  5. Pumping

1. Sub-prime loans (this is the longest part as much history is involved)
Hare starts the storytelling with a mathematical formula (which perked me up right away) - the Black-Scholes formula for option pricing. Wikipedia says, "Trillions of dollars of options trades are executed each year using this model and derivations thereof". That's why Hare went straight to it, and throughout the play referred to the model and its derivations as to "claim to predict the future". Also mentioned was the Monte-Carlo model of the probability of defaulting.

Perhaps I'm biased, as this is operations research in finance, but I would disagree with Hare's statement about the models claiming to predict the future. All models are an approximation to the real world, but aren't the real world, so they always have inherent flaws and limitations. Understanding the limitations is the key to applying the results from the models in the real world, otherwise it is foolish and risky. If you read through the Wikipedia article on the Black-Scholes formula, you will see that it also tries to make this point across to the readers. Assumptions such as a 'rational market and behaviour' and 'normality' goes out of the window when in a financial crisis like the stock market crash, and the model becomes defunct.

Having set the theoretical stage and outlined one 'villain', Hare goes on to illustrating the roles of the second 'villain' - the governments, in particular, the British and the US governments. In 1997, the British government made the Bank of England an independent entity, and gave the regulatory and monetary policy setting responsibility of the financial system to a new body, FSA (Financial Services Authority), so that the banks could concentrate on running the bank business and managing its products. However, Hare argues that this division of responsibility meant no one was responsible for the overall financial system. The FSA was more of a neighbourhood watchdog than a police of the system. Also, the financial sector grew to 9% of UK's economy paying the government 27% of the taxes it collected. It was a big cash cow, and no government wanted to limit its growth. In fact, the Bush administration wanted every American to own his/her home, which only encourages borrowing.

Then the third 'villain' is revealed, the banker. The banker is greedy, and is driven to be so by targets and "regular incremental growth". The banker encouraged the people to buy homes when they couldn't afford it, and pressured the credit rating agencies to give good credits so the people can get loans. The division of responsibility meant no one was ensuring the credit ratings were reliable when the banks pushed to make more money by lending it out to every living and breathing person, but who can't actually afford it. Sub-prime loans.

2. Liquidation
("The conversion of assets into cash. Just as a company may liquidate an entire subsidiary by selling it to another firm, so too may an investor liquidate by selling a particular type of security.")

Why were the bankers pushing for more loans? Because homes = assets, and assets = more leverage to lend out for the banks. In fact, The Royal Bank of Scotland (RBS) was lending out at 30-to-1 leverage ratio (i.e. you lend out £30 based on £1 of asset).

The game of slicing and dicing of assets into packages and then trading it with other financial institutions (i.e. selling / liquidating debts) meant that soon enough no one knew what was in those packages, but some of them were sub-prime loans, which was toxic debt. The concept of toxic debt is well explained here: "The easiest way to describe toxic debt is to see it as two separate issues. One, large amounts of loans were improperly given higher credit ratings (implying lower risk of default). The second is that the value of the homes securing these loans has dropped".

3. Unravelling
Credit = Trust. Toxic loans ==> bad credit ==> no trust.

On August 9, 2008, banks lost trust, and stopped lending money. One quote from the play says, "Banks don't go bankrupt for any other reason... but that they ran out of money". This brought the financial system to a halt. Capitalism was having a cardiac arrest. Let's just say the media didn't help and drove fear steady into the mass.

4. Meltdown
Subsequently, the cardiac arrest brought down Lehman Brothers in the US first, and in the UK, Northern Rock went down as the nation's first casualty. The fall of Lehman Brothers triggered a world-wide panic and collapse of 'trust' in the financial system. People in the UK were queueing for their money from the banks. The Brits love to queue for things: a quote from the play, "When the Brits see a queue, they join it". In the US, the big financial institutions went one after the other into troubles.

5. Pumping
The US government had to bail them out by spending hundreds of billions of dollars. And if they didn't do so, the other sectors would be dragged down by the fall of the financial sector as well. Then other governments followed suit as this is a global financial crisis, and now governments are wasting and pumping money into the economy to try to rescue it.

This wraps up the 1hr45min play with no intermission. I think the title, the power of yes, is referring to the 3 'villains' of the story saying yes to lending recklessly, and therefore creating debt-laden societies. What's your interpretation? I hope I've done the play justice. I thoroughly enjoyed it, and learned lots from it that is helping me shape my understanding of the financial crisis. I wonder why my alma mater didn't include any financial applications of operations research in the programme. Is it because it is so easily misunderstood by newcomers? Then wouldn't that be a reason for teaching it more broadly?

Saturday, February 6, 2010

Bachelor Efficiency.

It seems to be a known fact that confirmed bachelors are at times amazing inventors of time and labor saving methods, gizmos, and procedures. Here is another one.

Recently I was visiting my bachelor friend John at his house and when I was rummaging in his drawers, searching in vain for a spoon, he has proudly shown me his latest labor saving device, (which also explained the lack of spoons in the drawers). He didn’t claim the idea as his own, on contrary; he said it is becoming a trend among their bachelor brethren, but I have seen it for the first time.

He has purchased himself two dishwashers, installed them side by side and is using them alternatively. Filling the one with dirty dishes and taking the clean dishes out of the other. He owns just enough dishes to fill one dishwasher up. This way, when he runs out of dishes, he switches the one full of dirty dishes on and reverses the process. He reports with an extreme satisfaction that he never needs to unload the dishwasher and file the dishes back into the drawers and cupboards. I think there is a lesson here for OR in it.

I’ll call it “The Bipolar Dishwashers Method”.

Sunday, June 14, 2009

Simple Hostel Yield Management Example

Continuing on from my thoughts in Yield Management in Hostels?, in this article I present a simplified example of how a Hostel might use simple Yield Management principles to increase its profitability.

Yield Management or Revenue Management or Revenue Optimization is a set of theories and practices that help companies, typically in the transportation and hospitality industry, gain the most revenue possible by selling a limited product where short-term costs are, for the most part, fixed. Simply put, this is why the prices of plane tickets change every time you check and why you can save on hotel rooms by booking in advance.

Consider a simplified hostel. Another time I will discuss some of these simplifications. This hostel takes only single-person bookings for a maximum of a 1-day stay. This hostel has the following rooms: 6 private single rooms and one 6 person dorm. The beds in the single rooms go for £20 and beds in the dorm go for £10. The hostel has entirely fixed costs, meaning they would rather fill a bed at 1p than have it be empty.

Our simplified hostel realizes demand in two streams. The cheapskate travelers desire the cheap dorm rooms, and the wealtheir backpackers are willing to splurge on a single room. The cheapskates would choose the single rooms if they were the same price, and this is the key to my example.

Our hostel is considering bookings for July 1. Currently 1 of the 6 single rooms are booked and the dorm room is full with 6 of 6 beds taken. Currently revenue for this day is £80. This is low compared to the maximum potential of £180, but we're not concerned yet because there are still several days left to take bookings for the single rooms. However, during this time we may also have to turn away some cheapskates, as our dorm is full. Now we ask the question: What would happen to our revenue if we gave one of our cheapskates a free upgrade to a single room, freeing up a dorm bed for more bookings? Let us consider the scenarios in the following table:

New Single Room Booking RequestsNew Dorm Room Booking RequestsResulting Occupancy With UpgradeResulting Revenue With UpgradeResulting Occupancy Without UpgradeResulting Revenue Without Upgrade
5+06/6 Single, 5/6 Dorm£1606/6 Single, 6/6 Dorm£180
5+1+6/6 Single, 6/6 Dorm£1706/6 Single, 6/6 Dorm£180
x<=40(2+x)/6 Single, 5/6 Dorm£80+£20x(1+x)/6 single, 6/6 Dorm£80+£20x
x<=41+(2+x)/6 Single, 6/6 Dorm£90+£20x(1+x)/6 Single, 6/6 Dorm£80+£20x

I've colour coded the scenarios above so we can see when we would benefit from upgrading a guest, when we would suffer, and when we are indifferent. In the first two scenarios we receive enough single room booking requests that we could have filled our single rooms at £20, and thus putting a cheapskate in there for £10 hurts our total revenue. In the third scenario we do not receive enough booking requests to have to turn anyone away, so we are indifferent between the upgrade and not. Finally, in the last scenario, if we offer an upgrade, a cheapskate sleeps in as single room for £10 that would otherwise have gone empty and the dorm remains full.

Evaluating the decisions is then a matter of estimating the likelihood of each scenario and calculating the expected revenue for each choice. We evaluate the decision in the same way you would evaluate the following game: I flip a fair coin. If it lands heads I give you £2 and if it lands tails you give me £1. Naturally you would calculate that 0.5*£2 - 0.5*£1 = £0.50 and thus the game is worth playing. The expected value of the decision to play is £0.50.

In order to carry this example through, suppose the probability of there being 5 or more single booking requests is 20% and 4 or fewer is 80%. Suppose the probability that 1 or more dorm booking requests is 75% and 0 is 25%. All probabilities are independent.

Expected value of offering an upgrade = 20%*25%*£160 + 20%*75%*£170 + 80%*25%*(£80+£20x) + 80%*75%*(£90+£20x) = £103.5 + £20x
Expected value of not offering an upgrade = 20%*25%*£180 + 20%*75%*£180 + 80%*25%*(£80+£20x) + 80%*75%*(£80+£20x) = £100 + £20x

As we can see, in the example that I have just constructed, we can expect to make £3.50 by giving a guest an upgrade in the same manner that we expect to gain £0.50 by playing the coin tossing game. Now £3.50 may not sound like a lot, but scale this up to a multi-hundred bed hostel and we're talking about more money.

What made this a winning decision? The £10 we might gain by replacing our upgradee with another guest in the dorms outweighs the £20 we might lose if we have to turn someone away from the single rooms.

So what? Just how likely is this scenario? Consider Smart Russel Square, a large hostel in central London, UK. As of 9:00 pm local time on Sunday, the current bookings* for Tuesday are as follows:
  • Large Dorms (10 person and above) 159/160 booked
  • Small Dorms (9 person and below) 135/276 booked.

*data gleaned from, reliability uncertain.

Based on your gut feeling, what are the odds that they could realize an expected benefit from upgrading some of their large dorm guests to small dorms? 10 guests? 20 guests? If the large dorm beds were filled this could represent £100-£300 in additional revenue. Minus the marginal costs of the guest including their free breakfast of course. Food for thought.

Later I would like to generalize this simple scenario, discuss the simplifications, assumptions, limitations and extensions. That's all for now, though.

The way I've set this up might seem strange. Why go to the trouble of upgrading someone from the dorm when you could simply sell a single room as a dorm room? This is because I'm already looking forward to implementation. I don't anticipate hostel management IT systems to have the ability to do this. Instead I envision hostel management IT systems linking bed inventory directly to what is offered online, and thus for us to offer beds at the dorm rate, there must be beds available in the dorms on our system. Additionally, rather than being handled directly by the IT systems, I envision a clerk/manager manually intervening in the system and upgrading a booking. This person might follow a simple set of decision rules compiled from analysis of past data in order to make their decisions. If this strategy proved to be profitable, then it's integration into IT systems might occur.

Monday, June 8, 2009

Yield Management in Hostels?

In my recent travels in Europe I have again had significant exposure to the Hosteling Industry. As readers of this blog will know, we can't help but seeing Operations Research or opportunities in our daily lives. Sure enough we find ourselves analyzing our surroundings and considering the pricing structures of our hostels. In this article I hope to begin an exploration of pricing strategies in the hostel industry that I will continue after I have collected some of your thoughts and more of my own.

The Hostel industry has been rapidly developing throughout the world. According to Wikipedia, youth hostels had their humble origins in German Jugendherberge (1912), non-profit hostels for youths by youths. Fast forward to today and you can witness the evolution to profit-maximizing corporate hostels sometimes exceeding 500 beds.

That said, sophistication in the industry seems to be developing more slowly. In particular, possibly due to it's origins, there is significant resistance to profit-maximizing activity like yield management. I also believe that there is a growing suite of hostel management IT systems with some direct interfacing with booking websites. I can't claim to be an inside expert in the industry, though we did have a nice informal chat with the manager of a small-to-medium-sized non-profit hostel over beers in Munich.

Youth hostels face a problem that is similar in some ways, but different in others to that faced by traditional hotels. Apart from the obvious similarity of product, the primary similarity is that both face an expiring good that is booked ahead of time and cannot be stored.

Hostels, however, do not have business customers. Traditional revenue optimization approaches for hotels centre around price discrimination. With leisure customers and business customers that can be separated by booking time, hotels can sell rooms early at a discount to money-saving leisure customers and sell the remainder later to late-booking, price-insensitive business customers. Hotels can sell some rooms to leisure customers who would otherwise have gone to the competition had they been charged full price, and hotels can then later sell the remaining rooms at a higher price to business customers who would otherwise have only paid the flat rate that leisure customers pay. Hostels on the other hand face an exclusive stream of budget-sensitive travellers. The differentiation achieved by time of booking is thus only a question of how far the customer plans ahead and may say little about their willingness to pay.

Hostels have a wider range of product. I'm not an expert in the hospitality industry, so maybe I can ask our readers to confirm this, but I believe your typical hotel offers simply twin, triple, double, queen, and king rooms. The Meininger City Hostel and Hotel in Munich, Germany for example offers 9 distinct products on Single Private Ensuite, Twin Private Ensuite, 3 Bed Private Ensuite, 4 Bed Private Ensuite, 5 Bed Private Ensuite, 6 Bed Private Ensuite, 6 Bed Mixed Dorm Ensuite, 6 Bed Female Dorm Ensuite, 14 Bed Mixed Dorm Ensuite. Something that bears noting is that for the most part these products can be ranked such that any customer will unconditionally prefer one over those below it. For the most part, no customer would prefer to sleep in a 14 Bed Mixed Dorm when they could be in a 6 Bed.

Other factors relevant to the question of YM in hostels: I estimate that the majority of hostel stays are booked through internet booking websites, with the majority of those coming from The majority of these bookings are thus made after some moderate price comparison making the market fairly competitive. Many of these bookings will also be made factoring in reviews of the hostel. Sometimes hundreds of website users will have given the hostel a rating for things like security and cleanliness.

The lack of business customers does not mean that hostel customers cannot be segmented. I propose that hostels face two main types of customers. One group comprises the shoestring customers, willing to do anything to save a dollar (or a euro or a pound, etc.). The other group is more differentiating, willing to pay slightly more for a smaller dorm. I'm still working out the significance of this for myself.

I believe there is an opportunity there. Some initial research based on my own experience and some creative use of hostelworld shows that hostels often fill from the bottom up. That is that the largest dorms with the cheapest beds are the first to fill up, and the smaller rooms frequently go empty during the week. This may be a sign that the supply of hostel beds does not match demand. This may show that there are more small dorms in the market than desired and fewer large dorms.

I welcome any comments on the topic. Is there a business opportunity here, or is it just academic? Is the current state of IT and sophistication in hosteling sufficient to work on elementary yield management? Most hostels have a Friday-Saturday price, and everyone in Munich has a low season, high season, and Oktoberfest price, but could we go further?

Sunday, May 3, 2009

London King's Cross train station platform utilization

In a previous article, Maximizing airport runway & boarding gates utilization at London Heathrow, I talked about the assignment of boarding gates at London Heathrow Terminal 5. They are not assigned until about 40 minutes before departure. I suppose it would only be logical to find the similar approach used on train station platform assignments in London's King's Cross rail station.

As can be seen on the picture above, platforms are assigned only about 15-20 minutes before the train's departure time. They appear to be using a hot platforming system similar to the gates at T5. This has it's advantages and disadvantages though.

It creates a commotion in front of the information board once the platform is finally assigned. Streams of people start to pour away from the information board, which is in the centre of the rail station, making foot traffic rather chaotic. For one train we took, it was so chaotic that the train narrowly managed to depart on time, and it seems likely that delays are sometimes caused. Also, there is always a huge crowd of people waiting in front of the info board at any time, with their pieces of luggage, which again makes foot traffic congested.

Then again, as the crowd of Friday-afternoon-bank-holiday-Monday-weekend travelers pushed to board the KGX to Leeds train, we were met by a team of 8+ ticket checkers who processed us efficiently. These resources only had to be assigned for the 15 minute window between platform announcement and departure. Another possible advantage might be the ability to allow travelers to depart incoming trains before being crowded by outgoing passengers. This suggests the possibility that the platform is known but not announced in order to manage foot traffic, though they are having mixed results given the disadvantages listed above.

Thursday, March 12, 2009

Lean Airport with Clear Measurement at London Heathrow

The London Heathrow Terminal 5, which cost 4.3 billion pounds to construct, was described to be a "national embarrassment" for the UK due to its chaotic and "mayhem"-like opening on March 27th, 2008. Blames were put on the problematic computer system behind the luggage belts. On the opening day, 34 flights were cancelled, passenger check-in's were suspended, 20,000+ bags were stranded due to the inefficient system, and passengers waited for hours because of it.

Less than one year later, the London Heathrow Terminal 5 is doing very well. Going through the London Heathrow airport recently, I noticed the following sign just past the Terminal 5's security check point, which screamed "lean operations" to me. It measures and reports on the terminal's various wait time, service availability, overall ease and accuracy, as well as cleanliness.

In particular, the measurement of "Flight information" in the following photo is related to the last article on Maximizing airport runway & boarding gates utilization at London Heathrow, where I talked about the flight information board of gate assignment. It seems like all targets were achieved and some were exceeded. Well done.

Also, the reporting on "Security waiting time for transfer passengers" reminded me of a project done in 2003 by the Centre for Operations Excellence at the Sauder School of Business in the University of British Columbia with the Vancouver International Airport (YVR). The project team created a simulation model to form optimal staffing requirement for the security check point to meet the target of "90% of customers pass through the security check point in 10 minutes or less".

I guess when people pay attention, things can be done properly. "The general consensus at the moment is that Terminal Five has put its initial problems firmly behind it. British Airways believes that the terminal now provides the 'best customer experience Heathrow has known' for several years. Furthermore, the airline holds frequent meetings with BAA in order to review the airport’s performance." (source: Heathrow Airport Guide)