Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Post on 11-Apr-2017

93 views 0 download

transcript

Monte Carlo Modellingon a Blackpool Budget

Paul BrierleyTimetabling Manager

Monte Carlo Modellingon a Blackpool Budget

Agenda

Examples and Conclusions

Hard Problems

The Monte Carlo Method

Solving Hard Problems with Monte Carlo

NP Hard Problems

NP Hard Problems

Computer Science has a concept called “NP Hard” problems.

“Non-deterministic Polynomial-time Hard”

In other words:

A computer can tell you if a given set of options works but it would take an extremely long time to find the “best” answer.

There’s no shortcut other than looking at every possible solution.

NP Hard Problems

What is the fastest way of completing Super Mario Bros?4 minutes and 57 seconds

NP Hard Problems

http://stackoverflow.com/questions/2162397/are-all-scheduling-problems-np-hard

NP Hard Problems

The short version:

Some problems are too hard even for a computer to solve in a reasonable timeframe and timetabling is one of them.

When dealing with hard problems the human factor makes it worse!

(it’s also not as much fun as Super Mario)

What is the Monte Carlo Method?

What is the Monte Carlo Method?

“In physics-related problems, Monte Carlo methods are quite useful for simulating systems with many coupled degrees of freedom, such as fluids, disordered materials, strongly coupled solids, and cellular structures.

“Other examples include modelling phenomena with significant uncertainty in inputs such as the calculation of risk in business and, in math, evaluation of multidimensional definite integrals with complicated boundary conditions.

“In application to space and oil exploration problems, Monte Carlo–based predictions of failure, cost overruns and schedule overruns are routinely better than human intuition or alternative ‘soft’ methods.”

Wikipedia Definition

“In physics-related problems, Monte Carlo methods are quite useful for simulating systems with many coupled degrees of freedom, such as fluids, disordered materials, strongly coupled solids, and cellular structures.

“Other examples include modelling phenomena with significant uncertainty in inputs such as the calculation of risk in business and, in math, evaluation of multidimensional definite integrals with complicated boundary conditions.

“In application to space and oil exploration problems, Monte Carlo–based predictions of failure, cost overruns and schedule overruns are routinely better than human intuition or alternative ‘soft’ methods.”

What is the Monte Carlo Method?

The short version:

The Monte Carlo method is way of coming up with answers to hard problems that are:

• Better than guessing

• Probably right

• Easier and quicker than doing the math!

What is the Monte Carlo Method?

Define your problem

Randomly guess the answer

Repeat many times

Record the result

Find the best result

What is the Monte Carlo Method?

Important note:

The Monte Carlo method is not guaranteed to find you the best answer.

The more iterations, the more likely you are to find the best answer.

What is the Monte Carlo Method?

Example #1: How much space to build?

North

Campus

Oxford Road

Campus

MECD

Problem: How much space to build?

Current North Campus Central Teaching Room Provision

Renold Building – 28 rooms including 1 x 532, 2 x 296

George Begg Building – 5 rooms

Pariser Building – 5 rooms

Sackville Street Building – 11 rooms

The Mill – 2 rooms

(plus a big pool of School controlled rooms of various sizes)

Problem: How much space to build?

Problem: How much space to build?

Problem: How much space to build?

Problem: How much space to build?

http://atom.smasher.org/construction/

Problem: How much space to build?

Phrase the problem in terms of numerical values:

• How many rooms of size 0 to 30 should we have?

• How many rooms of size 31 to 50 should we have?

• How many rooms of size 51 to 100 should we have?

• How many rooms of size 101 to 200 should we have?

• How many rooms of size 201 to 300 should we have?

• How many rooms of size 301 to 400 should we have?

Problem: How much space to build?

RANDBETWEEN(lower, upper)

=RANDBETWEEN(0,10)

Number of Rooms of Each Size0 - 30 31 - 50 51 - 100 101 - 200 201 - 300 301 - 400 401 - 500 501 - 600

78 61 67 30 11 4 1 2

91 61 77 30 14 5 1 2

81 62 65 34 14 9 1 2

Problem: How much space to build?Overall usage

for this combination of

spaces

Calculated from real demand and random supply

Frequency of use of Rooms Weighted Average0 - 30 31 - 50 51 - 100 101 - 200 201 - 300 301 - 400 401 – 500 501 - 600

111% 49% 41% 44% 53% 56% 63% 16% 62%

95% 38% 35% 44% 42% 45% 63% 16% 57%

107% 45% 42% 39% 42% 25% 63% 16% 59%

Problem: How much space to build?

Outcome:

Problem: How much space to build?

The approach answers the question that you asked!

We thought we had asked “how many rooms should we build?”

We actually asked “how many rooms give us the most efficient use of space?”

Example #2: How to structure induction event?

Problem: How to structure an Induction event?

Problem: How to structure an Induction event?

Requirements:

• 2,000 participants

• During Welcome Week

• 30 minutes in a large lecture theatre

• 2 hours in small groups (flat rooms)

• 30 minutes in a large lecture theatre

• Keep everything close together for logistical reasons.

Problem: How to structure an Induction event?

Questions:

• How many sessions?

• Where on campus?

• Efficient use of space

• How to divide the cohort?

• Who do we disrupt?

• Interdependencies between all these.

Group 1Group 2

Group 1

Group 2

Group 1

Group 2

Group 3

Group 1

Group 2

Group 3

Problem: How to structure an Induction event?

We can simplify the problem a bit (“local knowledge” of best rooms)

…but there are simply too many variables to explore every possibility.

Problem: How to structure an Induction event?

Session #1 Session #2

600 Seat

470 Seat

400Seat

284 Seat

236 Seat

600 Seat

470 Seat

400Seat

284 Seat

236 Seat

0 470 400 0 0 600 470 0 0 236

600 0 400 284 0 600 0 400 284 236

0 470 0 0 0 0 0 0 284 0

Problem: How to structure an Induction event?

Total Seats

Booked

How many times has each room been used? Sessions required600 Seat 470 Seat 400 Seat 284 Seat 236 Seat

4,898 2 3 3 3 2 3

2,096 0 2 1 1 2 2

1,906 2 1 0 0 2 2

=SUM(Range)=COUNTIF(Range, Condition) =MAX(Range)

Problem: How to structure an Induction event?

Outcome:

Conclusions

Positive Conclusions

It’s a powerful tool for complex problems.

It impresses academics!

Surprisingly simple to do with some Excel skills.

Negative Conclusions (or warnings)

Sometimes hard to phrase the question.

You get the answer to what you ask:…make sure you ask the right question.…you may not like the answer.

Hard physics questions may follow.

Any Questions?

paul.brierley@manchester.ac.uk