Introduction to Linear Programming

advertisement
Operation Research (OR)
RG753
Lecture 1
September 19 & 24, 2014
FA L L 2 0 1 4
DE PA RTMENT OF RS & G I SC
I N STITUTE OF S PACE T ECHN OLOGY
Course Outline

Provided at wordpress

Text Book
1.Introduction to Operation Research: 7/E by Hillier and Lieberman (available online)

Reference Books
1. Operations Research: An Introduction, 8/E By Hamdy A. Taha
2. Operations Research: Applications and Algorithms by Wayne L. Winston
OPERATIONAL RESEARCH -OR
 Involves “Research on Operations” – how to conduct and coordinate the
operations/activities?
 OR applied in almost every organization
─ Manufacturing
─ Engineering
─ Transportation
─ Construction
─ Health care
─ Military
─ Public service
─ Etc.
Research of OR

Scientific method is used to investigate the problem of concern

OR involves a ‘team approach’
Overview of OR Modeling Approach

Most of this course will be based on mathematical methods of operations research (OR)
WELCOME TO
MATHEMATICAL MODELING
What is a model?
 The objective of a model is to identify significant factors
and interrelationships
 a set of mathematical symbols to represent the
components of the real system
 Variables are related together by means of mathematical
equations to describe the behavior of a system
 Reliability of the solution depends on validity of model
Examples?

model airplanes,

portraits,

globes,

models of the atom,

models of genetic structure,

mathematical equations describing physical laws of motion or chemical reactions,

graphs,

organizational charts, and

industrial accounting systems.
Example
Operation Research (OR)

A model in OR is a simplified representation of an operation

Mathematical models are expressed in terms of mathematical symbols and expressions

To allocate the available resources to the various activities in a way that is most effective for the organization
as a whole.

An OR study seeks solutions that are optimal

Attempts to find a best solution (referred to as an optimal solution) for the problem under consideration

“search for optimality” is an important theme in OR

OR currently is one of the fastest-growing career areas for U.S. college graduates (U.S. Bureau of Labor
Statistics)
Mathematical Model in OR

Consists of a system of equations and related mathematical expressions that describe the essence of the problem

If there are ‘n’ related quantifiable decisions to be made, they are represented as Decision variables (say, x1, x2, . . . , xn –
unknowns to be determined)

A measure of performance or Objective Function (e.g., profit) is then expressed as a mathematical function of these
decision variables (for example, P = 3x1 + 2X2 ……….5Xn)

Any restrictions or Constraints on the values that can be assigned to these decision variables are also expressed
mathematically, typically by means of inequalities or equations (for example, x1 +3x1x2 + 2x2 < 10).

The constants (coefficients and right-hand sides) in the constraints and the objective function are called the

Parameters of the model
The mathematical model might then say that the
problem is

to choose the values of the decision variables

so as to maximize the objective function,

subject to the specified constraints.
Sensitivity Analysis

Determining the appropriate values to assign to the parameters of the model is both a critical and a
challenging part

Requires gathering ‘relevant data’

Most of the time, gathering accurate data is difficult

The value assigned to a parameter often is, of necessity, only a rough estimate

Because of the uncertainty about the true value of the parameter, it is important to analyze how the solution
derived from the model would change (if at all) if the value assigned to the parameter were changed to
other plausible values

This process is called sensitivity analysis
Role of OR Team

Your role is of advisory !!!! NOT AS DECISION MAKERS!!!!

Identifying the “right” problem from management’s viewpoint

Identify a number of alternatives under different assumptions or over a different range of values
of some policy parameter (tradeoff between cost and benefit)

Gather relevant data about the problem

Spend considerable time trying to improve the precision of the data

Decision-makers make the final decisions based on their judgment
Problem solving via MM
1.
Formulate a problem
2.
Construct a mathematical model
3.
Solve the model
4.
Test model
5.
Interpret solution
6.
implement
Define/formulate a Problem

In real life, most practical problems are not as simply defined as in your course work

Many times these are described in a vague and imprecise way

So first it is important to well-define statement of the problem

This includes determining such things as
─ the appropriate objectives,
─ Constraints on what can be done,
─ interrelationships between the area to be studied and other areas of the organization,
─ possible alternative courses of action,
─ time limits for making a decision, and so on.

The process of problem definition is a crucial
─ is difficult to extract a “right” answer from the “wrong” problem!
Problem definition (by OR team)

First identify key management personnel (decision-makers)

Probe into their thinking to ascertain appropriate ‘Objectives’
Formulating/Construct a Mathematical
Model

Reformulate the define problem in a form that is convenient for analysis

The conventional OR approach is to construct a mathematical model that represents the
essence of the problem
Deriving Solution from the Model

A common theme in OR is the search for an optimal (best) solution

To develop a procedure (usually a computer-based procedure) for deriving solutions to the
problem from OR model

a number of software packages are readily available
Model Testing

Real problems normally don’t have just a single “right” model

Experiments conducted to test this hypothesis that model is a sufficiently precise representation of the
essential features of the situation that the conclusions (solutions) obtained from the model are also valid for
the real problem

Modify it as needed
─ Testing a model typically leads to a succession of models that provide better and better representations of the problem

It is even possible that two or more completely different types of models may be developed to help analyze
the same problem

This process of testing and improving a model to increase its validity is commonly referred to as model
validation
Implementation

The last phase of an OR study is to implement this system as prescribed by management

Very critical and needs the model solutions to be accurately translated to an operating
procedure
Introduction to Linear Programing (LP)

Most important scientific advances of the mid-20th century

Since 1950, its impact has been extraordinary

Today it is a standard tool that has saved many thousands or millions of dollars for most
companies
Linear Programing Models

The mathematical functions in both the objective function and the constraints are all linear functions

Briefly, the most common type of LP application involves the general problem of allocating limited
resources among competing activities in a best possible (i.e., optimal) way.
Examples

Variety of situations to which the previously mentioned description applies is diverse,
ranging from
─ the mix of products that maximizes profit,
─ the allocation of national resources to domestic needs,
─ selection of shipping patterns,
─ agricultural planning - the allocation of acreage to crops that maximizes total net return,
─ the combination of pollution abatement methods that achieves air quality standards at minimum cost
─ the design of radiation therapy that effectively attacks a tumor while minimizing the damage to nearby
healthy tissue,
─ And so on
LP …conti

Linear programming uses a mathematical model to describe the problem of concern

Linear –
─ all the mathematical functions in this model are required to be linear functions

Programming –
─ does not refer here to computer programming;
─ rather, it is essentially a synonym for planning.

Therefore, linear programming involves the planning of activities to obtain an optimal result, i.e.,
a result that reaches the specified goal best (according to the mathematical model) among all
feasible alternatives
Optimization

What is Optimization?
─ Mathematical procedure for determining optimal allocation of scarce resources
Question?

Why we need LP when allocating resources to activities is the most common type of
application?
Formulation as a LP

To formulate the mathematical (linear programming) model you need
─ Decision variables
◦ X1, X2, ……Xn
─ Objective function
◦ Max (Min) Z
─ Constraints (restrictions)
◦ <, >,=
Linear Programming (LP)

Mathematical Programming in which all of the functions are linear
─ The objective function and the constraints are represented as sums of decision variables each of which is
multiplied by a coefficient
─ For example;
MAXIMIZE
3 X1 + 4 X2 + 9 X3 (Objective Function)
Subject To
X1 + X2 ≥ 10
3X1+4X2+X3 ≤ 20
…..
X1, X2, X3 ≥ 0
Constraints
A Standard Form of the Model
X 1, X 2, ……. X n ≥ 0
Algebraic Notation
Maximize Z =  cj Xj
s.t.  aij Xj ≤ bi
Xj ≥ 0
Matrix Standard Form of an LP Model
Where;
cj = coefficient of objective function
Xj = decision variables (potential activities)
aij = resources required per unit of activity
bi = available resources
Graphical Analysis

Applicable to problems with two or three decision variables

2-variable problem:
─ Involves constructing a two-dimensional graph with x1 and x2 as the axes
─ Non-negativity restrictions x1 = 0 and x2 = 0 require (x1, x2) to lie on the positive side of the axes (including actually on either axis), i.e., in the first
quadrant

Feasible Region (FR)
─ Set of point which satisfies all constraints
─ Boundary of FR is a series of straight lines

Objective Function (OF)
─ Series of parallel lines with a given slope

Optimal Solution
─ Maximum value of OF within the FR
─ Always be on the boundary of the FR
Example
Dr. Saad’s Pizza Mechanics sells a variety of traditional pizzas. Now he is planning to introduce innovative new pizza types based on nontraditional recipes that have been discovered through intensive research and some trials. The traditional pizzas sell for 1,000/- PKR and
uses 200 /-PKR worth of raw material with a baking cost (oven, labor etc.) of 100/- PKR. Whereas a non-traditional pizza will sell for
2,000/- PKR requires 600/- PKR worth of raw material with a baking cost of 500/- PKR . There is a limited amount of flour and labor
available each day. The flour and labor requirements for each type of pizza is as follows:
─ Each Traditional Pizza requires 2 cups of flour and 30 minutes of labor
─ Each Non-Traditional Pizza requires 1 cup of flour and 60 minutes of labor
There are total of 16 labor hours and 30 cups of flour available per day at the most. The Pizza Mechanics’ owners want to maximize their
daily profit. They are looking for the optimal mix of the two types of pizzas prepared each day. You, as an expert, is willing to help Dr.
Saad. Please determine the number of each type of Pizza to be baked each day in order to maximize his profit. (if you want some
compensation for your services then please deduct that amount from the net profit).
In Class
Formulation of LP
In Class
Graphical Representation
Prototype Example

Page 25, sec 3.1 of your text book
Terminology for Solutions of the Model

A feasible solution is a solution for which all the constraints are satisfied.

An infeasible solution is a solution for which at least one constraint is violated.

The feasible region is the collection of all feasible solutions.

It is possible for a problem to have no feasible solutions.

An optimal solution is a feasible solution that has the most favorable value of the objective
function. The most favorable value is
─ the largest value if the objective function is to be maximized,
─ whereas it is the smallest value if the objective function is to be minimized.
Binding and Nonbinding Constraints

A constraint is binding if the left-hand side and the right-hand side of the constraint are
equal when the optimal values of the decision variables are substituted into the constraint
Optimal Solution

Most problems will have just one optimal solution

However, it is possible to have more than one optimal solution

Any problem having multiple optimal solutions will have an infinite number of them, each with the same
optimal value of the objective function

Another possibility is that a problem has no optimal solutions.

This occurs only if
─ it has no feasible solutions or
─ the constraints do not prevent improving the value of the objective function (Z) indefinitely in the favorable direction
(positive or negative).

The latter case is referred to as having an unbounded Z.
Conti…

A corner-point feasible (CPF) solution is a solution that lies at a corner of the feasible region
─ the best CPF solution must be an optimal solution
─ if a problem has exactly one optimal solution, it must be a CPF solution.
─ If the problem has multiple optimal solutions, at least two must be CPF solutions
Alternative or Multiple Optimal Solutions

If an isoprofit line intersect an entire line segment corresponding to the binding constraint,
then any point on the line segment joining its two corner points (feasible solution) will also
be optimal
Infeasible LP

If an LP’s feasible region is empty - contain no points

An infeasible LP has no optimal solution
Unbounded LP

For a max problem, an unbounded LP occurs if it is possible to find points in the feasible
region with arbitrarily large z-values
─ A max problem is unbounded if, when we move parallel to our original isoprofit line in the direction of
increasing z, we never entirely leave the feasible region

For a minimization problem, an LP is unbounded if there are points in the feasible region
with arbitrarily small z-values.
─ A minimization problem is unbounded if we never leave the feasible region when moving in the
direction of decreasing z
Unbounded LP
Assumptions of LP

implicit in the model formulation
1.
Proportionality
2.
Additivity
3.
Divisibility
4.
Certainty
Proportionality

The contribution of each activity to the value of the objective function Z is proportional to the level of
the activity xj, as represented by the cjxj term in the objective function. Similarly, the contribution of
each activity to the left-hand side of each functional constraint is proportional to the level of the
activity xj, as represented by the aijxj term in the constraint.
Additivity
─ Every function in a linear programming model (whether the objective function or the function on the
left-hand side of a functional constraint) is the sum of the individual contributions of the respective
activities.
Divisibility
─ Decision variables in a linear programming model are allowed to have any values, including non-integer
values, that satisfy the functional and non-negativity constraints. Thus, these variables are not restricted to
just integer values. Since each decision variable represents the level of some activity, it is being assumed that
the activities can be run at fractional levels.

In certain situations, the divisibility assumption does not hold because some of or all the decision
variables must be restricted to integer values. Mathematical models with this restriction are called
integer programing models
Certainty
─ The value assigned to each parameter of a linear programming model is assumed to be a known
constant

In real applications, the certainty assumption is seldom satisfied precisely.
─ Linear programming models usually are formulated to select some future course of action. Therefore,
the parameter values used would be based on a prediction of future conditions, which inevitably
introduces some degree of uncertainty

For this reason it is usually important to conduct sensitivity analysis after a solution is found
that is optimal under the assumed parameter values

It is very common in real applications of linear programming that almost none of the four
assumptions hold completely

Especially true for the certainty assumption, so sensitivity analysis normally is a must to
compensate for the violation of this assumption
Types of Models
1.
Linear and Non-linear Models
2.
Static and Dynamic Models
3.
Integer and Non-integer Models
4.
Deterministic and Stochastic Models
Linear and Nonlinear Models

Linear Model: Linear decision variables in the objective function and in the constraints

Non-Linear Model: If an optimization model is not linear
─ nonlinear models are much harder to solve than linear models
Static and Dynamic Models

A Static Model is one in which the decision variables do not involve sequences of decisions
over multiple periods
─ We solve a “one-shot” problem whose solutions prescribe optimal values of decision variables at all
points in time

A Dynamic Model is a model in which the decision variables do involve sequences of
decisions over multiple periods
Integer and Non-integer Models

Non-integer Model: All decision variables are free to assume fractional values
─ Examples: volume, temperature, pressure, etc. of our inputs may all assume fractional values

Integer Programming (IP): One or more decision variables must be integer
─ Example: number of workers starting work during each shift at a fast-food restaurant

Mixed Integer Programming (MILP) problem: If only some of the decision variables are required to have
integer values

Pure Integer Programming problem: If all of the decision variables are required to have integer values

Binary Integer Programming: IP problems that contain only binary (0 , 1) variables
Deterministic and Stochastic Models

Deterministic Model: for any value of the decision variables, the value of the objective
function and whether or not the constraints are satisfied is known with certainty

Stochastic Model: Decisions are made in an uncertain situation
Reservoir Model
 Multipurpose Reservoir
─ Water Supply
─ Flood Control
─ Recreation
─ Hydropower
 Objective Function may be related to any of the above uses
─ Conflicting objectives
Water Supply with Constant Release
 Notation
◦ CAP=reservoir capacity [m3]
◦ St=storage volume at the beginning of month t [m3]
◦ It=inflow volume during month t [m3] (known)
◦ Rt=release volume during month t [m3]
◦ Rmin= Required minimum release each month [m3] (known)
◦ Smin= Required minimum storage [m3] (known)
Constraints
 Mass Balance Equation
St = St-1+ It- Rt
 Capacity Constraint
1.
St ≤ CAP
2.
St ≥ Smin
3.
Rt ≥ Rmin
All variables greater than or equal to zero
For all t
Objective Function
Minimize CAP
Textbook Example
Solution
Download