SlideShare a Scribd company logo
1 of 101
HOW A FRENCH GUY CAN TEACH
 IN A MANDARIN-SPEAKING COUNTRY
Problem: I speak French, you speak Mandarin.

Solutions:
+ English
+ Images
+ Stupid questions (I do not ask stupid
        questions because of stupidity,
        it's just for checking that there's
        no misunderstanding)
+ Interrupt me + send emails
+ Feel free of discussing in Mandarin
I don't want so speak Chinese to you


In France, we say

             “this is Chinese to me”

for “I can't catch a word”.


==> Please tell me if I “speak Chinese to you”.
DISCLAIMER


Fact 1: Many applications in these lessons are
  about military applications.
Reason: Easy to understand + many precursor
  operation research works are military.

Fact 2: My main application fields are ecological
  and energetical.
Implication: We will see such applications later,
  with much more details.
WHAT IS THE POINT
            IN THESE 3 HOURS ?
This is about Operations Research (OR).
Key points:
  - OR can help a company/country to save up
     plenty of $.

  - new OR works usually do not originate at the
     head of companies / countries; originate in
     young people who want to do new things.

  - you can be very useful if you understand the
     goal of OR.
Operations Research
       everywhere.



   I hope that from now on,

      you will see plenty

of OR opportunities everywhere.
POLL

This teaching is adaptive.
Tell me what you want, and I'll try to adapt.
Email: olivier.teytaud@inria.fr
  (emails will be considered as private, no forward, no archive;
   only an anonymous agregation is public)

More mathematics ?
More illustrative examples ?
More C / C++ / Java / Matlab examples ?
More examples in domain X or Y ?
More algorithmic elements ?
Today, illustrative examples mainly ==> simple.
Overview


1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition
   d) others
   e) all-in-one
OP. RESEARCH: Definitions

Goal = near optimal decisions to
complex decision-making problems.

Similar to:
  - Decision sciences
  - Management sciences (part of)

Close to artificial intelligence
==> we will see plenty of vocabulary,
 because vocabulary = crucial for finding
 relevant literature.
OP. RESEARCH: History


- Some precursors

- “Real” birth in world war II

- Then widely spread everywhere
     - industry
     - business
Overview


1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition
   d) others
   e) all-in-one
WORLD WAR II viewed from Europe

- France + others quickly defeated
   ==> Hitler close to complete victory
- But UK resists, so Germany must fight both
   on East and West
- Also UK territory can be used by US
   for bombing germany
- The surprising resistance of UK is a key
   element of World War II
- Op. Research = key element of WW II.
WORLD WAR II


- Modern techniques
    everywhere

- Supply chain
     = critical

- Both tactical and
      strategical
      elements.
UK is an island


- attacks
   = bombing

- defense =
  anti-aircraft
   artillery
   + radar
   + planes
VS
An optimization problem: defending UK


        We know that Q German bombers might
           take off at locations A, B, C and D.
     We know that their flights have maximal length L.
             We can build N radar antennas.
          We can set up M anti-aircraft artillery.
 We can distribute P air-fighters on airports E, F, G and H.
Choose:
 - the positionning of the N radar antenna
 - the anti-aircraft artillery
 - the positionning of the air-fighters
An optimization problem: defending UK


Step 1: defining the variables & constraints.

- Two “Float” variables for each positionning (antenna, artillery).
                      ==> 2(N+M) variables
- One “int” variables for each airport (number of airplanes),
                      ==> e=nb of planes in E,
                      ==> f=nb of planes in F,
                     ==> g=nb of planes in G,
                     ==> h=nb of planes in H.
Constraints:
- Number of planes: e+f+g+h=P
- Antennas and artillery not in the sea
An optimization problem: defending UK

Keeping 2(N+M)+4 variables take too much room.
Let's say x = vector ( e,f,g,h,x1,x2,x3,...,x(2(N+M)+4) ).

Step 2: defining the objective function.

= something which quantifies to which extent a proposed
    solution is good or not.

f(x) = very big number if x is a bad strategy.
     = very small number if x is a very good strategy.

Then, we will look for x* such that f(x*) = minimum.
Definition: x* is the optimum of f.

Can you define f for our radars / antenna / planes ?
An optimization problem: defending UK

Reminder:
We know that German bombers might
take off at locations A, B, C and D.
We know that their flights have maximal length L.
We don't know which starting point they will choose.

f(x) = maximum expected damage of the possible
      German attacks

New variables:
  a = nb of planes which take off at A,
  b,c,d = nb of planes which take off at B,C,D.
  z = vector defining German trajectories
==> y=(a,b,c,d,z)
An optimization problem: defending UK

Computing g(x,y) on a computer:
  - simulate the time steps of a airplane
         flight / bombing
  - evaluate the damage
  - return the damage            Not so     easy!
So we can write g(x,y) = damage if strategy y.


But what is f(x) ?

     f(x) = max g(x,y)   (maximum on y)

Is it clear for you ?
Defending UK: the complete picture

Main function:
  Find x* such f(x*) is minimum.   // x* = optimal
                                   // UK strategy

Function f(x):
  Find y such that g(x,y) is maximum.
  Return g(x,y)

Function g(x,y)
  Return damage if
     - UK has strategy x
     - Germany has strategy y
Two optimization levels

Main function:
  Find x* such f(x*) is minimum.         // x* = optimal
                                         // UK strategy

Function f(x):               Main optimization
  Find y such that g(x,y) is maximum.
                                 problem
  Return g(x,y)

Function g(x,y)
  Return damage if
     - UK has strategy x
     - Germany has strategy y
The second one is antagonist

Main function:
  Find x* such f(x*) is minimum.        // x* = optimal
                                        // UK strategy

Function f(x):
  Find y such that g(x,y) is maximum.
  Return g(x,y)
                             Secondary optimization
Function g(x,y)            problem: the German army
                            will optimize its behavior
  Return damage if
     - UK has strategy x
     - Germany has strategy y
Overview

1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   Sometimes OR = solved by just modelization.



                 submarine
Overview

1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   Example:



                 submarine


 UK trying to destroy U-boats (which destroyed
 UK convoys).
Overview

1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   Sometimes OR = solved by just modelization.

                   Approaches

                                U-boat: Escapes!


                  submarine
Overview

1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   Sometimes OR = solved by just modelization.

                   Approaches

 Bomb!                          Escapes!


                  submarine
Overview

Simulation: at which depth should the bomb
explode in order to maximize the probability of
destroying the U-boat
A relevant simulator helped a lot UK.

                      Approaches

                                   Escapes!

      Bomb!
                     submarine
Overview

Simulation: based the plane speed, the detection
time (by the U-boat), the U-boat behavior, the
U-boat speed, the bomb's damage radius...
Draw a figure with this and you have the solution.

                      Approaches

                                   Escapes!

      Bomb!
                     submarine

Just a relevant pen&paper model ==> big improv.
by changing the depth of explosion.
Overview
1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
Modelization is crucial – nothing works
without a good model.
But often we need maths&algorithms:
optimization, statistics, Zermelo-like algos,...
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition
   d) others
   e) all-in-one
Optimizing plane is important;
        turbulence matters


                       Real-world




Simulations
Optimizing aerodynamics is important


Better
aerodynamics
==> less fuel.

Turbulences
generated by
planes
at takeoff/landing
can be dangerous.
(or even en-route)

  Feedback from
   experience:
   often crucial
Optimization-based OR
Plenty of parameters in a plane:
length of wings, width of wings,
position of gas turbines, etc.
Let's say x1, x2, … , xk.

If you have a flight simulator, you can define a function
f(x1,x2,.;.,xk) = efficiency (aerodynamics)
Or for short: f(x) = efficiency
Then, it is important to find x* such that f(x*) is minimum.
Also important for
- trains
- hard drives
- automobiles
Optimization: definitions


It is important to find x* such that
f(x*) is minimum.
Definition: such a x* is termed a “minimum” of f.
 It is an “optimum” (the best solution).
Minimization: optimum = minimum
Maximization: optimum = maximum
Questions


Minimum of:
  f(x) = x2
               2
  f(x) = (x-1)
                 2  2
  f(x)= ( (x-1) -1)
  f(x)= -x2
  f(x)= -x2 for x >0

Final question: how to find the maximum of f
  if you just have a program for finding minima ?
Minimization: the simplest
algorithm ever

double * RandomSearch( double (*f)(double* x) )
{ bestValue=-MAXDOUBLE;
  for ( 10000 times )
  {
     x=randomVector()
     value = f(x)
     If (value<bestValue)
            { bestValue=value; xstar=x;}
  }
  return xstar;
}
Minimization: the simplest
algorithm ever, random search



I sample
  plenty of points.    Here!

I evaluate the value
    for each point.

I keep the best one.
Minimization: the simplest
algorithm ever, random search

RandomSearch( f )
{ bestValue=-MAXDOUBLE;
  for ( 10000 times )
  {
     x=randomVector()
     value = f(x)
     If (value<bestValue)
            { bestValue=value; xstar=x;}
  }
  return xstar;
}
Sorry, we must stop, we need a tool:
   Gaussian random variables.

Just a brief overview:
standard Gaussian
vectors (normalized)
= random vectors
 - distributed
   around 0,
 - with
  density decreasing
  with the distance,
 - equally in all
  directions.
Sorry, we must stop, we need a tool:
   Gaussian random variables.

Just a brief overview:
standard Gaussian
vectors (normalized)
= random vectors
 - distributed
     around 0,
 - with
    density decreasing
    with the distance,
 - equally in all
    directions.
Minimization: almost as simple,
the (1+1)-evolution strategy
OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
     xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
Minimization: almost as simple,
the (1+1)-evolution strategy
OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
     xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
The (1+1)-evolution strategy:
should I stay or should I go ?
OnePlusOne( f )
{I start
    x=randomVector;s=1;
  here.( 10000 times )
    for
    {
        Xp = x+s*randomGaussianVector()
        value = f(x)
        if (value<bestValue)
               { bestValue=value; x=xp;s=2*s}
        else s=0.84*s;
    }
    return x;
}
I should go!

OnePlusOne( f )
{ x=randomVector;s=1;
  for (I10000 times )
         test
  { here:
      better!
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
...

OnePlusOne( f )
{ x=randomVector;s=1;
  forSo here times )
      ( 10000
  {    I go.
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
… we can not always succeed ..

    ...and
OnePlusOne( f )
     here
{ x=randomVector;s=1;
  fortest.
    I ( 10000 times )
  {
      Xp = x+s*randomGaussianVector()
      value = f(x)
      if (value<bestValue)
             { bestValue=value; x=xp;s=2*s}
      else s=0.84*s;
  }
  return x;
}
Should I stay or should I go now ?

OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
      Xp = x+s*randomGaussianVector()
    ...I stay
   and I test f(x)
      value =
      if (value<bestValue)
     again
             { bestValue=value; x=xp;s=2*s}
      else s=0.84*s;
  }
  return x;
}
Should I stay or should I go now ?

    OnePlusOne( f )
    { x=randomVector;s=1;
   ... for ( 10000 times )
        {
and I try
 again Xp = x+s*randomGaussianVector()
   ...     value = f(x)
           if (value<bestValue)
                  { bestValue=value; x=xp;s=2*s}
           else s=0.84*s;
        }
        return x;
    }
Should I stay or should I go now ?

OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
      Xp = x+s*randomGaussianVector()
      value = f(x)
     ...
    and(value<bestValue)
      if
  again { bestValue=value; x=xp;s=2*s}
      else s=0.84*s;
     ...
  }
  return x;
}
Should I stay or should I go now ?

OnePlusOne( f )
          ...
{ x=randomVector;s=1;
         and
  for ( 10000 times )
  {     again
          ...
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
              { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
Should I stay or should I go now ?

OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
                                  ...
     Xp = x+s*randomGaussianVector()
     value = f(x)               Found!
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
Should I stay or should I go now ?

OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
Minimization: almost as simple,
the (1+1)-evolution strategy
OnePlusOne( f )            There is a
{ x=randomVector;s=1; for the size s
                          parameter
                                      of
  for ( 10000 times )     modifications
  {
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;
}
Minimization: almost as simple,
the (1+1)-evolution strategy
OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x;                               If success, then I
                                        increase the size of
}                                            modifications!
Minimization: almost as simple,
the (1+1)-evolution strategy
OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }                          Otherwise, I
  return x;              decrease the size of
}                           modifications!
Minimization: almost as simple,
the (1+1)-evolution strategy
OnePlusOne( f )
{ x=randomVector;s=1;
  for ( 10000 times )
  {
     Xp = x+s*randomGaussianVector()
     value = f(x)
     if (value<bestValue)
            { bestValue=value; x=xp;s=2*s}
     else s=0.84*s;
  }
  return x; There are plenty of variants of this algorithm.
}
               These variants are evolution strategies.
Other application

I have many shops.
They sell products from my factory.
Bringing products factory → shops is hard.

I want to install 7 warehouses:
- reduced costs for transportation
- less breakdowns

Let's simplify: there's no breakdown.
Where should be the 7 warehouses ?
Other application


I have many shops.
They sell products from my factory.
Bringing products factory → shops is hard.

I want to install 7 warehouses:
- reduced costs for transportation
- less breakdowns

Let's simplify: there's no breakdown.
Where should be the 7 warehouses ?
Without warehouses




● Either many small
     long-distance
     transportations (huge cost)
● or one big

   transportation (big delay,
   big cost)
Warehouses




●   Less travels with
     big transportation

●   Total price decreased

● Maximum delay reduced
   (==> no breakdown)
● Less pollution
Formalization

x=position of the warehouses.

f(x) = benefit when using the 7 warehouses

   = cost of transportation
      with no warehouse

    - cost of transportation with
       the warehouses

==> with more sophisticated models, a very
  important case of operation research
Formalization

For computing f(x), I need:
(1) cost of transportation with no warehouse
(2) cost of transportation with the warehouses

==> it is a secondary optimization problem:
     optimizing the tactical use.
        Cost = minimum cost_if_policy(y)
==> very usual:
     - one strategical level: positionning
           the infrastructure
     - one tactical level: optimal use of the
           Infrastructure (policy)
Sometimes many levels

Level 1: size of the infrastructure
- number/size of factories
- number/size of trucks
- number/size of warehouses
- number/size of trains, boats (…)

Level 2: positionning
- where is factory A
- where is factory B
- where is warehouse C (…)

Level 3: scheduling of supply chain
- when/where does truck X start
- when/where does train Y start (…)
Logistics: combining all this for
       fast supply chain.




           Not only positionning, for a fixed
            number of trucks, men, boats.

       You can also see which number of boats,
             trucks, warehouses, is best.
Overview


1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition
   d) others
   e) all-in-one
Statistics in a (small) nutshell

Sample = some examples
= e.g. x1, x2, x3,...., xn.

- You are a sample of Taiwanese students;
- I am a (small) sample of French researchers.

Sample average m = (x1+...+xn)/n

Standard deviation:
Statistics crucial notion 1:
           confidence interval

With probability 95%, the true mean is
between m - 2/sqrt(n) and m + 2/sqrt(n).

Under some conditions:
  - no bias in the sample
  - no correlation in the sample

                  Sorry for statisticians, I know
                            I simplify so much...
Statistics crucial notion 1:
                                    2:
             confidence interval
                      bias
American election in 1936
(during great depression).
Who will be elected, Landon or Roosevelt ?

Literary Digest's poll: sample = 2.3 millions
    ==> predicts Landon.
       Sample=people motivated for answering
                   the poll = minority which hates
                   Roosevelt.
    ==> they all vote for Landon. Big bias.

Gallup poll: sample = 50 000 persons (more properly
   sampled). Predicted the right answer.
Example of application:
   industrial owens
Statistics



Steel quality
(for my factory)



                      Carbon quantity
Statistics crucial notion 3:
         conditional probabilities

Probability for a dice ?

P(3) = 1/6

P(odd) = P(even) = 1/2

P(1 or 2) = 1/3

P(1 | 1,2,3,or 4 ) = ¼ <== this is conditioning
 = probability of 1, given that we get 1, 2, 3 or 4.
Statistics crucial notion 4:
              Bayes theorem
Bayes published a theological book:
  Divine Benevolence,
  or an Attempt to Prove That the Principal
  End of the Divine Providence and
  Government is the Happiness of
  His Creatures (1731)

But he also developped a special case of
Bayes theorem:
P(A | B) = P(A and B) / P(B)
P(3 | 1,2 or 3) = (1/6) / (½) = 1/3
Let's see a nice, counter-intuitive
example of application of
statistics:




==> protecting bombers
Let's come back to
             anti-aircraft artillery.




UK bombers also attacked Germany. Bombing with
                                         (Hamburg

But, many anti-bombers artillery. incendiary bombs;
                                  1000°C, ~190km/h
Many planes destroyed.              Wind – death toll
                                             42600)
Problem: how to protect planes ?
Using statistics for
                  protecting bombers
 1) For each part X of the plane, estimate
    q(X)= P( part X damaged | plane came back)
E.g.
q(part1) = 0.1
q(part2) = 0.0
q(part3) = 0.02

 2) Assume that P(part X damaged) = constant
      (does not depend on X)

 3) Then, which part should we reinforce ?
Using statistics for
                protecting bombers
    q(X)= P( part X damaged | plane came back)
         = P ( PXD | PCB)
E.g. q(part1) = 0.1
     q(part2) = 0.0
     q(part3) = 0.02
             Define c = P(PCB)/P(PXD) = constant.

P(PXD | PCB) = P(PXD and PCB) / P( PCB)
P(PCB | PXD) = P(PCD and PXD) / P( PXD)
             = P(PXD | PCB) * P(PCB)/P(PXD)
             = c * q(X)
Using statistics for
                protecting bombers
    q(X)= P( part X damaged | plane came back)
         = P ( PXD | PCB)
E.g. q(part1) = 0.1
     q(part2) = 0.0
     q(part3) = 0.02
             Define c = P(PCB)/P(PXD) = constant.

       P(PCB | PXD) = c * q(X)
==> Probability that plane survives to “part X
    is damaged” increases if q(x) increase.
==> Conclusion: reinforce part2 ! ! !
Using statistics for
                 sending mails

Divide customers in 5 categories
- Women ( < 25 y.o.)
- Men (<25 y.o.)
- Women (25-45)
- Men (25-45)
- >45

You have money for sending Q advertisements.
You have P1, P2, P3, P4, P5 customers
in categories above.
Using statistics for
                 sending mails

You have P1, P2, P3, P4, P5 customers
in categories above.

Data:
 Sample of past advertisements:
 m1=frequency of positive answers in category 1.
 m2=frequency of positive answers in category 2.
      …
==> Who should receive advertisements ?
Using statistics for
                sending mails



 m1=frequency of positive answers in category 1
  = number of positive answers / number of ads

e.g. if 17 ads sent,
  m1=mean(0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0)=5/17
Using statistics for
               sending mails
m1=frequency of positive answers in category 1.
m2=frequency of positive answers in category 2.
     …
1 = std deviation for category 1
2 = std deviation for category 2
     …
b=benefit per customer with positive answer.

 If ( (m1+21/sqrt(n1)) x b < price of one mailing),
     then discard category 1.

 Send ads to non-discarded categories.
Overview


1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition: Zermelo
       (remember, irrigation, water, crops, etc)
   d) others
   e) all-in-one
Our river in Paris
 is the “Seine”.

    A French
  politician said
 he would soon
 swim across it.

After all, he never
       did it.

 For your health,
   don't do it.

  Nevertheless,
      we try
    to keep it
     as clean
   as possible.
Another beautiful application

This is Paris.
Beautiful town.
With plenty of people
(10 millions in IDF).
Another beautiful application

This is Paris.
Beautiful town.
With plenty of people
(10 millions in IDF).
Producing plenty of fecal
matter ==> dirty water.
Dirty water should be separated from the Seine.
And usually it is.
Something like this:




                                      Seine

              Dirty
              water
Problem: if big rainfalls reach dirty water,
    then dirty water might pollute the Seine


                       Seine

Dirty
water
No typhoon in France.
But we can have heavy rains/winds in Paris:
- 0.96 dm in 24 hours happened in 1987.
- gusts at 169 km/h in 1999 (very unusual in France)

                Problem: if big rainfalls reach dirty water,
                   then dirty water might pollute the Seine


                                      Seine

              Dirty
              water
                      (yes, in Taiwan it is more impressive,
              sometimes it is 16.7 dm in 24 hours and gusts
                                     can reach 250 km/h...)
No typhoon in France.
But we can have heavy rains/winds in Paris:
- 0.96 dm in 24 hours happened in 1987.
- gusts at 169 km/h in 1999 (very unusual in France)

                Problem: if big rainfalls reach dirty water,
                   then dirty water might pollute the Seine


                                      Seine

              Dirty
              water
                      (yes, in Taiwan it is more impressive,
              sometimes it is 16.7 dm in 24 hours and gusts
                                     can reach 250 km/h...)
No typhoon in France.
But we can have heavy rains/winds in Paris:
- 0.96 dm in 24 hours happened in 1987.
- gusts at 169 km/h in 1999 (very unusual in France)

                Problem: if big rainfalls reach dirty water,
                   then dirty water might pollute the Seine


                                      Seine
                Dirty
               water
              → Seine! (yes, in Taiwan it is more impressive,
              sometimes it is 16.7 dm in 24 hours and gusts
                                      can reach 250 km/h...)
Another beautiful application

Three water networks:

- dirty water: should go to cleaning stations



- clean water: can go to the Seine, but can't be drunk



- drinkable water (France: tap water = drinkable)
Big water network




Dirty   Dirty   Dirty    Dirty
water   water   water    water




Clean   Clean   Clean    Clean
water   water   water    water
Water vs dirty water

Challenge:
Summer storms.
Not comparable to a Taiwanese typhoon.
But a lot of water.
Can make dirty water become very big.
Can invade clean water.

Your mission:
- Get read of dirty water
- Protect clean water
Water vs dirty water

State: level in each stock,
     valves' status
     (open or closed)

At each time step,
   i(x) liters of water reach stock x.
   you can open or close valves
   ==> get a new state.

Your mission:
  - Get read of dirty water
  - Protect clean water ===> Zermelo.
Water vs dirty water

   Typically:
(0, 1, 0, 0, 0, 1, 0, 1,   0.42, 0.2, 0.0, 0.8, 0.3)
    (valves)                  (stock levels)

Plenty of rules:
- if (valve 4 opens, then water from stock 1
                                    3
      goes to stock 2 at rate 0.02m /s)
- if (stock[2]>0.3) then dirty water ==> Seine,
            3
       0.1m /s

==> Maximize your number of points at the end
   of the storm
Shrinking horizon

Too many time steps!

At each time step, make a decision
using only 30 time steps.

Example of heuristic function:

zermeloValue(state)=the margin before any stock
  can go to the Seine.
Shrinking horizon

Too many time steps!

At each time step, make a decision
using only 30 time steps.

Example of heuristic function:

zermeloValue(state)=the margin before any stock
  can go to the Seine.
Shrinking horizon

Too many time steps!

At each time step, make a decision
using only 30 time steps.

Example of heuristic function:

zermeloValue(state)=the margin before any stock
  can go to the Seine.
Shrinking horizon

Too many time steps!

At each time step, make a decision
using only 30 time steps.

Example of heuristic function:

zermeloValue(state)=the margin before any stock
  can go to the Seine.
Shrinking horizon




moving window of
 30 time steps
Overview


1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition
   d) others
   e) all-in-one
Overview


1) Basic definitions
2) Illustrative example: UK in WWII
3) Categories of Op. Research (OR)
   a) based on optimization
   b) based on statistics
   c) based on time-decomposition
   d) others
   e) all-in-one

More Related Content

What's hot

What's hot (20)

Facility Capacity & Layout Planning
Facility Capacity & Layout PlanningFacility Capacity & Layout Planning
Facility Capacity & Layout Planning
 
Performance rating
Performance ratingPerformance rating
Performance rating
 
Aplication blank
Aplication blankAplication blank
Aplication blank
 
Work study
Work studyWork study
Work study
 
Difference between Micro Economics and Macro Economics
Difference between Micro Economics and Macro EconomicsDifference between Micro Economics and Macro Economics
Difference between Micro Economics and Macro Economics
 
Method study
Method studyMethod study
Method study
 
1.1 Work study and method study -Industrial Engineering Basics
1.1 Work study and method study -Industrial Engineering Basics1.1 Work study and method study -Industrial Engineering Basics
1.1 Work study and method study -Industrial Engineering Basics
 
Method study
Method studyMethod study
Method study
 
Evolution of production and operations management
Evolution of production and operations managementEvolution of production and operations management
Evolution of production and operations management
 
Types of Selection Tests
Types of Selection TestsTypes of Selection Tests
Types of Selection Tests
 
Concept of Measurements in Business Research
Concept of Measurements in Business ResearchConcept of Measurements in Business Research
Concept of Measurements in Business Research
 
The sampling design process
The sampling design processThe sampling design process
The sampling design process
 
PRODUCTION SYSTEMS
PRODUCTION SYSTEMSPRODUCTION SYSTEMS
PRODUCTION SYSTEMS
 
Strategic evaluation & control
Strategic evaluation & controlStrategic evaluation & control
Strategic evaluation & control
 
Just In Time (JIT) Systems
Just In Time (JIT) SystemsJust In Time (JIT) Systems
Just In Time (JIT) Systems
 
Operation management problems
Operation management problemsOperation management problems
Operation management problems
 
Compensation dimensions
Compensation dimensionsCompensation dimensions
Compensation dimensions
 
Work Study
Work StudyWork Study
Work Study
 
TIME STUDY
TIME STUDYTIME STUDY
TIME STUDY
 
Plant maintenance basics
Plant maintenance basicsPlant maintenance basics
Plant maintenance basics
 

Viewers also liked

Monte Carlo Tree Search in 2014 (MCMC days in Marseille)
Monte Carlo Tree Search in 2014 (MCMC days in Marseille)Monte Carlo Tree Search in 2014 (MCMC days in Marseille)
Monte Carlo Tree Search in 2014 (MCMC days in Marseille)Olivier Teytaud
 
Disappointing results & open problems in Monte-Carlo Tree Search
Disappointing results & open problems in Monte-Carlo Tree SearchDisappointing results & open problems in Monte-Carlo Tree Search
Disappointing results & open problems in Monte-Carlo Tree SearchOlivier Teytaud
 
Réseaux neuronaux profonds & intelligence artificielle
Réseaux neuronaux profonds & intelligence artificielleRéseaux neuronaux profonds & intelligence artificielle
Réseaux neuronaux profonds & intelligence artificielleOlivier Teytaud
 
Simulation-based optimization: Upper Confidence Tree and Direct Policy Search
Simulation-based optimization: Upper Confidence Tree and Direct Policy SearchSimulation-based optimization: Upper Confidence Tree and Direct Policy Search
Simulation-based optimization: Upper Confidence Tree and Direct Policy SearchOlivier Teytaud
 
Bias correction, and other uncertainty management techniques
Bias correction, and other uncertainty management techniquesBias correction, and other uncertainty management techniques
Bias correction, and other uncertainty management techniquesOlivier Teytaud
 
Combining games artificial intelligences & improving random seeds
Combining games artificial intelligences & improving random seedsCombining games artificial intelligences & improving random seeds
Combining games artificial intelligences & improving random seedsOlivier Teytaud
 
Keywords and examples of machine learning
Keywords and examples of machine learningKeywords and examples of machine learning
Keywords and examples of machine learningOlivier Teytaud
 
Bias and Variance in Continuous EDA: massively parallel continuous optimization
Bias and Variance in Continuous EDA: massively parallel continuous optimizationBias and Variance in Continuous EDA: massively parallel continuous optimization
Bias and Variance in Continuous EDA: massively parallel continuous optimizationOlivier Teytaud
 
Artificial intelligence for power systems
Artificial intelligence for power systemsArtificial intelligence for power systems
Artificial intelligence for power systemsOlivier Teytaud
 
Simple regret bandit algorithms for unstructured noisy optimization
Simple regret bandit algorithms for unstructured noisy optimizationSimple regret bandit algorithms for unstructured noisy optimization
Simple regret bandit algorithms for unstructured noisy optimizationOlivier Teytaud
 
Fuzzy control - superfast survey
Fuzzy control - superfast surveyFuzzy control - superfast survey
Fuzzy control - superfast surveyOlivier Teytaud
 
Planning for power systems
Planning for power systemsPlanning for power systems
Planning for power systemsOlivier Teytaud
 

Viewers also liked (16)

Monte Carlo Tree Search in 2014 (MCMC days in Marseille)
Monte Carlo Tree Search in 2014 (MCMC days in Marseille)Monte Carlo Tree Search in 2014 (MCMC days in Marseille)
Monte Carlo Tree Search in 2014 (MCMC days in Marseille)
 
Direct policy search
Direct policy searchDirect policy search
Direct policy search
 
Functional programming
Functional programmingFunctional programming
Functional programming
 
Disappointing results & open problems in Monte-Carlo Tree Search
Disappointing results & open problems in Monte-Carlo Tree SearchDisappointing results & open problems in Monte-Carlo Tree Search
Disappointing results & open problems in Monte-Carlo Tree Search
 
Réseaux neuronaux profonds & intelligence artificielle
Réseaux neuronaux profonds & intelligence artificielleRéseaux neuronaux profonds & intelligence artificielle
Réseaux neuronaux profonds & intelligence artificielle
 
Simulation-based optimization: Upper Confidence Tree and Direct Policy Search
Simulation-based optimization: Upper Confidence Tree and Direct Policy SearchSimulation-based optimization: Upper Confidence Tree and Direct Policy Search
Simulation-based optimization: Upper Confidence Tree and Direct Policy Search
 
Bias correction, and other uncertainty management techniques
Bias correction, and other uncertainty management techniquesBias correction, and other uncertainty management techniques
Bias correction, and other uncertainty management techniques
 
Combining games artificial intelligences & improving random seeds
Combining games artificial intelligences & improving random seedsCombining games artificial intelligences & improving random seeds
Combining games artificial intelligences & improving random seeds
 
Power systemsilablri
Power systemsilablriPower systemsilablri
Power systemsilablri
 
Keywords and examples of machine learning
Keywords and examples of machine learningKeywords and examples of machine learning
Keywords and examples of machine learning
 
Bias and Variance in Continuous EDA: massively parallel continuous optimization
Bias and Variance in Continuous EDA: massively parallel continuous optimizationBias and Variance in Continuous EDA: massively parallel continuous optimization
Bias and Variance in Continuous EDA: massively parallel continuous optimization
 
Artificial intelligence for power systems
Artificial intelligence for power systemsArtificial intelligence for power systems
Artificial intelligence for power systems
 
Simple regret bandit algorithms for unstructured noisy optimization
Simple regret bandit algorithms for unstructured noisy optimizationSimple regret bandit algorithms for unstructured noisy optimization
Simple regret bandit algorithms for unstructured noisy optimization
 
Fuzzy control - superfast survey
Fuzzy control - superfast surveyFuzzy control - superfast survey
Fuzzy control - superfast survey
 
Debugging
DebuggingDebugging
Debugging
 
Planning for power systems
Planning for power systemsPlanning for power systems
Planning for power systems
 

Similar to Examples of operational research

Battle of Britain
Battle of BritainBattle of Britain
Battle of BritainPete Lee
 
Recursion - Computer Algorithms
Recursion - Computer AlgorithmsRecursion - Computer Algorithms
Recursion - Computer AlgorithmsAlaa Al-Makhzoomy
 
Programming v01
Programming v01Programming v01
Programming v01Qazi Ejaz
 
Alan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley parkAlan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley parkDavid Bew
 
Eureka ! Finals
Eureka ! Finals Eureka ! Finals
Eureka ! Finals Amit Patil
 
EVALUATING INTEGRALS.Evaluate the integral shown below. (H.docx
EVALUATING INTEGRALS.Evaluate the integral shown below. (H.docxEVALUATING INTEGRALS.Evaluate the integral shown below. (H.docx
EVALUATING INTEGRALS.Evaluate the integral shown below. (H.docxgitagrimston
 
Acm aleppo cpc training fifth session
Acm aleppo cpc training fifth sessionAcm aleppo cpc training fifth session
Acm aleppo cpc training fifth sessionAhmad Bashar Eter
 
А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"
А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"
А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"Yandex
 

Similar to Examples of operational research (12)

Fan.xue.viva
Fan.xue.vivaFan.xue.viva
Fan.xue.viva
 
Battle of Britain
Battle of BritainBattle of Britain
Battle of Britain
 
Recursion - Computer Algorithms
Recursion - Computer AlgorithmsRecursion - Computer Algorithms
Recursion - Computer Algorithms
 
Programming v01
Programming v01Programming v01
Programming v01
 
Aetc5 Sepv2
Aetc5 Sepv2Aetc5 Sepv2
Aetc5 Sepv2
 
Alan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley parkAlan turing's work before, during & after bletchley park
Alan turing's work before, during & after bletchley park
 
Eureka ! Finals
Eureka ! Finals Eureka ! Finals
Eureka ! Finals
 
EVALUATING INTEGRALS.Evaluate the integral shown below. (H.docx
EVALUATING INTEGRALS.Evaluate the integral shown below. (H.docxEVALUATING INTEGRALS.Evaluate the integral shown below. (H.docx
EVALUATING INTEGRALS.Evaluate the integral shown below. (H.docx
 
Acm aleppo cpc training fifth session
Acm aleppo cpc training fifth sessionAcm aleppo cpc training fifth session
Acm aleppo cpc training fifth session
 
Unit 1(stld)
Unit 1(stld) Unit 1(stld)
Unit 1(stld)
 
The art gallery problem eng
The art gallery problem engThe art gallery problem eng
The art gallery problem eng
 
А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"
А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"
А.Н. Ширяев "Обзор современных задач об оптимальной обстановке"
 

Recently uploaded

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 

Recently uploaded (20)

On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 

Examples of operational research

  • 1. HOW A FRENCH GUY CAN TEACH IN A MANDARIN-SPEAKING COUNTRY Problem: I speak French, you speak Mandarin. Solutions: + English + Images + Stupid questions (I do not ask stupid questions because of stupidity, it's just for checking that there's no misunderstanding) + Interrupt me + send emails + Feel free of discussing in Mandarin
  • 2. I don't want so speak Chinese to you In France, we say “this is Chinese to me” for “I can't catch a word”. ==> Please tell me if I “speak Chinese to you”.
  • 3. DISCLAIMER Fact 1: Many applications in these lessons are about military applications. Reason: Easy to understand + many precursor operation research works are military. Fact 2: My main application fields are ecological and energetical. Implication: We will see such applications later, with much more details.
  • 4. WHAT IS THE POINT IN THESE 3 HOURS ? This is about Operations Research (OR). Key points: - OR can help a company/country to save up plenty of $. - new OR works usually do not originate at the head of companies / countries; originate in young people who want to do new things. - you can be very useful if you understand the goal of OR.
  • 5. Operations Research everywhere. I hope that from now on, you will see plenty of OR opportunities everywhere.
  • 6. POLL This teaching is adaptive. Tell me what you want, and I'll try to adapt. Email: olivier.teytaud@inria.fr (emails will be considered as private, no forward, no archive; only an anonymous agregation is public) More mathematics ? More illustrative examples ? More C / C++ / Java / Matlab examples ? More examples in domain X or Y ? More algorithmic elements ? Today, illustrative examples mainly ==> simple.
  • 7. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) a) based on optimization b) based on statistics c) based on time-decomposition d) others e) all-in-one
  • 8. OP. RESEARCH: Definitions Goal = near optimal decisions to complex decision-making problems. Similar to: - Decision sciences - Management sciences (part of) Close to artificial intelligence ==> we will see plenty of vocabulary, because vocabulary = crucial for finding relevant literature.
  • 9. OP. RESEARCH: History - Some precursors - “Real” birth in world war II - Then widely spread everywhere - industry - business
  • 10. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) a) based on optimization b) based on statistics c) based on time-decomposition d) others e) all-in-one
  • 11. WORLD WAR II viewed from Europe - France + others quickly defeated ==> Hitler close to complete victory - But UK resists, so Germany must fight both on East and West - Also UK territory can be used by US for bombing germany - The surprising resistance of UK is a key element of World War II - Op. Research = key element of WW II.
  • 12. WORLD WAR II - Modern techniques everywhere - Supply chain = critical - Both tactical and strategical elements.
  • 13. UK is an island - attacks = bombing - defense = anti-aircraft artillery + radar + planes
  • 14. VS
  • 15. An optimization problem: defending UK We know that Q German bombers might take off at locations A, B, C and D. We know that their flights have maximal length L. We can build N radar antennas. We can set up M anti-aircraft artillery. We can distribute P air-fighters on airports E, F, G and H. Choose: - the positionning of the N radar antenna - the anti-aircraft artillery - the positionning of the air-fighters
  • 16. An optimization problem: defending UK Step 1: defining the variables & constraints. - Two “Float” variables for each positionning (antenna, artillery). ==> 2(N+M) variables - One “int” variables for each airport (number of airplanes), ==> e=nb of planes in E, ==> f=nb of planes in F, ==> g=nb of planes in G, ==> h=nb of planes in H. Constraints: - Number of planes: e+f+g+h=P - Antennas and artillery not in the sea
  • 17. An optimization problem: defending UK Keeping 2(N+M)+4 variables take too much room. Let's say x = vector ( e,f,g,h,x1,x2,x3,...,x(2(N+M)+4) ). Step 2: defining the objective function. = something which quantifies to which extent a proposed solution is good or not. f(x) = very big number if x is a bad strategy. = very small number if x is a very good strategy. Then, we will look for x* such that f(x*) = minimum. Definition: x* is the optimum of f. Can you define f for our radars / antenna / planes ?
  • 18. An optimization problem: defending UK Reminder: We know that German bombers might take off at locations A, B, C and D. We know that their flights have maximal length L. We don't know which starting point they will choose. f(x) = maximum expected damage of the possible German attacks New variables: a = nb of planes which take off at A, b,c,d = nb of planes which take off at B,C,D. z = vector defining German trajectories ==> y=(a,b,c,d,z)
  • 19. An optimization problem: defending UK Computing g(x,y) on a computer: - simulate the time steps of a airplane flight / bombing - evaluate the damage - return the damage Not so easy! So we can write g(x,y) = damage if strategy y. But what is f(x) ? f(x) = max g(x,y) (maximum on y) Is it clear for you ?
  • 20. Defending UK: the complete picture Main function: Find x* such f(x*) is minimum. // x* = optimal // UK strategy Function f(x): Find y such that g(x,y) is maximum. Return g(x,y) Function g(x,y) Return damage if - UK has strategy x - Germany has strategy y
  • 21. Two optimization levels Main function: Find x* such f(x*) is minimum. // x* = optimal // UK strategy Function f(x): Main optimization Find y such that g(x,y) is maximum. problem Return g(x,y) Function g(x,y) Return damage if - UK has strategy x - Germany has strategy y
  • 22. The second one is antagonist Main function: Find x* such f(x*) is minimum. // x* = optimal // UK strategy Function f(x): Find y such that g(x,y) is maximum. Return g(x,y) Secondary optimization Function g(x,y) problem: the German army will optimize its behavior Return damage if - UK has strategy x - Germany has strategy y
  • 23. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) Sometimes OR = solved by just modelization. submarine
  • 24. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) Example: submarine UK trying to destroy U-boats (which destroyed UK convoys).
  • 25. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) Sometimes OR = solved by just modelization. Approaches U-boat: Escapes! submarine
  • 26. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) Sometimes OR = solved by just modelization. Approaches Bomb! Escapes! submarine
  • 27. Overview Simulation: at which depth should the bomb explode in order to maximize the probability of destroying the U-boat A relevant simulator helped a lot UK. Approaches Escapes! Bomb! submarine
  • 28. Overview Simulation: based the plane speed, the detection time (by the U-boat), the U-boat behavior, the U-boat speed, the bomb's damage radius... Draw a figure with this and you have the solution. Approaches Escapes! Bomb! submarine Just a relevant pen&paper model ==> big improv. by changing the depth of explosion.
  • 29. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) Modelization is crucial – nothing works without a good model. But often we need maths&algorithms: optimization, statistics, Zermelo-like algos,... a) based on optimization b) based on statistics c) based on time-decomposition d) others e) all-in-one
  • 30. Optimizing plane is important; turbulence matters Real-world Simulations
  • 31. Optimizing aerodynamics is important Better aerodynamics ==> less fuel. Turbulences generated by planes at takeoff/landing can be dangerous. (or even en-route) Feedback from experience: often crucial
  • 32. Optimization-based OR Plenty of parameters in a plane: length of wings, width of wings, position of gas turbines, etc. Let's say x1, x2, … , xk. If you have a flight simulator, you can define a function f(x1,x2,.;.,xk) = efficiency (aerodynamics) Or for short: f(x) = efficiency Then, it is important to find x* such that f(x*) is minimum. Also important for - trains - hard drives - automobiles
  • 33. Optimization: definitions It is important to find x* such that f(x*) is minimum. Definition: such a x* is termed a “minimum” of f. It is an “optimum” (the best solution). Minimization: optimum = minimum Maximization: optimum = maximum
  • 34. Questions Minimum of: f(x) = x2 2 f(x) = (x-1) 2 2 f(x)= ( (x-1) -1) f(x)= -x2 f(x)= -x2 for x >0 Final question: how to find the maximum of f if you just have a program for finding minima ?
  • 35. Minimization: the simplest algorithm ever double * RandomSearch( double (*f)(double* x) ) { bestValue=-MAXDOUBLE; for ( 10000 times ) { x=randomVector() value = f(x) If (value<bestValue) { bestValue=value; xstar=x;} } return xstar; }
  • 36. Minimization: the simplest algorithm ever, random search I sample plenty of points. Here! I evaluate the value for each point. I keep the best one.
  • 37. Minimization: the simplest algorithm ever, random search RandomSearch( f ) { bestValue=-MAXDOUBLE; for ( 10000 times ) { x=randomVector() value = f(x) If (value<bestValue) { bestValue=value; xstar=x;} } return xstar; }
  • 38. Sorry, we must stop, we need a tool: Gaussian random variables. Just a brief overview: standard Gaussian vectors (normalized) = random vectors - distributed around 0, - with density decreasing with the distance, - equally in all directions.
  • 39. Sorry, we must stop, we need a tool: Gaussian random variables. Just a brief overview: standard Gaussian vectors (normalized) = random vectors - distributed around 0, - with density decreasing with the distance, - equally in all directions.
  • 40. Minimization: almost as simple, the (1+1)-evolution strategy OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 41. Minimization: almost as simple, the (1+1)-evolution strategy OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 42. The (1+1)-evolution strategy: should I stay or should I go ? OnePlusOne( f ) {I start x=randomVector;s=1; here.( 10000 times ) for { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 43. I should go! OnePlusOne( f ) { x=randomVector;s=1; for (I10000 times ) test { here: better! Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 44. ... OnePlusOne( f ) { x=randomVector;s=1; forSo here times ) ( 10000 { I go. Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 45. … we can not always succeed .. ...and OnePlusOne( f ) here { x=randomVector;s=1; fortest. I ( 10000 times ) { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 46. Should I stay or should I go now ? OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { Xp = x+s*randomGaussianVector() ...I stay and I test f(x) value = if (value<bestValue) again { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 47. Should I stay or should I go now ? OnePlusOne( f ) { x=randomVector;s=1; ... for ( 10000 times ) { and I try again Xp = x+s*randomGaussianVector() ... value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 48. Should I stay or should I go now ? OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { Xp = x+s*randomGaussianVector() value = f(x) ... and(value<bestValue) if again { bestValue=value; x=xp;s=2*s} else s=0.84*s; ... } return x; }
  • 49. Should I stay or should I go now ? OnePlusOne( f ) ... { x=randomVector;s=1; and for ( 10000 times ) { again ... Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 50. Should I stay or should I go now ? OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { ... Xp = x+s*randomGaussianVector() value = f(x) Found! if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 51. Should I stay or should I go now ? OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 52. Minimization: almost as simple, the (1+1)-evolution strategy OnePlusOne( f ) There is a { x=randomVector;s=1; for the size s parameter of for ( 10000 times ) modifications { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; }
  • 53. Minimization: almost as simple, the (1+1)-evolution strategy OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; If success, then I increase the size of } modifications!
  • 54. Minimization: almost as simple, the (1+1)-evolution strategy OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } Otherwise, I return x; decrease the size of } modifications!
  • 55. Minimization: almost as simple, the (1+1)-evolution strategy OnePlusOne( f ) { x=randomVector;s=1; for ( 10000 times ) { Xp = x+s*randomGaussianVector() value = f(x) if (value<bestValue) { bestValue=value; x=xp;s=2*s} else s=0.84*s; } return x; There are plenty of variants of this algorithm. } These variants are evolution strategies.
  • 56. Other application I have many shops. They sell products from my factory. Bringing products factory → shops is hard. I want to install 7 warehouses: - reduced costs for transportation - less breakdowns Let's simplify: there's no breakdown. Where should be the 7 warehouses ?
  • 57. Other application I have many shops. They sell products from my factory. Bringing products factory → shops is hard. I want to install 7 warehouses: - reduced costs for transportation - less breakdowns Let's simplify: there's no breakdown. Where should be the 7 warehouses ?
  • 58. Without warehouses ● Either many small long-distance transportations (huge cost) ● or one big transportation (big delay, big cost)
  • 59. Warehouses ● Less travels with big transportation ● Total price decreased ● Maximum delay reduced (==> no breakdown) ● Less pollution
  • 60. Formalization x=position of the warehouses. f(x) = benefit when using the 7 warehouses = cost of transportation with no warehouse - cost of transportation with the warehouses ==> with more sophisticated models, a very important case of operation research
  • 61. Formalization For computing f(x), I need: (1) cost of transportation with no warehouse (2) cost of transportation with the warehouses ==> it is a secondary optimization problem: optimizing the tactical use. Cost = minimum cost_if_policy(y) ==> very usual: - one strategical level: positionning the infrastructure - one tactical level: optimal use of the Infrastructure (policy)
  • 62. Sometimes many levels Level 1: size of the infrastructure - number/size of factories - number/size of trucks - number/size of warehouses - number/size of trains, boats (…) Level 2: positionning - where is factory A - where is factory B - where is warehouse C (…) Level 3: scheduling of supply chain - when/where does truck X start - when/where does train Y start (…)
  • 63. Logistics: combining all this for fast supply chain. Not only positionning, for a fixed number of trucks, men, boats. You can also see which number of boats, trucks, warehouses, is best.
  • 64. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) a) based on optimization b) based on statistics c) based on time-decomposition d) others e) all-in-one
  • 65. Statistics in a (small) nutshell Sample = some examples = e.g. x1, x2, x3,...., xn. - You are a sample of Taiwanese students; - I am a (small) sample of French researchers. Sample average m = (x1+...+xn)/n Standard deviation:
  • 66. Statistics crucial notion 1: confidence interval With probability 95%, the true mean is between m - 2/sqrt(n) and m + 2/sqrt(n). Under some conditions: - no bias in the sample - no correlation in the sample Sorry for statisticians, I know I simplify so much...
  • 67. Statistics crucial notion 1: 2: confidence interval bias American election in 1936 (during great depression). Who will be elected, Landon or Roosevelt ? Literary Digest's poll: sample = 2.3 millions ==> predicts Landon. Sample=people motivated for answering the poll = minority which hates Roosevelt. ==> they all vote for Landon. Big bias. Gallup poll: sample = 50 000 persons (more properly sampled). Predicted the right answer.
  • 68. Example of application: industrial owens
  • 69. Statistics Steel quality (for my factory) Carbon quantity
  • 70. Statistics crucial notion 3: conditional probabilities Probability for a dice ? P(3) = 1/6 P(odd) = P(even) = 1/2 P(1 or 2) = 1/3 P(1 | 1,2,3,or 4 ) = ¼ <== this is conditioning = probability of 1, given that we get 1, 2, 3 or 4.
  • 71. Statistics crucial notion 4: Bayes theorem Bayes published a theological book: Divine Benevolence, or an Attempt to Prove That the Principal End of the Divine Providence and Government is the Happiness of His Creatures (1731) But he also developped a special case of Bayes theorem: P(A | B) = P(A and B) / P(B) P(3 | 1,2 or 3) = (1/6) / (½) = 1/3
  • 72. Let's see a nice, counter-intuitive example of application of statistics: ==> protecting bombers
  • 73. Let's come back to anti-aircraft artillery. UK bombers also attacked Germany. Bombing with (Hamburg But, many anti-bombers artillery. incendiary bombs; 1000°C, ~190km/h Many planes destroyed. Wind – death toll 42600) Problem: how to protect planes ?
  • 74. Using statistics for protecting bombers 1) For each part X of the plane, estimate q(X)= P( part X damaged | plane came back) E.g. q(part1) = 0.1 q(part2) = 0.0 q(part3) = 0.02 2) Assume that P(part X damaged) = constant (does not depend on X) 3) Then, which part should we reinforce ?
  • 75. Using statistics for protecting bombers q(X)= P( part X damaged | plane came back) = P ( PXD | PCB) E.g. q(part1) = 0.1 q(part2) = 0.0 q(part3) = 0.02 Define c = P(PCB)/P(PXD) = constant. P(PXD | PCB) = P(PXD and PCB) / P( PCB) P(PCB | PXD) = P(PCD and PXD) / P( PXD) = P(PXD | PCB) * P(PCB)/P(PXD) = c * q(X)
  • 76. Using statistics for protecting bombers q(X)= P( part X damaged | plane came back) = P ( PXD | PCB) E.g. q(part1) = 0.1 q(part2) = 0.0 q(part3) = 0.02 Define c = P(PCB)/P(PXD) = constant. P(PCB | PXD) = c * q(X) ==> Probability that plane survives to “part X is damaged” increases if q(x) increase. ==> Conclusion: reinforce part2 ! ! !
  • 77. Using statistics for sending mails Divide customers in 5 categories - Women ( < 25 y.o.) - Men (<25 y.o.) - Women (25-45) - Men (25-45) - >45 You have money for sending Q advertisements. You have P1, P2, P3, P4, P5 customers in categories above.
  • 78. Using statistics for sending mails You have P1, P2, P3, P4, P5 customers in categories above. Data: Sample of past advertisements: m1=frequency of positive answers in category 1. m2=frequency of positive answers in category 2. … ==> Who should receive advertisements ?
  • 79. Using statistics for sending mails m1=frequency of positive answers in category 1 = number of positive answers / number of ads e.g. if 17 ads sent, m1=mean(0,1,1,0,1,0,0,0,1,0,0,0,0,0,1,0,0)=5/17
  • 80. Using statistics for sending mails m1=frequency of positive answers in category 1. m2=frequency of positive answers in category 2. … 1 = std deviation for category 1 2 = std deviation for category 2 … b=benefit per customer with positive answer. If ( (m1+21/sqrt(n1)) x b < price of one mailing), then discard category 1. Send ads to non-discarded categories.
  • 81. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) a) based on optimization b) based on statistics c) based on time-decomposition: Zermelo (remember, irrigation, water, crops, etc) d) others e) all-in-one
  • 82. Our river in Paris is the “Seine”. A French politician said he would soon swim across it. After all, he never did it. For your health, don't do it. Nevertheless, we try to keep it as clean as possible.
  • 83. Another beautiful application This is Paris. Beautiful town. With plenty of people (10 millions in IDF).
  • 84. Another beautiful application This is Paris. Beautiful town. With plenty of people (10 millions in IDF). Producing plenty of fecal matter ==> dirty water.
  • 85. Dirty water should be separated from the Seine. And usually it is. Something like this: Seine Dirty water
  • 86. Problem: if big rainfalls reach dirty water, then dirty water might pollute the Seine Seine Dirty water
  • 87. No typhoon in France. But we can have heavy rains/winds in Paris: - 0.96 dm in 24 hours happened in 1987. - gusts at 169 km/h in 1999 (very unusual in France) Problem: if big rainfalls reach dirty water, then dirty water might pollute the Seine Seine Dirty water (yes, in Taiwan it is more impressive, sometimes it is 16.7 dm in 24 hours and gusts can reach 250 km/h...)
  • 88. No typhoon in France. But we can have heavy rains/winds in Paris: - 0.96 dm in 24 hours happened in 1987. - gusts at 169 km/h in 1999 (very unusual in France) Problem: if big rainfalls reach dirty water, then dirty water might pollute the Seine Seine Dirty water (yes, in Taiwan it is more impressive, sometimes it is 16.7 dm in 24 hours and gusts can reach 250 km/h...)
  • 89. No typhoon in France. But we can have heavy rains/winds in Paris: - 0.96 dm in 24 hours happened in 1987. - gusts at 169 km/h in 1999 (very unusual in France) Problem: if big rainfalls reach dirty water, then dirty water might pollute the Seine Seine Dirty water → Seine! (yes, in Taiwan it is more impressive, sometimes it is 16.7 dm in 24 hours and gusts can reach 250 km/h...)
  • 90. Another beautiful application Three water networks: - dirty water: should go to cleaning stations - clean water: can go to the Seine, but can't be drunk - drinkable water (France: tap water = drinkable)
  • 91. Big water network Dirty Dirty Dirty Dirty water water water water Clean Clean Clean Clean water water water water
  • 92. Water vs dirty water Challenge: Summer storms. Not comparable to a Taiwanese typhoon. But a lot of water. Can make dirty water become very big. Can invade clean water. Your mission: - Get read of dirty water - Protect clean water
  • 93. Water vs dirty water State: level in each stock, valves' status (open or closed) At each time step, i(x) liters of water reach stock x. you can open or close valves ==> get a new state. Your mission: - Get read of dirty water - Protect clean water ===> Zermelo.
  • 94. Water vs dirty water Typically: (0, 1, 0, 0, 0, 1, 0, 1, 0.42, 0.2, 0.0, 0.8, 0.3) (valves) (stock levels) Plenty of rules: - if (valve 4 opens, then water from stock 1 3 goes to stock 2 at rate 0.02m /s) - if (stock[2]>0.3) then dirty water ==> Seine, 3 0.1m /s ==> Maximize your number of points at the end of the storm
  • 95. Shrinking horizon Too many time steps! At each time step, make a decision using only 30 time steps. Example of heuristic function: zermeloValue(state)=the margin before any stock can go to the Seine.
  • 96. Shrinking horizon Too many time steps! At each time step, make a decision using only 30 time steps. Example of heuristic function: zermeloValue(state)=the margin before any stock can go to the Seine.
  • 97. Shrinking horizon Too many time steps! At each time step, make a decision using only 30 time steps. Example of heuristic function: zermeloValue(state)=the margin before any stock can go to the Seine.
  • 98. Shrinking horizon Too many time steps! At each time step, make a decision using only 30 time steps. Example of heuristic function: zermeloValue(state)=the margin before any stock can go to the Seine.
  • 100. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) a) based on optimization b) based on statistics c) based on time-decomposition d) others e) all-in-one
  • 101. Overview 1) Basic definitions 2) Illustrative example: UK in WWII 3) Categories of Op. Research (OR) a) based on optimization b) based on statistics c) based on time-decomposition d) others e) all-in-one