Chapter 1: Introduction To Operations Research: The Modelling Process
Chapter 1: Introduction To Operations Research: The Modelling Process
Terminology
- Feasible solution
Solution that satisfies all the problem’s constraints.
- Optimal solution
Feasible solution that results in the largest possible objective function value when maximizing
(or smallest when minimizing).
Special cases
- Alternative or multiple optimal solutions
➔ In graphical method: objective function line is parallel to a boundary constraint.
- Infeasible LP
➔ LP is over-constrained → no feasible solutions → no optimal solution
- Unbounded LP
➔ Many feasible solutions → no optimal solution
2
Setting Up the Simplex Method
Basic solution
- A basic solution is an augmented CPF solution (and includes slack variable values).
- Two basic solutions are adjacent if all but one of their non-basic variables are the same.
- Moving from one basic solution to another involves switching one variable from non-basic to basic and vice
versa for another variable.
➔ Entering variable: non-basic to basic
➔ Leaving variable: basic to non-basic
Special cases
- Tie for the entering variable → choose arbitrarily
- Tie for the leaving variable → choose arbitrarily
- Degeneracy: basic variable with a value of zero = degenerated variable
- Alternative optimal solutions: non-basic variable with an objective row value equal to zero in the final
tableau → multiple optima
- Unboundedness: all entries in an entering column are non-positive → no leaving variable → entering
basic variable could be increased indefinitely → unbounded
- Infeasibility: there is an artificial variable in the optimal solution → problem is infeasible
Two-Phase Method
When using big M-method → split the problem and solve the problem in two phases
Phase 1: Divide the big M method objective function terms by M and drop the other negligible terms.
- Minimize Z = ∑ artificial variables
- subject to Revised constraints (with artificial variables)
Phase 2: Find the optimal solution for the real problem. Use the optimal solution of phase 1 as initial basic
feasible solution for applying the simplex method to the real problem (the big M method coefficients can be
dropped dependent of outcome of phase 1).
- Minimize Z = ∑ original variables
- subject to Original constraints (without artificial variables)
Duality Theory
Quick estimate of the objective function value → how to find the best possible upper bound?
Construct a linear combination of the constraints and multiply an unknown variable 𝑦𝑖 with each constraint.
Suppose that, instead of using our resources to produce products, we sell the available resources → what
prices should we charge?
➔ Decision variables 𝑦𝑖 : per unit charge for every resource.
Sensitivity Analysis
Sensitivity analysis, also referred to as post optimality analysis
Determine how the optimal solution in an LP is affected by changes, within specified ranges, in:
- The values of the objective function coefficients.
- The values of the right-hand side coefficients.
- The values of the exchange coefficients.
How might changes in the objective function coefficients affect the optimal solution?
The range of optimality of an objective function coefficient provides the range of values over which the current
solution remains optimal (keeping all other coefficients constant).
4
How might a change in the right-hand side for a constraint affect the feasible region and
perhaps cause a change in the optimal solution?
The range of feasibility of a right hand side coefficient is the range of that coefficient over which the shadow
price remains unchanged.
5
Fundamental insight
For a problem with 2 constraints:
𝑅0𝐹𝐼𝑁𝐴𝐿 = 𝑅0𝐼𝑁𝐼𝑇𝐼𝐴𝐿 + 𝑦1 𝑅1𝐼𝑁𝐼𝑇𝐼𝐴𝐿 + 𝑦2 𝑅2𝐼𝑁𝐼𝑇𝐼𝐴𝐿
𝑅1𝐹𝐼𝑁𝐴𝐿 = 𝑠1′ 𝑅1𝐼𝑁𝐼𝑇𝐼𝐴𝐿 + 𝑠2′ 𝑅2𝐼𝑁𝐼𝑇𝐼𝐴𝐿
𝑅2𝐹𝐼𝑁𝐴𝐿 = 𝑠1′′ 𝑅1𝐼𝑁𝐼𝑇𝐼𝐴𝐿 + 𝑠2′′ 𝑅2𝐼𝑁𝐼𝑇𝐼𝐴𝐿
Extra example B
Question 4: Range of feasibility and sunk costs
- Given that aluminium is a sunk cost, what is the maximum amount the company should pay for 50 extra
pounds of aluminium?
- If aluminium were a relevant cost, what is the maximum amount the company should pay for 50 extra
pounds of aluminium?
6
Formulate a goal programming model
1) Decide the priority of each goal
2) Decide the weight on each goal. If a priority level has more than one goal, for each goal i decide the
weight, 𝑤𝑖 , to be placed on the deviation(s), 𝑑𝑖+ and/or 𝑑𝑖− , from the goal.
3) Set up the initial linear program
➢ Min (𝑤1 𝑑1+ + 𝑤1 𝑑1− )
➢ s.t. Functional and Goal Constraints
7
→ leaving variable = donor cell with smallest allocation
4) Determine the new basic feasible solution
Add the value of the leaving basic variable to the allocation for each recipient cell and
subtracting this same amount from the allocation for each donor cell.
Changing the objective function coefficient 𝑐𝑖𝑗 of a basic variable (occupied cell) into 𝑐𝑖𝑗′
- The current basic solution remains feasible (RHS is not changed)
- Find new shadow prices 𝑢𝑖 and 𝑣𝑗 as the set of equations have changed
Range of values? Change 𝑐𝑖𝑗 to 𝑐𝑖𝑗 + ∆ → than new shadow prices
- Current basic solution remains optimal as long as all non-basic variables price out nonnegative.
9
Solution method
Ford-Fulkerson algorithm
Max flow min cut theorem
For any network having a single origin node and a single destination node, the maximum possible flow from
origin to destination equals the minimum cut value for all cuts in the network.
Intermezzo
BIP Encoding
Use Big M to turn-off constraint:
Either:
- 3𝑥1 + 2𝑥2 < 18
- and 𝑥1 + 4𝑥2 < 16 + M (and M is very BIG)
Or:
- 3𝑥1 + 2𝑥2 < 18 + M
- and 𝑥1 + 4𝑥2 < 16
LP Encoding
Introduce 𝑦𝑖 to turn off each constraint i
10
Chapter 4: Integer Programming
Integer Programming
http://web.mit.edu/15.053/www/AMP-Chapter-09.pdf
Integrality requirement
One or more variables must assume an integer value.
IP Formulation
Formulating logical constraints: see slides 25-33
- Contingent decisions: A implies B
- Pack constraint: at most one out of n items can be selected.
- Partition constraint: exactly one out of n items must be selected.
- Cover constraint: at least one out of n items must be selected.
- Cardinality constraint: more than k out of n items must be selected.
- K out of the N constraints must hold → indicator variables 𝑦𝑖 whether or not constraint i is satisfied.
- Variable upper bound constraint: “If you build a warehouse, you can store up to 13 tons of x in it.”
- Semi-continuous variable: “If you build a warehouse, it must be used to store at least 56 tons but no
more than 141 tons.”
- Binary factorization
- The knapsack problem
o n items, with per unit values and weights 𝑣𝑖 and 𝑤𝑖 (i = 1, …, n), can be put into a bag that can carry a
maximal weight of W.
o How many of each item should be put into the bag such that the total value is maximized?
- The fixed-charge problem → a fixed or lump-sum cost
- Blending problem
Solution methods
Rounding the LP solution
LP relaxation (LPR):
- Ignoring the integrality constraints.
- LP solution
- Rounding up or down to integer values → may be infeasible or sub-optimal
➔ Complete enumeration of feasible ILP solutions
11
Enumeration procedure
Make sure that only a small fraction of the feasible solutions need to be examined:
- Dynamic programming (see later)
- Branch-and-bound: divide-and-conquer method
➢ Initialisation: set 𝑍 ∗ = −∞
➢ Stopping rules:
o Optimality test: stop when there are no remaining subproblems to investigate, the current
incumbent is optimal.
o Specify a sub-optimality tolerance factor: allows to stop once an integer solution is found
that is within some % of the optimal value.
➢ Branch-and-bound with binary variables:
o Dividing (branching): partition the set of feasible solutions into smaller subsets.
▪ Branching: partition into subsets by focusing on one variable.
o Conquering (bounding + fathoming): find a bound (Z*) for how good the best solution in a
subset can be and then discard the subset if its bound indicates that it can’t contain an
optimal solution.
▪ Bounding: a bound for sub-problems is obtained by solving the LP relaxation. (Note that
the optimum of an IP can never be better than the optimum of its LP relaxation.)
▪ Fathoming: dismissing a subproblem from further consideration.
• The LP relaxed solution is worse than the best known integer solution.
• The LP relaxation is infeasible.
• The LP relaxed solution is all integer (update best known integer solution).
➢ Branch-and-bound with general integer variables:
o Branching: select the first integer-restricted variable with a fractional value in the LP relaxed
solution and create two new subproblems.
o Bounding: calculate the optimum of the LP relaxation.
o Fathoming: dismiss a subproblem if
▪ The LP solution is worse than the best known integer solution.
▪ The LP relaxation is infeasible.
▪ The LP solution is integer.
Branch-and-cut for BIP
- Automatic BIP preprocessing
➢ Fixing variables
o If one value of a variable cannot satisfy a constraint (even when the other variables equal their best value for trying
to satisfy the constraint), then that variable can be fixed at its other value.
➢ Eliminating redundant constraints
o If a functional constraint satisfies even the most challenging binary solution, then it has been made redundant by
the binary constraints and can be eliminated.
➢ Tightening ≤ constraints
o A constraint can be tightened by adjusting the coefficients and right-hand side such that the feasible region of the LP
relaxation reduces without eliminating feasible binary solutions.
- Generation of cutting planes
➢ A cutting plane (or cut or valid inequality) = a new functional constraint that reduces the feasible
region for the LP relaxation without eliminating feasible solutions for the IP problem.
➢ Minimum cover cuts (for BIP) → for functional constraints in ≤ form with only nonnegative
coefficients.
➢ Gomory cuts (for PIP) → when all coefficients and right-hand sides have integer values.
o Gomory cuts make the optimum of the LP relaxation infeasible by adding a constraint that
cuts the LP optimum from the solution space, based on the fractional values that appear in
the LP optimum.
12
Chapter 5: Dynamic Programming
General Description
General description
The problem can be divided in N separate stages with a policy decision required at each stage.
Each stage has a number of states associated with the beginning of that stage.
- In stage n the system has a certain state 𝑥𝑛 .
The effect of the policy decision 𝒅𝒏 at stage n is to transform the current state 𝑥𝑛 to a state 𝑥𝑛+1 associated
with the beginning of the next stage.
- The return function 𝑟𝑛 (𝑥𝑛 , 𝑑𝑛 ) gives the ‘return’ of making decision 𝑑𝑛 being in state 𝑥𝑛 at stage n.
- The state transition function 𝑡𝑛 (𝑥𝑛 , 𝑑𝑛 ) gives the state 𝑥𝑛+1 at stage n+1 that is reached after making
decision 𝑑𝑛 in state 𝑥𝑛 at stage n.
Recursive relationship
The cumulative return is the sum of the immediate return in the current stage and the cumulative return in the
remaining stages:
∗
- 𝑓𝑛 (𝑥𝑛 , 𝑑𝑛 ) = 𝑟𝑛 (𝑥𝑛 ,𝑑𝑛 ) + 𝑓𝑛+1 (𝑥𝑛+1 ) with 𝑥𝑛+1 = 𝑡𝑛 (𝑥𝑛 ,𝑑𝑛 )
The optimal cumulative return gives the best cumulative return in each state:
- 𝑓𝑛∗ (𝑥𝑛 ) = 𝑚𝑎𝑥/𝑚𝑖𝑛𝑑𝑛 (𝑓𝑛 (𝑥𝑛 ,𝑑𝑛 ))
In the final stage N, there is no next stage, so the cumulative return is equal to the immediate return:
- 𝑓𝑁 (𝑥𝑁 , 𝑑𝑁 ) = 𝑟𝑁 (𝑥𝑁 , 𝑑𝑁 )
- 𝑓𝑁∗ (𝑥𝑁 ) = 𝑚𝑎𝑥/𝑚𝑖𝑛𝑑𝑁 (𝑟𝑁 (𝑥𝑁 , 𝑑𝑁 ))
Backward recursion: to solve the problem, start in stage N and work back to stage 1.
′
𝑓 (𝑥𝑖)
- Newton’s method → 𝑥𝑖+1 = 𝑥𝑖 − ′′ → STOP when |𝑥𝑖+1 – 𝑥𝑖 | ≤ ε
𝑓 (𝑥𝑖)
Table:
Gradient search
Step 1: Initialization
- Select ε and any trial solution 𝑥0 .
Step 2:
- If all partial derivatives in the solution are smaller than ε, stop.
Step 3: We want to move as far as possible, say t* units, in this direction.
- Thus, select the next point 𝒙𝒎+𝟏 = 𝒙𝒎 + t*∇f(𝒙𝒎 ).
- Moving in the direction of the gradient ∇f(𝑥𝑚 ) increases the function value f.
- Therefore, express f(𝒙𝒎 + t ∇ f(𝒙𝒎 )) as a function of t.
Step 4: How big can t* be?
- Use one-variable unconstrained optimization to find t = t* that maximizes f(𝒙𝒎 + t ∇ f(𝒙𝒎 )) over t > 0.
- Note: If it is a minimization problem, we minimize f(𝒙𝒎 + t*∇f(𝒙𝒎 )) subject to the restriction that t* > 0.
Step 5:
- Update the solution: x’ ≡ x’ + t*∇f(x’).
Step 6:
- Once we have found our new point 𝑥𝑚+1 = 𝑥𝑚 + t*∇f(𝑥𝑚 ), we evaluate ||∇f(𝑥𝑚+1 )||. If the length of the
gradient is less than 0.01, then we have found a local maximum and can stop. Otherwise, return to step 2.
Table:
Constrained optimization
Consider the following NLP problem type, in which the restrictions are equality constraints (CNLP = ):
- Maximize (Minimize) z = f(x1 , x2 , …, xn )
- Subject: g i (x1 ,x2 , …,xn ) = bi , i = 1,…,m
Lagrangian relaxation
= convert the constrained NLP= into an unconstrained NLP and solve it as usual.
Lagrangian function:
𝐿(𝑥, 𝜆) = 𝑓(𝑥) + ∑𝑚
𝑖=1 𝜆𝑖 [(𝑏𝑖 − 𝑔𝑖 (𝑥)] with 𝜆𝑖 = Lagrangian multiplier for constraint i.
➔ Lagrangian multiplier 𝛌𝐢 : rate of change in the optimal value of f(x) per unit increase in bi .
14
Karush-Kuhn-Tucker conditions
x = (x1 , x2 , …, xn ) can be an optimal solution for the nonlinear programming problem (NLP)
Maximize f(x)
s.t. 𝑔𝑖 (𝑥) ≤ 𝑏𝑖 , for all i = 1, 2, …, m
𝑥 ≥ 0.
if there exist m numbers u1 , u2 , …, u𝑚 such that all the KKT conditions are satisfied.
If f(x) is concave and all g i (x) are convex, then a solution satisfying the KKT conditions is optimal.
𝑑𝑓′(𝑥,𝜆)
1) 𝑑𝑥
≤0 ∀𝑥
𝑑𝑓′(𝑥,𝜆)
2) 𝑥 𝑑𝑥
= 0 ∀𝑥
3) 𝑔(𝑥) ≤ 𝑏 → 𝑔(𝑥) − 𝑏 ≤ 0
4) 𝜆 (𝑔(𝑥) − 𝑏) = 0
5) 𝑥 ≥ 0
6) 𝜆 ≥ 0
15
Decision making under risk → prior probabilities
- Maximum likelihood criterion
o Identify the most likely state of nature and choose the alternative with the largest payoff for this
state of nature.
- Bayes’ rule (Expected Value approach)
o The expected return for each decision is calculated by summing the products of the payoff under
each state of nature and the probability of the respective state of nature occurring.
o Choose the alternative with the maximum expected payoff or expected monetary value (EMV):
𝐸𝑀𝑉𝑖 = ∑ 𝑟𝑖𝑗 𝑝𝑗
𝑗
𝐸𝑂𝐿𝑖 = ∑ 𝑔𝑖𝑗 𝑝𝑗
𝑗
EVPI calculation:
1) Determine the optimal return (with PI) corresponding to each state of nature.
2) Compute the expected value of these optimal returns.
3) Subtract the EV of the optimal decision from this expected value (determined in step 2):
EVPI = EV with PI - maximum EV
16
Posterior probabilities calculation:
1) For each state i, multiply its prior probability by the conditional probability for the finding j (indicator).
This gives the joint probabilities for states and findings.
2) Sum these joint probabilities over all states. This gives the marginal probability for each finding.
3) For each state i, divide its joint probability with finding j by the marginal probability for that finding.
This gives the posterior probability.
Decision trees
A decision tree has two types of nodes:
- The decision nodes (square nodes) correspond to decision alternatives: a decision must be made.
- The event nodes (round nodes) correspond to the states of nature: a random event will occur.
A decision tree has two types of branches:
- Branches leaving decision nodes represent the different decision alternatives, from which one must be
selected.
- Branches leaving event nodes represent the different states of nature, each occurring with a given
probability.
Markov Chains
Introduction: Stochastic processes
A stochastic process is a series of random variables {𝑋𝑡 }, with index t running through a given set T. The values
𝑋𝑡 can assume are called the states of the process. We assume that the number of possible states M is finite.
If the next state 𝑋𝑡+1 of the process depends only on the present state 𝑋𝑡 and is independent of past history,
the process is called a Markov Chain.
The process will move from a state to other states with known transition probabilities.
Markov chains
The evolution over time of a (discrete time) stochastic process is described by the (one-step) transition
probabilities:
- P(𝑋𝑡+1 = j | 𝑋𝑡 = i, 𝑋𝑡−1 = 𝑠𝑡−1 , ..., 𝑋0 = 𝑠0 )
A stochastic process has the Markovian property if the transition probabilities depend on the current state
only:
- P(𝑋𝑡+1 = j | 𝑋𝑡 = i, 𝑋𝑡−1 = 𝑠𝑡−1 , ..., 𝑋0 = 𝑠0 ) = P(𝑋𝑡+1 = j | 𝑋𝑡 = i)
A stochastic process is a Markov chain if it has the Markovian property.
If the transition probabilities do not change over time, they are stationary:
- P(𝑋𝑡+1 = j | 𝑋𝑡 = i) = P(𝑋1 = j | 𝑋0 = i) = 𝑝𝑖𝑗
This implies that the n-step transition probabilities are also stationary:
(𝑛)
- P(𝑋𝑡+𝑛 = j | 𝑋𝑡 = i) = P(𝑋𝑛 = j | 𝑋0 = i) = 𝑝𝑖𝑗
17
Chapman-Kolmogorov equations
The n-step probabilities can be obtained recursively from the one-step transition probabilities (with P the
transition matrix).
The n-step transition probability matrix P(n) is given by the n’th power of P: 𝑃(𝑛) = 𝑃(𝑚−𝑘) × 𝑃(𝑘)
Steady-State Probability 𝝅𝒋 for each state j is the long-run probability that a process starting in any state will
be found in state j.
𝜋0 = 𝜋0 𝑃00 + 𝜋1 𝑃10
𝜋1 = 𝜋0 𝑃01 + 𝜋1 𝑃11
𝜋0 + 𝜋1 = 1
The recurrence time is the number of transitions (number of steps) necessary to return to state i when starting
from state i.
➔ Expected recurrence time 𝜇𝑖𝑖 :
1
𝜇𝑖𝑖 =
𝜋𝑖
18
Absorbing states
If there is more than one absorbing state in a Markov chain, the probability of going to absorbing state k from
initial state i is the probability of absorption fik .
Absorption probabilities 𝐟𝐢𝐤 for state k:
𝑀
19