MDP 631 Industrial Operations Research Lecture 1 Integer programming, Branch-and-bound, Goal...
Transcript of MDP 631 Industrial Operations Research Lecture 1 Integer programming, Branch-and-bound, Goal...
MDP 631Industrial Operations Research
Lecture 1
Dr. Tamer F. AbdelmaguidAssociate Professor at Cairo University, Faculty of Engineering,
Mechanical Design and Production Dept.
Communication
• Email:
• Web address:
http://scholar.cu.edu.eg/?q=tabdelmaguid/classes/mdp631-advanced-industrial-operations-research
• Office hours:
Wednesdays 2:00 – 4:00
Today’s lecture
• Syllabus
• What is Operations Research (OR)?
• What you will learn in this course
• Course outline
• Mathematical modeling
• Mathematical programming and its different types
• Linear programming (LP)
• Graphical method for solving LP models
What is Operations Research (OR)?
• Enterprises typically consist of various units whose operationsneed to be coordinated
– A typical problem: how to distribute resources across units so as to maximize efficiency
• OR is the discipline of applying analytical tools based on mathematical models to help take better decisions in managing these operations (the “science of better”)
• Typical decision-making process in OR entails:
1. Gathering available data
2. Building an abstract mathematical model
3. Solving the mathematical problem
4. Supplying the results to management
Feedback: may need to enhance data or model
A Brief History of OR
World War II led to the birth of OR
• Scientists and engineers used mathematical tools to deploy, manage, and analyze military operations, e.g.,– deployment of the radar
– management of convoy and submarine operations
• Many important developments took place in this period. Most notably George Dantzig invented the simplex method for solving linear programs (LPs) in 1947
– One of the first applications was the diet problem: given foods with varying nutrient amounts, plan a diet that satisfies the desired nutrient requirements + the food-amount constraints, and minimizes cost
Perhaps the single most important catalyst in the advancement of OR
Brief History (contd.)
After the War:
• Industrial boom led to rapid increase in size of corporations –growing need for systematic decision-making tools
• Managers began to realize both, the modeling power of LPs and OR tools, and their potency in improving efficiency even under existing technology;
• Great advances were made in computational technology, which allowed one to solve problems of ever-increasing size via OR tools
Where is OR Today?
• Immense computing power available readily and fairly cheaply, e.g., PCs
• A half-century of research in OR has led to:– very good theoretical understanding
– various software packages, e.g., CPLEX, LINGO, XPRESS-MP, being available that can be used “off-the shelf”
• OR is everywhere – from booking an airline ticket, to checking into your hotel
• OR is combined with other information technology, artificial intelligence and statistical inference to coin a new term--Analytics
MDP631 Course Content
Types of mathematical programming models, Solution techniques for linear programming models and sensitivity analysis, Duality theory, Integer programming, Branch-and-bound, Goal programming, Multi-objective problems, Separable programming, Mathematical programming solvers, Industrial applications.
What you will learn in this course -ILOs
1. Differentiate between types of mathematical programming models (linear, integer, mixed integer, non-linear, …etc)
2. Construct mathematical programming models for different types of decision making problems within the contexts of production planning and supply chain management.
3. Solve simple linear, mixed-integer linear and non-linear programming models by hand.
What you will learn in this course –ILOs (cont.)
4. Interpret mathematical programming models to formats acceptable by Lingo software (a professional mathematical programming solver).
5. Utilize skillfully Lingo software and analyze and interpret solutions of mathematical programming models generated by it.
6. Acknowledge new methods in optimization and compare their characteristics.
7. Prepare professional reports on mathematical programming formulations and their solutions representations.
Resources
• Textbook: “Optimization Modeling with LINGO”, 6th edition, Lindo Systems Inc., Illinois, USA, 2006.
• Reference:
Taha, H. A., 2010, “Operations research, an introduction”, 9th
edition, Prentice-Hall
• Software: LINGO (ver. 18) - Optimization Modeling Software for Linear, Nonlinear, and Integer Programming
http://www.lindo.com
Course Outline
Topic hours
▪ Introduction to mathematical programming, types of mathematical
programming models and solution techniques for linear programming
models. (Chaps 1, 2 & 3)
9
▪ The model formulation process and template models (Chap. 4) 3
▪ Using sets for formulating mathematical programming models (Chap.
5)3
▪ Product mix, covering, staffing and cutting stock models (Chaps. 6 & 7) 3
▪ Networks, distribution, PERT/CPM, multi-period planning and blending
of input material (Chaps 8, 9 & 10)3
▪ Formulating and solving integer programming models (Chap. 11) 3
▪ Formulating and solving non-linear programming models. 3
▪ Stochastic programming models (Chap. 12) 6
▪ Multiple criteria and goal programming (Chap. 14) 6
▪ Inventory, production and supply chain management (Chap. 17) 3
Grading
– Final 60 %
– Midterm 15 %
– Project report and discussion 10 %
– Homework assignments
and class participation 15 %
• Any student with less than 75% attendance will be deprived from attending the final exam.
Mathematical Modeling
• A model is a representation of a system explaining the relationships between the objects that constitute that system, and can be easily used to study and analyze the relationship between the system’s inputs and outputs.
• There are different languages that can be used to build the model. Models can be expressed in mathematical terms, logical relationships or using simulation methodologies.
Motives for Building Math Models
• It helps in accurately defining the relationships among objects and often reveals some aspects that are not apparent to many people involved in that system.
• Helps in analyzing the system and discovering better course of actions.
• Facilitates experimentations which may not be possible to be conducted in real system.
An Example of Mathematical Model
X
r
l
)(sinrl)cos(.rX 222 −+=
The crank-slider mechanism
Mathematical Programming
• Mathematical programming is different from computer programming. In computer programming, problems are solved using a set of steps that process the input parameters of a problem and generate the outputs, which are the solutions to that problem.
• Mathematical programming does not generate solutions; it rather defines the structure of the studied problem in the form of a single or multiple objectives and a set of constraints that govern the selection of the decision variables.
Mathematical Programming
• The general form of a mathematical program is:– Minimize/Maximize f(X) objective function (target)
– Subject to: (X) , or = B constraints (restrictions)
• Where X is the vector of decision variables, f(X) and (X) are functions of X that contains some of the parameters of the problem, and B is a constants vector.
Types of Mathematical Programming
Types of Mathematical Programming
Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
integer linear prog. (ILP) integer linear inequalities linear function
mixed integer prog. (MIP) int&real linear inequalities linear function
quadratic programming real linear inequalities quadratic function
(hopefully convex)
quadratically constrained
programming
real quadratic
inequalities
linear or quadratic
function
convex programming real convex region convex function
nonlinear programming real any any
Linear Programming (LP)Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
Linear Programming in 2 dimensions
Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
y 4
y 0
x 3x 0
image adapted from Keely L. Croxton
2 variables:feasible region is a convex polygon
boundary offeasible regioncomes fromthe constraints
for comparison,here’s a non-convexpolygon
Linear Programming in n dimensions
Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
image adapted from Keely L. Croxton
3 variables:feasible region is a convex polyhedron
In general case of n dimensions, the word is polytope
(n-1)-dimensional facet, imposed bya linear constraint
that is a full (n-1)-dim hyperplane
Integer Linear Programming (ILP)Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
integer linear prog. (ILP) integer linear inequalities linear function
image adapted from
Jop Sibeyn
round to nearest int (3,3)? No, infeasible.
round to nearest feasible int (2,3) or (3,2)?
No, suboptimal.
round to nearest integer vertex (0,4)?
No, suboptimal.
Mixed Integer Programming (MIP)Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
integer linear prog. (ILP) integer linear inequalities linear function
mixed integer prog. (MIP) int&real linear inequalities linear function
x still integerbut y is now real
at a vertexbut how tofind it?
Quadratic ProgrammingName Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
quadratic programming real linear inequalities quadratic function
(hopefully convex)
level sets of x2+y2
(try to minimize)level sets of (x-2)2+(y-2)2
(try to minimize)same, but maximize(no longer convex)
solution no longer at a vertexlocal max
Quadratically Constrained Programming
Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
quadratic programming real linear inequalities quadratic function
(hopefully convex)
quadratically constrained
programming
real quadratic
inequalities
linear or quadratic
function
curvyfeasibleregion
linear objective in this case, so level sets are again hyperplanes,but optimum is not at a vertex
Convex ProgrammingName Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
convex programming real convex region convex function
(to be minimized)
but not but not
Non-convexity is hardbecause it leads to disjunctive choices in optimization (hencebacktracking search).
▪ Infeasible in middle of line: which way to go ?
▪ Objective too large in middle of line: which way to go?
Convex ProgrammingName Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
convex programming real convex region convex function
(to be minimized)Can minimize a convex function by methods such as gradient descent, conjugate gradient, or (for non-differentiable functions) Powell’s method or subgradient descent.No local optimum problem.
Here we want to generalize to minimization within a convex region. Still no local optimum problem. Can use subgradient or interior point methods, etc.
Note: If instead you want to maximizewithin a convex region, the solution is at least known to be on the boundary, if the region is compact (i.e., bounded).
1st derivative never decreases (formally: 2nd
derivative is 0)
1-dimensional test is met along any line (formally: Hessian is positive semidefinite)
Nonlinear ProgrammingName Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
convex programming real convex region convex function
nonlinear programming real any any
Non-convexity is hardbecause it leads to disjunctive choices in optimization.
Here in practice one often falls back on random-search methods.
To get an exact solution, you can try backtracking search methods that recursively divide up the space into regions.
(Branch-and-bound, if you can compute decent optimistic bounds on the best solution within a region, e.g., by linear approximations.)
Types of Mathematical Programming
Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
integer linear prog. (ILP) integer linear inequalities linear function
mixed integer prog. (MIP) int&real linear inequalities linear function
quadratic programming real linear inequalities quadratic function
(hopefully convex)
quadratically constrained
linear programming
real quadratic
inequalities
linear or quadratic
function
convex programming real convex region convex function
nonlinear programming real any any
Types of Mathematical Programming
Name Vars Constraints Objective
constraint programming discrete? any N/A
linear programming (LP) real linear inequalities linear function
integer linear prog. (ILP) integer linear inequalities linear function
mixed integer prog. (MIP) int&real linear inequalities linear function
quadratic programming real linear inequalities quadratic function
(hopefully convex)
quadratically constrained
linear programming
real quadratic
inequalities
linear or quadratic
function
convex programming real convex region convex function
nonlinear programming real any any
Lots of software applications are available forvarious kinds of math programming!
Huge amounts of effort making it smart, correct, and fast – use it!
In this course, we will use LINGO for solving different types of mathematical programmingmodels.
Linear Programming (LP): Definitions
Linear programming problem: – problem of maximizing or minimizing a linear function of a
finite number of variables
– subject to a finite number of linear constraints: , or = constraints
max/min f(x) = c1x1 + c2x2 + … + cnxn
subject to ai1x1 + ai2x2 + … + ainxn bi "i=1,…,m
Feasible point: xRn s.t. x satisfies all constraints
Feasible region: set of all feasible pointsP = {xRn: x satisfies all constraints}
=
LP: more definitions
max/min f(x) = c1x1 + c2x2 + … + cnxn
subject to a11x1 + a12x2 + … + a1nxn b1
a21x1 + a22x2 + … + a2nxn b2
a31x1 + a32x2 + … + a3nxn = b3
Decision variables:should completely describe all decisions to be made
Objective function
Constraints
Optimal solution: feasible solution with best (max/min) objective-function value
Optimal value: objective-f’n. value at an optimal solution
Building an LP model
• to build a mathematical programming model, we need to identify the following:1. Parameters: which are the known constants of the
problem.
2. Decision variables: which are the unknowns of the problem that the model seeks to determine their values.
3. Objective function(s): which represent the goal to be achieved through determining the best combination of decision variables.
4. Constraints: which restricts the values that the decision variables can take.
Reddy Mikks Problem (Taha)• The Reddy Mikks company owns a small paint factory that produces both interior
and exterior house paints for wholesale distribution. Two basic raw materials, A and B, are used to manufacture the paints.
• The maximum availability of A is 6 tons a day; that of B is 8 tons a day. The daily requirements of the raw materials per ton of interior and exterior paints are summarized in the following table.
• A market survey has established that the daily demand for the interior paint cannot exceed that of exterior paint by more than 1 ton. The survey also showed that the maximum demand for the interior paint is limited to 2 tons daily.
• The wholesale price per ton is $3000 for exterior paint and $2000 per interior paint. How much interior and exterior paint should the company produce daily to maximize gross income?
Tons of Raw Material per Ton of Paint
Exterior Interior Maximum Availability (tons)
Raw Material A 1 2 6
Raw Material B 2 1 8
Reddy Mikks Problem: LP Formulation
Define:
XE = Tons of exterior paint to be produced
XI = Tons of interior paint to be produced
Thus, the LP formulation of the Reddy-Mikks Company is as follows:
Maximize z = 3XE + 2XI
Subject to:
XE + 2XI 6 (1) (availability of raw material A)
2XE + XI 8 (2) (availability of raw material B)
-XE + XI 1 (3) (Restriction in production)
XI 2 (4) (Demand Restriction)
XE , XI 0
Graphical Solution of the Reddy Mikks Problem
A solution is any
specification of values for
the decision variables.
A feasible Solution is a
solution for which all the
constraints are satisfied.
The feasible region is the
set of all feasible solutions.
Notice that the feasible
region is convex
I
1 2 3 E4 5 6 7
0 + 2(0) 6
Constraint 4: XI 2
Constraint 3: -XE + XI 1
Constraint 2: 2XE + XI 8
Feasible
Region
Constraint 1: XE + 2XI 6
Graphical Solution of the Reddy Mikks Problem
An Optimal Solution is
a feasible solution that
has the most favorable
value of the objective
function.
Max z = 3XE + 2XI
Point 1: XE =2, XI = 0: Z = 6
Point 2:
XE =4/3,
XI = 1
Z = 6 Point: XE =3.33, XI = 1.33(How can we get this point?)
Z = 12Z = 9
Z = 12.66
I
1 2 3 E4 5 6 7