monte carlo on a blackpool budget - paul brierly - holink2016

37
Monte Carlo Modelling on a Blackpool Budget Paul Brierley Timetabling Manager

Upload: holink

Post on 11-Apr-2017

93 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Monte Carlo Modellingon a Blackpool Budget

Paul BrierleyTimetabling Manager

Page 2: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Monte Carlo Modellingon a Blackpool Budget

Page 3: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Agenda

Examples and Conclusions

Hard Problems

The Monte Carlo Method

Solving Hard Problems with Monte Carlo

Page 4: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

NP Hard Problems

Page 5: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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.

Page 6: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

NP Hard Problems

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

Page 7: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

NP Hard Problems

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

Page 8: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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)

Page 9: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

What is the Monte Carlo Method?

Page 10: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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.”

Page 11: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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!

Page 12: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

What is the Monte Carlo Method?

Define your problem

Randomly guess the answer

Repeat many times

Record the result

Find the best result

Page 13: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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.

Page 14: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

What is the Monte Carlo Method?

Page 15: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Example #1: How much space to build?

Page 16: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

North

Campus

Oxford Road

Campus

MECD

Problem: How much space to build?

Page 17: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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?

Page 18: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Problem: How much space to build?

Page 19: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Problem: How much space to build?

Page 20: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Problem: How much space to build?

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

Page 21: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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?

Page 22: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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

Page 23: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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%

Page 24: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Problem: How much space to build?

Outcome:

Page 25: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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?”

Page 26: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Example #2: How to structure induction event?

Page 27: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Problem: How to structure an Induction event?

Page 28: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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.

Page 29: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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

Page 30: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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.

Page 31: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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

Page 32: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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)

Page 33: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Problem: How to structure an Induction event?

Outcome:

Page 34: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Conclusions

Page 35: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Positive Conclusions

It’s a powerful tool for complex problems.

It impresses academics!

Surprisingly simple to do with some Excel skills.

Page 36: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

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.

Page 37: Monte Carlo on a Blackpool Budget - Paul Brierly - HOlink2016

Any Questions?

[email protected]