This action might not be possible to undo. Are you sure you want to continue?
Module 1: Introduction and Basic Concepts
Learning Objectives
Optimization is the act of obtaining the best result under the given circumstances. In design
construction and maintenance of any engineering system, many technological and managerial
decisions have to be taken at several stages. The ultimate goal of all such decisions is either
to minimize the effort required or to maximize the desired benefit. Hence optimization can be
defined as the process of finding the conditions that give the minimum or maximum value of
a function, where the function represents the effort required or the desired benefit.
This module starts with a glance through the historical development of optimization methods.
Engineering applications of optimizations are scanned through from which one would get a
broad picture of the multitude of applications, the optimization methods have. The Art of
modeling is briefly explained with the various phases involved in modeling. In the second
lecture various components of the Optimization problem are discussed and summarized with
steps involved in formulating a mathematical programming problem. In the third lecture the
optimization problems are classified under various criteria to enable choosing an appropriate
model applicable to different types of optimization problems. In the final lecture a brief
introduction to the classical and advanced optimization techniques in use are given.
At the end of the module the reader will be able to
1. Understand the need and origin of the optimization methods.
2. Get a broader picture of the various applications of optimization methods used in
engineering.
3. Define an optimization problem and its various components.
4. Formulate optimization problems as mathematical programming problems.
5. Classify optimization problems to suitably choose the method needed to solve the
particular type of problem.
6. Briefly learn about classical and advanced techniques in optimizations.
D Nagesh Kumar, IISc, Bangalore M1LO
Optimization Methods: Introduction and Basic Concepts 1
Module – 1 Lecture Notes – 1
Historical Development and Model Building
Introduction
In this lecture, historical development of optimization methods is glanced through. Apart
from the major developments, some recently developed novel approaches, such as, goal
programming for multiobjective optimization, simulated annealing, genetic algorithms, and
neural network methods are briefly mentioned tracing their origin. Engineering applications
of optimization with different modeling approaches are scanned through from which one
would get a broad picture of the multitude applications of optimization techniques.
Historical Development
The existence of optimization methods can be traced to the days of Newton, Lagrange, and
Cauchy. The development of differential calculus methods for optimization was possible
because of the contributions of Newton and Leibnitz to calculus. The foundations of calculus
of variations, which deals with the minimization of functions, were laid by Bernoulli, Euler,
Lagrange, and Weistrass. The method of optimization for constrained problems, which
involve the addition of unknown multipliers, became known by the name of its inventor,
Lagrange. Cauchy made the first application of the steepest descent method to solve
unconstrained optimization problems. By the middle of the twentieth century, the highspeed
digital computers made implementation of the complex optimization procedures possible and
stimulated further research on newer methods. Spectacular advances followed, producing a
massive literature on optimization techniques. This advancement also resulted in the
emergence of several well defined new areas in optimization theory.
Some of the major developments in the area of numerical methods of unconstrained
optimization are outlined here with a few milestones.
• Development of the simplex method by Dantzig in 1947 for linear programming
problems
• The enunciation of the principle of optimality in 1957 by Bellman for dynamic
programming problems,
D Nagesh Kumar, IISc, Bangalore
M1L1
Optimization Methods: Introduction and Basic Concepts 2
• Work by Kuhn and Tucker in 1951 on the necessary and sufficient conditions for the
optimal solution of programming problems laid the foundation for later research in
nonlinear programming.
• The contributions of Zoutendijk and Rosen to nonlinear programming during the early
1960s have been very significant.
• Work of Carroll and Fiacco and McCormick facilitated many difficult problems to be
solved by using the wellknown techniques of unconstrained optimization.
• Geometric programming was developed in the 1960s by Duffin, Zener, and Peterson.
• Gomory did pioneering work in integer programming, one of the most exciting and
rapidly developing areas of optimization. The reason for this is that most real world
applications fall under this category of problems.
• Dantzig and Charnes and Cooper developed stochastic programming techniques and
solved problems by assuming design parameters to be independent and normally
distributed.
The necessity to optimize more than one objective or goal while satisfying the physical
limitations led to the development of multiobjective programming methods. Goal
programming is a wellknown technique for solving specific types of multiobjective
optimization problems. The goal programming was originally proposed for linear problems
by Charnes and Cooper in 1961. The foundation of game theory was laid by von Neumann in
1928 and since then the technique has been applied to solve several mathematical, economic
and military problems. Only during the last few years has game theory been applied to solve
engineering problems.
Simulated annealing, genetic algorithms, and neural network methods represent a new class
of mathematical programming techniques that have come into prominence during the last
decade. Simulated annealing is analogous to the physical process of annealing of metals and
glass. The genetic algorithms are search techniques based on the mechanics of natural
selection and natural genetics. Neural network methods are based on solving the problem
using the computing power of a network of interconnected ‘neuron’ processors.
D Nagesh Kumar, IISc, Bangalore
M1L1
Optimization Methods: Introduction and Basic Concepts 3
Engineering applications of optimization
To indicate the widespread scope of the subject, some typical applications in different
engineering disciplines are given below.
• Design of civil engineering structures such as frames, foundations, bridges, towers,
chimneys and dams for minimum cost.
• Design of minimum weight structures for earth quake, wind and other types of
random loading.
• Optimal plastic design of frame structures (e.g., to determine the ultimate moment
capacity for minimum weight of the frame).
• Design of water resources systems for obtaining maximum benefit.
• Design of optimum pipeline networks for process industry.
• Design of aircraft and aerospace structure for minimum weight
• Finding the optimal trajectories of space vehicles.
• Optimum design of linkages, cams, gears, machine tools, and other mechanical
components.
• Selection of machining conditions in metalcutting processes for minimizing the
product cost.
• Design of material handling equipment such as conveyors, trucks and cranes for
minimizing cost.
• Design of pumps, turbines and heat transfer equipment for maximum efficiency.
• Optimum design of electrical machinery such as motors, generators and transformers.
• Optimum design of electrical networks.
• Optimum design of control systems.
• Optimum design of chemical processing equipments and plants.
• Selection of a site for an industry.
• Planning of maintenance and replacement of equipment to reduce operating costs.
• Inventory control.
• Allocation of resources or services among several activities to maximize the benefit.
• Controlling the waiting and idle times in production lines to reduce the cost of
production.
• Planning the best strategy to obtain maximum profit in the presence of a competitor.
D Nagesh Kumar, IISc, Bangalore
M1L1
Optimization Methods: Introduction and Basic Concepts 4
• Designing the shortest route to be taken by a salesperson to visit various cities in a
single tour.
• Optimal production planning, controlling and scheduling.
• Analysis of statistical data and building empirical models to obtain the most accurate
representation of the statistical phenomenon.
However, the list is incomplete.
Art of Modeling: Model Building
Development of an optimization model can be divided into five major phases.
• Data collection
• Problem definition and formulation
• Model development
• Model validation and evaluation of performance
• Model application and interpretation
Data collection may be time consuming but is the fundamental basis of the modelbuilding
process. The availability and accuracy of data can have considerable effect on the accuracy of
the model and on the ability to evaluate the model.
The problem definition and formulation includes the steps: identification of the decision
variables; formulation of the model objective(s) and the formulation of the model constraints.
In performing these steps the following are to be considered.
• Identify the important elements that the problem consists of.
• Determine the number of independent variables, the number of equations required to
describe the system, and the number of unknown parameters.
• Evaluate the structure and complexity of the model
• Select the degree of accuracy required of the model
Model development includes the mathematical description, parameter estimation, input
development, and software development. The model development phase is an iterative
process that may require returning to the model definition and formulation phase.
The model validation and evaluation phase is checking the performance of the model as a
whole. Model validation consists of validation of the assumptions and parameters of the
D Nagesh Kumar, IISc, Bangalore
M1L1
Optimization Methods: Introduction and Basic Concepts 5
model. The performance of the model is to be evaluated using standard performance
measures such as Root mean squared error and R
2
value. A sensitivity analysis should be
performed to test the model inputs and parameters. This phase also is an iterative process and
may require returning to the model definition and formulation phase. One important aspect of
this process is that in most cases data used in the formulation process should be different
from that used in validation. Another point to keep in mind is that no single validation
process is appropriate for all models.
Model application and implementation include the use of the model in the particular area
of the solution and the translation of the results into operating instructions issued in
understandable form to the individuals who will administer the recommended system.
Different modeling techniques are developed to meet the requirements of different types of
optimization problems. Major categories of modeling approaches are: classical optimization
techniques, linear programming, nonlinear programming, geometric programming, dynamic
programming, integer programming, stochastic programming, evolutionary algorithms, etc.
These modeling approaches will be discussed in subsequent modules of this course.
D Nagesh Kumar, IISc, Bangalore
M1L1
D Nagesh Kumar, IISc Optimization Methods: M1L1
1
Introduction and Basic Concepts
(i) Historical
Development and
Model Building
D Nagesh Kumar, IISc Optimization Methods: M1L1
2
Objectives
z Understand the need and origin of the optimization
methods.
z Get a broad picture of the various applications of
optimization methods used in engineering.
D Nagesh Kumar, IISc Optimization Methods: M1L1
3
Introduction
z Optimization : The act of obtaining the best result under the
given circumstances.
z Design, construction and maintenance of engineering systems
involve decision making both at the managerial and the
technological level
z Goals of such decisions :
– to minimize the effort required or
– to maximize the desired benefit
D Nagesh Kumar, IISc Optimization Methods: M1L1
4
Introduction (contd.)
z Optimization : Defined as the process of finding the conditions
that give the minimum or maximum value of a function, where
the function represents the effort required or the desired
benefit.
D Nagesh Kumar, IISc Optimization Methods: M1L1
5
Historical Development
z Existence of optimization methods can be traced to the days
of Newton, Lagrange, and Cauchy.
z Development of differential calculus methods of optimization
was possible because of the contributions of Newton and
Leibnitz to calculus.
z Foundations of calculus of variations, dealing with the
minimizations of functions, were laid by Bernoulli, Euler,
Lagrange, and Weistrass
D Nagesh Kumar, IISc Optimization Methods: M1L1
6
Historical Development (contd.)
z The method of optimization for constrained problems, which
involve the inclusion of unknown multipliers, became known by
the name of its inventor, Lagrange.
z Cauchy made the first application of the steepest descent
method to solve unconstrained optimization problems.
D Nagesh Kumar, IISc Optimization Methods: M1L1
7
Recent History
z Highspeed digital computers made implementation of the
complex optimization procedures possible and stimulated
further research on newer methods.
z Massive literature on optimization techniques and emergence
of several well defined new areas in optimization theory
followed.
D Nagesh Kumar, IISc Optimization Methods: M1L1
8
Milestones
z Development of the simplex method by Dantzig in 1947 for
linear programming problems.
z The enunciation of the principle of optimality in 1957 by
Bellman for dynamic programming problems.
z Work by Kuhn and Tucker in 1951 on the necessary and
sufficient conditions for the optimal solution of problems laid the
foundation for later research in nonlinear programming.
D Nagesh Kumar, IISc Optimization Methods: M1L1
9
Milestones (contd.)
z The contributions of Zoutendijk and Rosen to nonlinear programming
during the early 1960s
z Work of Carroll and Fiacco and McCormick facilitated many difficult
problems to be solved by using the wellknown techniques of
unconstrained optimization.
z Geometric programming was developed in the 1960s by Duffin, Zener,
and Peterson.
z Gomory did pioneering work in integer programming. The most real
world applications fall under this category of problems.
z Dantzig and Charnes and Cooper developed stochastic programming
techniques.
D Nagesh Kumar, IISc Optimization Methods: M1L1
10
Milestones (contd.)
z The desire to optimize more than one objective or a goal while
satisfying the physical limitations led to the development of
multiobjective programming methods; Ex. Goal programming.
z The foundations of game theory were laid by von Neumann in
1928; applied to solve several mathematical, economic and
military problems, and more recently to engineering design
problems.
z Simulated annealing, evolutionary algorithms including genetic
algorithms, and neural network methods represent a new class
of mathematical programming techniques that have come into
prominence during the last decade.
D Nagesh Kumar, IISc Optimization Methods: M1L1
11
Engineering applications of
optimization.
z Design of structural units in construction, machinery, and in
space vehicles.
z Maximizing benefit/minimizing product costs in various
manufacturing and construction processes.
z Optimal path finding in road networks/freight handling
processes.
z Optimal production planning, controlling and scheduling.
z Optimal Allocation of resources or services among several
activities to maximize the benefit.
D Nagesh Kumar, IISc Optimization Methods: M1L1
12
Art of Modeling : Model Building
z Development of an optimization model can
be divided into five major phases.
– Collection of data
– Problem definition and formulation
– Model development
– Model validation and evaluation or performance
– Model application and interpretation of results
D Nagesh Kumar, IISc Optimization Methods: M1L1
13
Data collection
z Data collection
– may be time consuming but is the fundamental
basis of the modelbuilding process
– extremely important phase of the modelbuilding
process
– the availability and accuracy of data can have
considerable effect on the accuracy of the model
and on the ability to evaluate the model.
D Nagesh Kumar, IISc Optimization Methods: M1L1
14
Problem Definition
z Problem definition and formulation, steps involved:
– identification of the decision variables;
– formulation of the model objective(s);
– the formulation of the model constraints.
z In performing these steps one must consider the following.
– Identify the important elements that the problem consists of.
– Determine the number of independent variables, the number of
equations required to describe the system, and the number of
unknown parameters.
– Evaluate the structure and complexity of the model
– Select the degree of accuracy required of the model
D Nagesh Kumar, IISc Optimization Methods: M1L1
15
Model development
z Model development includes:
– the mathematical description,
– parameter estimation,
– input development, and
– software development
z The model development phase is an iterative
process that may require returning to the
model definition and formulation phase.
D Nagesh Kumar, IISc Optimization Methods: M1L1
16
Model Validation and Evaluation
z This phase is checking the model as a whole.
z Model validation consists of validation of the assumptions and
parameters of the model.
z The performance of the model is to be evaluated using standard
performance measures such as Root mean squared error and R
2
value.
z Sensitivity analysis to test the model inputs and parameters.
z This phase also is an iterative process and may require returning to
the model definition and formulation phase.
z One important aspect of this process is that in most cases data used in
the formulation process should be different from that used in
validation.
D Nagesh Kumar, IISc Optimization Methods: M1L1
17
Modeling Techniques
z Different modeling techniques are developed to meet the
requirement of different type of optimization problems. Major
categories of modeling approaches are:
– classical optimization techniques,
– linear programming,
– nonlinear programming,
– geometric programming,
– dynamic programming,
– integer programming,
– stochastic programming,
– evolutionary algorithms, etc.
z These approaches will be discussed in the subsequent
modules.
D Nagesh Kumar, IISc Optimization Methods: M1L1
18
Thank You
Optimization Methods: Introduction and Basic concepts 1
Module – 1 Lecture Notes – 2
Optimization Problem and Model Formulation
Introduction
In the previous lecture we studied the evolution of optimization methods and their
engineering applications. A brief introduction was also given to the art of modeling. In this
lecture we will study the Optimization problem, its various components and its formulation as
a mathematical programming problem.
Basic components of an optimization problem:
An objective function expresses the main aim of the model which is either to be minimized
or maximized. For example, in a manufacturing process, the aim may be to maximize the
profit or minimize the cost. In comparing the data prescribed by a userdefined model with the
observed data, the aim is minimizing the total deviation of the predictions based on the model
from the observed data. In designing a bridge pier, the goal is to maximize the strength and
minimize size.
A set of unknowns or variables control the value of the objective function. In the
manufacturing problem, the variables may include the amounts of different resources used or
the time spent on each activity. In fittingthedata problem, the unknowns are the parameters
of the model. In the pier design problem, the variables are the shape and dimensions of the
pier.
A set of constraints are those which allow the unknowns to take on certain values but
exclude others. In the manufacturing problem, one cannot spend negative amount of time on
any activity, so one constraint is that the "time" variables are to be nonnegative. In the pier
design problem, one would probably want to limit the breadth of the base and to constrain its
size.
The optimization problem is then to find values of the variables that minimize or maximize
the objective function while satisfying the constraints.
Objective Function
As already stated, the objective function is the mathematical function one wants to maximize
or minimize, subject to certain constraints. Many optimization problems have a single
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 2
objective function. (When they don't they can often be reformulated so that they do) The two
exceptions are:
• No objective function. In some cases (for example, design of integrated circuit
layouts), the goal is to find a set of variables that satisfies the constraints of the model.
The user does not particularly want to optimize anything and so there is no reason to
define an objective function. This type of problems is usually called a feasibility
problem.
• Multiple objective functions. In some cases, the user may like to optimize a number of
different objectives concurrently. For instance, in the optimal design of panel of a
door or window, it would be good to minimize weight and maximize strength
simultaneously. Usually, the different objectives are not compatible; the variables that
optimize one objective may be far from optimal for the others. In practice, problems
with multiple objectives are reformulated as singleobjective problems by either
forming a weighted combination of the different objectives or by treating some of the
objectives as constraints.
Statement of an optimization problem
An optimization or a mathematical programming problem can be stated as follows:
To find X = which minimizes f(X) (1.1)
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
n
x
x
x
.
.
2
1
Subject to the constraints
g
i
(X) 0 ≤ , i = 1, 2, …., m
l
j
(X) 0 = , j = 1, 2, …., p
where X is an ndimensional vector called the design vector, f(X) is called the objective
function, and g
i
(X) and l
j
(X) are known as inequality and equality constraints, respectively.
The number of variables n and the number of constraints m and/or p need not be related in
any way. This type problem is called a constrained optimization problem.
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 3
If the locus of all points satisfying f(X) = a constant c, is considered, it can form a family of
surfaces in the design space called the objective function surfaces. When drawn with the
constraint surfaces as shown in Fig 1 we can identify the optimum point (maxima). This is
possible graphically only when the number of design variables is two. When we have three or
more design variables because of complexity in the objective function surface, we have to
solve the problem as a mathematical problem and this visualization is not possible.
.
Optimum
point
f = C
3
f = C
2
f= C
4
f = C
5
C
1
> C
2
>
C
3
>C
4
…..> C
n
f = C
1
Fig 1
Optimization problems can be defined without any constraints as well.
To find X = which minimizes f(X) (1.2)
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
n
x
x
x
.
.
2
1
Such problems are called unconstrained optimization problems. The field of unconstrained
optimization is quite a large and prominent one, for which a lot of algorithms and software
are available.
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 4
Variables
These are essential. If there are no variables, we cannot define the objective function and the
problem constraints. In many practical problems, one cannot choose the design variable
arbitrarily. They have to satisfy certain specified functional and other requirements.
Constraints
Constraints are not essential. It's been argued that almost all problems really do have
constraints. For example, any variable denoting the "number of objects" in a system can only
be useful if it is less than the number of elementary particles in the known universe! In
practice though, answers that make good sense in terms of the underlying physical or
economic criteria can often be obtained without putting constraints on the variables.
Design constraints are restrictions that must be satisfied to produce an acceptable design.
Constraints can be broadly classified as:
1) Behavioral or Functional constraints: These represent limitations on the behavior
performance of the system.
2) Geometric or Side constraints: These represent physical limitations on design
variables such as availability, fabricability, and transportability.
For example, for the retaining wall design shown in the Fig 2, the base width W cannot be
taken smaller than a certain value due to stability requirements. The depth D below the
ground level depends on the soil pressure coefficients K
a
and K
p.
Since these constraints
depend on the performance of the retaining wall they are called behavioral constraints. The
number of anchors provided along a cross section N
i
cannot be any real number but has to be
a whole number. Similarly thickness of reinforcement used is controlled by supplies from the
manufacturer. Hence this is a side constraint.
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 5
D
N
i
no. of anchors
W
Fig. 2
Constraint Surfaces
Consider the optimization problem presented in eq. 1.1 with only the inequality constraint
g
i
(X) . The set of values of X that satisfy the equation g 0 ≤
i
(X) 0 ≤ forms a boundary surface
in the design space called a constraint surface. This will be a (n1) dimensional subspace
where n is the number of design variables. The constraint surface divides the design space
into two regions: one with g
i
(X) (feasible region) and the other in which g 0 <
i
(X) > 0
(infeasible region). The points lying on the hyper surface will satisfy g
i
(X) =0. The collection
of all the constraint surfaces g
i
(X) = 0, j= 1, 2, …, m, which separates the acceptable region is
called the composite constraint surface.
Fig 3 shows a hypothetical twodimensional design space where the feasible region is
denoted by hatched lines. The twodimensional design space is bounded by straight lines as
shown in the figure. This is the case when the constraints are linear. However, constraints
may be nonlinear as well and the design space will be bounded by curves in that case. A
design point that lies on more than one constraint surface is called a bound point, and the
associated constraint is called an active constraint. Free points are those that do not lie on any
constraint surface. The design points that lie in the acceptable or unacceptable regions can be
classified as following:
1. Free and acceptable point
2. Free and unacceptable point
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 6
3. Bound and acceptable point
4. Bound and unacceptable point.
Examples of each case are shown in Fig. 3.
Fig. 3
Bound
unacceptable
point.
Behavior
constraint
g
2 ≤
0
.
Infeasible
region
Feasible
region
Behavior
constraint
g
1
≤0
Side
constraint
g
3 ≥
0
Bound
acceptable point.
.
Free acceptable
point Free unacceptable
point
Formulation of design problems as mathematical programming problems
In mathematics, the term optimization, or mathematical programming, refers to the study
of problems in which one seeks to minimize or maximize a real function by systematically
choosing the values of real or integer variables from within an allowed set. This problem can
be represented in the following way
Given: a function f : A R from some set A to the real numbers
Sought: an element x
0
in A such that f(x
0
) ≤ f(x) for all x in A ("minimization") or such that
f(x
0
) ≥ f(x) for all x in A ("maximization").
Such a formulation is called an optimization problem or a mathematical programming
problem (a term not directly related to computer programming, but still in use for example,
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 7
in linear programming – (see module 3)). Many realworld and theoretical problems may be
modeled in this general framework.
Typically, A is some subset of the Euclidean space R
n
, often specified by a set of constraints,
equalities or inequalities that the members of A have to satisfy. The elements of A are called
candidate solutions or feasible solutions. The function f is called an objective function, or cost
function. A feasible solution that minimizes (or maximizes, if that is the goal) the objective
function is called an optimal solution. The domain A of f is called the search space.
Generally, when the feasible region or the objective function of the problem does not present
convexity (refer module 2), there may be several local minima and maxima, where a local
minimum x
*
is defined as a point for which there exists some δ > 0 so that for all x such that
;
and
that is to say, on some region around x
*
all the function values are greater than or equal to the
value at that point. Local maxima are defined similarly.
A large number of algorithms proposed for solving nonconvex problems – including the
majority of commercially available solvers – are not capable of making a distinction between
local optimal solutions and rigorous optimal solutions, and will treat the former as the actual
solutions to the original problem. The branch of applied mathematics and numerical analysis
that is concerned with the development of deterministic algorithms that are capable of
guaranteeing convergence in finite time to the actual optimal solution of a nonconvex
problem is called global optimization.
Problem formulation
Problem formulation is normally the most difficult part of the process. It is the selection of
design variables, constraints, objective function(s), and models of the discipline/design.
Selection of design variables
A design variable, that takes a numeric or binary value, is controllable from the point of view
of the designer. For instance, the thickness of a structural member can be considered a design
variable. Design variables can be continuous (such as the length of a cantilever beam),
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 8
discrete (such as the number of reinforcement bars used in a beam), or Boolean. Design
problems with continuous variables are normally solved more easily.
Design variables are often bounded, that is, they have maximum and minimum values.
Depending on the adopted method, these bounds can be treated as constraints or separately.
Selection of constraints
A constraint is a condition that must be satisfied to render the design to be feasible. An
example of a constraint in beam design is that the resistance offered by the beam at points of
loading must be equal to or greater than the weight of structural member and the load
supported. In addition to physical laws, constraints can reflect resource limitations, user
requirements, or bounds on the validity of the analysis models. Constraints can be used
explicitly by the solution algorithm or can be incorporated into the objective, by using
Lagrange multipliers.
Objectives
An objective is a numerical value that is to be maximized or minimized. For example, a
designer may wish to maximize profit or minimize weight. Many solution methods work only
with single objectives. When using these methods, the designer normally weights the various
objectives and sums them to form a single objective. Other methods allow multiobjective
optimization (module 8), such as the calculation of a Pareto front.
Models
The designer has to also choose models to relate the constraints and the objectives to the
design variables. These models are dependent on the discipline involved. They may be
empirical models, such as a regression analysis of aircraft prices, theoretical models, such as
from computational fluid dynamics, or reducedorder models of either of these. In choosing
the models the designer must tradeoff fidelity with the time required for analysis.
The multidisciplinary nature of most design problems complicates model choice and
implementation. Often several iterations are necessary between the disciplines’ analyses in
order to find the values of the objectives and constraints. As an example, the aerodynamic
loads on a bridge affect the structural deformation of the supporting structure. The structural
deformation in turn changes the shape of the bridge and hence the aerodynamic loads. Thus,
it can be considered as a cyclic mechanism. Therefore, in analyzing a bridge, the
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 9
aerodynamic and structural analyses must be run a number of times in turn until the loads and
deformation converge.
Representation in standard form
Once the design variables, constraints, objectives, and the relationships between them have
been chosen, the problem can be expressed as shown in equation 1.1
Maximization problems can be converted to minimization problems by multiplying the
objective by 1. Constraints can be reversed in a similar manner. Equality constraints can be
replaced by two inequality constraints.
Problem solution
The problem is normally solved choosing the appropriate techniques from those available in
the field of optimization. These include gradientbased algorithms, populationbased
algorithms, or others. Very simple problems can sometimes be expressed linearly; in that case
the techniques of linear programming are applicable.
Gradientbased methods
• Newton's method
• Steepest descent
• Conjugate gradient
• Sequential quadratic programming
Populationbased methods
• Genetic algorithms
• Particle swarm optimization
Other methods
• Random search
• Grid search
• Simulated annealing
Most of these techniques require large number of evaluations of the objectives and the
constraints. The disciplinary models are often very complex and can take significant amount
of time for a single evaluation. The solution can therefore be extremely timeconsuming.
D Nagesh Kumar, IISc, Bangalore
M1L2
Optimization Methods: Introduction and Basic concepts 10
Many of the optimization techniques are adaptable to parallel computing. Much of the current
research is focused on methods of decreasing the computation time.
The following steps summarize the general procedure used to formulate and solve
optimization problems. Some problems may not require that the engineer follow the steps in
the exact order, but each of the steps should be considered in the process.
1) Analyze the process itself to identify the process variables and specific characteristics
of interest, i.e., make a list of all the variables.
2) Determine the criterion for optimization and specify the objective function in terms of
the above variables together with coefficients.
3) Develop via mathematical expressions a valid process model that relates the input
output variables of the process and associated coefficients. Include both equality and
inequality constraints. Use well known physical principles such as mass balances,
energy balance, empirical relations, implicit concepts and external restrictions.
Identify the independent and dependent variables to get the number of degrees of
freedom.
4) If the problem formulation is too large in scope:
break it up into manageable parts, or
simplify the objective function and the model
5) Apply a suitable optimization technique for mathematical statement of the problem.
6) Examine the sensitivity of the result, to changes in the values of the parameters in the
problem and the assumptions.
D Nagesh Kumar, IISc, Bangalore
M1L2
D Nagesh Kumar, IISc Optimization Methods: M1L2
1
Introduction and Basic Concepts
(ii) Optimization
Problem and
Model Formulation
D Nagesh Kumar, IISc Optimization Methods: M1L2
2
Objectives
z To study the basic components of an optimization
problem.
z Formulation of design problems as mathematical
programming problems.
D Nagesh Kumar, IISc Optimization Methods: M1L2
3
Introduction  Preliminaries
z Basic components of an optimization problem :
– An objective function expresses the main aim of the
model which is either to be minimized or maximized.
– A set of unknowns or variables which control the value of
the objective function.
– A set of constraints that allow the unknowns to take on
certain values but exclude others.
D Nagesh Kumar, IISc Optimization Methods: M1L2
4
Introduction (contd.)
z The optimization problem is then to:
– find values of the variables that minimize or
maximize the objective function while
satisfying the constraints.
D Nagesh Kumar, IISc Optimization Methods: M1L2
5
Objective Function
z As already defined the objective function is the mathematical function one
wants to maximize or minimize, subject to certain constraints. Many
optimization problems have a single objective function (When they don't they
can often be reformulated so that they do). The two interesting exceptions
are:
– No objective function. The user does not particularly want to optimize anything so
there is no reason to define an objective function. Usually called a feasibility
problem.
– Multiple objective functions. In practice, problems with multiple objectives are
reformulated as singleobjective problems by either forming a weighted combination
of the different objectives or by treating some of the objectives by constraints.
D Nagesh Kumar, IISc Optimization Methods: M1L2
6
Statement of an optimization problem
To find X = which maximizes f(X)
Subject to the constraints
g
i
(X) <= 0 , i = 1, 2,….,m
l
j
(X) = 0 , j = 1, 2,….,p
⎟
⎟
⎟
⎟
⎟
⎟
⎠
⎞
⎜
⎜
⎜
⎜
⎜
⎜
⎝
⎛
n
x
x
x
.
.
2
1
D Nagesh Kumar, IISc Optimization Methods: M1L2
7
where
– X is an ndimensional vector called the design vector
– f(X) is called the objective function, and
– g
i
(X) and l
j
(X) are known as inequality and equality constraints,
respectively.
z This type of problem is called a constrained optimization problem.
z Optimization problems can be defined without any constraints as
well. Such problems are called unconstrained optimization
problems.
Statement of an optimization problem
D Nagesh Kumar, IISc Optimization Methods: M1L2
8
Objective Function Surface
z If the locus of all points satisfying f(X) = a constant c is
considered, it can form a family of surfaces in the design space
called the objective function surfaces.
z When drawn with the constraint surfaces as shown in the figure
we can identify the optimum point (maxima).
z This is possible graphically only when the number of design
variable is two.
z When we have three or more design variables because of
complexity in the objective function surface we have to solve
the problem as a mathematical problem and this visualization is
not possible.
D Nagesh Kumar, IISc Optimization Methods: M1L2
9
Objective function surfaces to find the
optimum point (maxima)
D Nagesh Kumar, IISc Optimization Methods: M1L2
10
Variables and Constraints
z Variables
– These are essential. If there are no variables, we cannot define the
objective function and the problem constraints.
z Constraints
– Even though Constraints are not essential, it has been argued that
almost all problems really do have constraints.
– In many practical problems, one cannot choose the design
variable arbitrarily. Design constraints are restrictions that must be
satisfied to produce an acceptable design.
D Nagesh Kumar, IISc Optimization Methods: M1L2
11
Constraints (contd.)
z Constraints can be broadly classified as :
– Behavioral or Functional constraints : These represent limitations
on the behavior and performance of the system.
– Geometric or Side constraints : These represent physical
limitations on design variables such as availability, fabricability,
and transportability.
D Nagesh Kumar, IISc Optimization Methods: M1L2
12
Constraint Surfaces
z Consider the optimization problem presented earlier with only
inequality constraints g
i
(X) . The set of values of X that satisfy
the equation g
i
(X) forms a boundary surface in the design
space called a constraint surface.
z The constraint surface divides the design space into two
regions: one with g
i
(X) < 0 (feasible region) and the other in
which g
i
(X) > 0 (infeasible region). The points lying on the hyper
surface will satisfy g
i
(X) =0.
The figure shows a hypothetical twodimensional
design space where the feasible region is denoted
by hatched lines.
Behavior
constraint
g
2
≤ 0
.
Infeasible
region
Feasible region
Behavior
constraint
g
1
≤ 0
Side
constraint
g
3
≥ 0
Bound
unacceptable point.
Bound
acceptable point.
.
Free acceptable point
Free unacceptable point
D Nagesh Kumar, IISc Optimization Methods: M1L2
14
Formulation of design problems as
mathematical programming problems
z The following steps summarize the procedure used to
formulate and solve mathematical programming
problems.
1. Analyze the process to identify the process variables and specific
characteristics of interest i.e. make a list of all variables.
2. Determine the criterion for optimization and specify the objective
function in terms of the above variables together with
coefficients.
3. Develop via mathematical expressions a valid process
model that relates the inputoutput variables of the
process and associated coefficients.
a) Include both equality and inequality constraints
b) Use well known physical principles
c) Identify the independent and dependent variables to get the
number of degrees of freedom
4. If the problem formulation is too large in scope:
a) break it up into manageable parts/ or
b) simplify the objective function and the model
5. Apply a suitable optimization technique for
mathematical statement of the problem.
6. Examine the sensitivity of the result to changes in the
coefficients in the problem and the assumptions.
D Nagesh Kumar, IISc Optimization Methods: M1L2
16
Thank You
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
1
M1L3
Module – 1 Lecture Notes – 3
Classification of Optimization Problems
Introduction
In the previous lecture we studied the basics of an optimization problem and its formulation
as a mathematical programming problem. In this lecture we look at the various criteria for
classification of optimization problems.
Optimization problems can be classified based on the type of constraints, nature of design
variables, physical structure of the problem, nature of the equations involved, deterministic
nature of the variables, permissible value of the design variables, separability of the functions
and number of objective functions. These classifications are briefly discussed below.
Classification based on existence of constraints.
Under this category optimizations problems can be classified into two groups as follows:
Constrained optimization problems: which are subject to one or more constraints.
Unconstrained optimization problems: in which no constraints exist.
Classification based on the nature of the design variables.
There are two broad categories in this classification.
(i) In the first category the objective is to find a set of design parameters that makes a
prescribed function of these parameters minimum or maximum subject to certain constraints.
For example to find the minimum weight design of a strip footing with two loads shown in
Fig 1 (a) subject to a limitation on the maximum settlement of the structure can be stated as
follows.
Find X =
)
`
¹
¹
´
¦
d
b
which minimizes
f(X) = h(b,d)
Subject to the constraints (
s
o X )
max
o s ; b > 0 ; d > 0
where
s
o is the settlement of the footing. Such problems are called parameter or static
optimization problems.
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
2
M1L3
It may be noted that, for this particular example, the length of the footing (l), the loads P
1
and
P
2
and the distance between the loads are assumed to be constant and the required
optimization is achieved by varying b and d.
(ii) In the second category of problems, the objective is to find a set of design parameters,
which are all continuous functions of some other parameter that minimizes an objective
function subject to a set of constraints. If the cross sectional dimensions of the rectangular
footings are allowed to vary along its length as shown in Fig 3.1 (b), the optimization
problem can be stated as :
Find X(t) =
)
`
¹
¹
´
¦
) (
) (
t d
t b
which minimizes
f(X) = g( b(t), d(t) )
Subject to the constraints
(
s
o X(t) )
max
o s 0 s t s l
b(t) > 0 0 s t s l
d(t) > 0 0 s t s l
The length of the footing (l) the loads P
1
and P
2
, the distance between the loads are assumed
to be constant and the required optimization is achieved by varying b and d along the length l.
Here the design variables are functions of the length parameter t. this type of problem, where
each design variable is a function of one or more parameters, is known as trajectory or
dynamic optimization problem.
(a) (b)
Figure 1
l
l
P
1
P
2
d
b
P
2
P
1
b(t)
d(t)
t
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
3
M1L3
Classification based on the physical structure of the problem
Based on the physical structure, optimization problems are classified as optimal control and
nonoptimal control problems.
(i) Optimal control problems
An optimal control (OC) problem is a mathematical programming problem involving a
number of stages, where each stage evolves from the preceding stage in a prescribed manner.
It is defined by two types of variables: the control or design and state variables. The control
variables define the system and controls how one stage evolves into the next. The state
variables describe the behavior or status of the system at any stage. The problem is to find a
set of control variables such that the total objective function (also known as the performance
index, PI) over all stages is minimized, subject to a set of constraints on the control and state
variables. An OC problem can be stated as follows:
Find X which minimizes f(X) = ) , (
1
i i
l
i
i
y x f
¿
=
Subject to the constraints
1
) , (
+
= +
i i i i i
y y y x q i = 1, 2, …., l
0 ) ( s
j j
x g , j = 1, 2, …., l
0 ) ( s
k k
y h , k = 1, 2, …., l
Where x
i
is the ith control variable, y
i
is the ith state variable, and f
i
is the contribution of the
ith stage to the total objective function. g
j
, h
k
, and q
i
are the functions of x
j,
y
j ;
x
k,
y
k
and x
i
and
y
i
, respectively, and l is the total number of states. The control and state variables x
i
and y
i
can be vectors in some cases.
(ii) Problems which are not optimal control problems are called nonoptimal control
problems.
Classification based on the nature of the equations involved
Based on the nature of equations for the objective function and the constraints, optimization
problems can be classified as linear, nonlinear, geometric and quadratic programming
problems. The classification is very useful from a computational point of view since many
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
4
M1L3
predefined special methods are available for effective solution of a particular type of
problem.
(i) Linear programming problem
If the objective function and all the constraints are ‘linear’ functions of the design variables,
the optimization problem is called a linear programming problem (LPP). A linear
programming problem is often stated in the standard form :
Find X =
¦
¦
¦
)
¦
¦
¦
`
¹
¦
¦
¦
¹
¦
¦
¦
´
¦
n
x
x
x
.
.
2
1
Which maximizes f(X) =
i
n
i
i
x c
¿
=1
Subject to the constraints
j i
n
i
ij
b x a =
¿
=1
, j = 1, 2, . . . , m
x
i
0 > ,
j = 1, 2, . . . , m
where c
i
, a
ij
, and b
j
are constants.
(ii) Nonlinear programming problem
If any of the functions among the objectives and constraint functions is nonlinear, the
problem is called a nonlinear programming (NLP) problem. This is the most general form of
a programming problem and all other problems can be considered as special cases of the NLP
problem.
(iii) Geometric programming problem
A geometric programming (GMP) problem is one in which the objective function and
constraints are expressed as polynomials in X. A function h(X) is called a polynomial (with
m terms) if h can be expressed as
nm
a
n
m
a
m
a
m
n
a
n
a a
n
a
n
a a
x x x c x x x c x x x c X h
2
2
1
1
2 22
2
12
1 2
1 21
2
11
1 1
) ( + + + =
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
5
M1L3
where c
j
( m j , , 1 = ) and a
ij
( n i , , 1 = and m j , , 1 = ) are constants with 0 >
j
c and
0 >
i
x .
Thus GMP problems can be posed as follows:
Find X which minimizes
f(X) = ,
0
1 1
¿
= =


.

\

N
j
n
i
ij
a
i j
x c
c
j
> 0, x
i
> 0
subject to
g
k
(X) = , 0
1 1
¿
= =
>


.

\

k
N
j
n
i
ijk
q
i jk
x a
a
jk
> 0, x
i
> 0, k = 1,2,…..,m
where N
0
and N
k
denote the number of terms in the objective function and in the k
th
constraint
function, respectively.
(iv) Quadratic programming problem
A quadratic programming problem is the best behaved nonlinear programming problem with
a quadratic objective function and linear constraints and is concave (for maximization
problems). It can be solved by suitably modifying the linear programming techniques. It is
usually formulated as follows:
F(X) =
¿¿ ¿
= = =
+ +
n
i
n
j
j i ij
n
i
i i
x x Q x q c
1 1 1
Subject to
,
1
j
n
i
i ij
b x a =
¿
=
j = 1,2,….,m
x
i
0 > , i = 1,2,….,n
where c, q
i
, Q
ij
, a
ij
, and b
j
are constants.
Classification based on the permissible values of the decision variables
Under this classification, objective functions can be classified as integer and realvalued
programming problems.
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
6
M1L3
(i) Integer programming problem
If some or all of the design variables of an optimization problem are restricted to take only
integer (or discrete) values, the problem is called an integer programming problem. For
example, the optimization is to find number of articles needed for an operation with least
effort. Thus, minimization of the effort required for the operation being the objective, the
decision variables, i.e. the number of articles used can take only integer values. Other
restrictions on minimum and maximum number of usable resources may be imposed.
(ii) Realvalued programming problem
A realvalued problem is that in which it is sought to minimize or maximize a real function
by systematically choosing the values of real variables from within an allowed set. When the
allowed set contains only real values, it is called a realvalued programming problem.
Classification based on deterministic nature of the variables
Under this classification, optimization problems can be classified as deterministic or
stochastic programming problems.
(i) Stochastic programming problem
In this type of an optimization problem, some or all the design variables are expressed
probabilistically (nondeterministic or stochastic). For example estimates of life span of
structures which have probabilistic inputs of the concrete strength and load capacity is a
stochastic programming problem as one can only estimate stochastically the life span of the
structure.
(ii) Deterministic programming problem
In this type of problems all the design variables are deterministic.
Classification based on separability of the functions
Based on this classification, optimization problems can be classified as separable and non
separable programming problems based on the separability of the objective and constraint
functions.
(i) Separable programming problems
In this type of a problem the objective function and the constraints are separable. A function
is said to be separable if it can be expressed as the sum of n singlevariable functions,
( ) ( ) ( )
n n i
x f x f x f ,... ,
2 2 1
, i.e.
Optimization Methods: Introduction and Basic Concepts
D Nagesh Kumar, IISc, Bangalore
7
M1L3
( )
¿
=
=
n
i
i i
x f X f
1
) (
and separable programming problem can be expressed in standard form as :
Find X which minimizes ( )
¿
=
=
n
i
i i
x f X f
1
) (
subject to
( )
j
n
i
i ij j
b x g X g s =
¿
=1
) ( , j = 1,2,. . . , m
where b
j
is a constant.
Classification based on the number of objective functions
Under this classification, objective functions can be classified as singleobjective and multi
objective programming problems.
(i) Singleobjective programming problem in which there is only a single objective function.
(ii) Multiobjective programming problem
A multiobjective programming problem can be stated as follows:
Find X which minimizes ( ) ( ) ( ) X f X f X f
k
,... ,
2 1
Subject to
g
j
(X) 0 s , j = 1, 2, . . . , m
where f
1
, f
2
, . . . f
k
denote the objective functions to be minimized simultaneously.
For example in some design problems one might have to minimize the cost and weight of the
structural member for economy and, at the same time, maximize the load carrying capacity
under the given constraints.
D Nagesh Kumar, IISc Optimization Methods: M1L3
1
Introduction and Basic Concepts
(iii) Classification
of Optimization
Problems
D Nagesh Kumar, IISc Optimization Methods: M1L3
2
Introduction
z Optimization problems can be classified based on
the type of constraints, nature of design variables,
physical structure of the problem, nature of the
equations involved, deterministic nature of the
variables, permissible value of the design variables,
separability of the functions and number of objective
functions. These classifications are briefly
discussed in this lecture.
D Nagesh Kumar, IISc Optimization Methods: M1L3
3
Classification based on existence of constraints.
z Constrained optimization problems: which are
subject to one or more constraints.
z Unconstrained optimization problems: in which
no constraints exist.
D Nagesh Kumar, IISc Optimization Methods: M1L3
4
Classification based on the nature of the design
variables
z There are two broad categories of classification
within this classification
z First category : the objective is to find a set of design
parameters that make a prescribed function of these
parameters minimum or maximum subject to certain
constraints.
– For example to find the minimum weight design of a strip
footing with two loads shown in the figure, subject to a
limitation on the maximum settlement of the structure.
The problem can be defined as follows
subject to the constraints
The length of the footing (l) the loads P1 and P2 , the distance between the loads are
assumed to be constant and the required optimization is achieved by varying b and d.
Such problems are called parameter or static optimization problems.
D Nagesh Kumar, IISc Optimization Methods: M1L3
6
Classification based on the nature of the design
variables (contd.)
z Second category: the objective is to find a set of
design parameters, which are all continuous
functions of some other parameter, that minimizes
an objective function subject to a set of constraints.
– For example, if the cross sectional dimensions of the
rectangular footing is allowed to vary along its length as
shown in the following figure.
The problem can be defined as follows
subject to the constraints
l
The length of the footing (l) the loads P
1
and P
2
, the distance between the loads are
assumed to be constant and the required optimization is achieved by varying b and d.
Such problems are called trajectory or dynamic optimization problems.
D Nagesh Kumar, IISc Optimization Methods: M1L3
8
Classification based on the physical structure of the
problem
z Based on the physical structure, we can classify
optimization problems are classified as optimal control and
nonoptimal control problems.
(i) An optimal control (OC) problem is a mathematical
programming problem involving a number of stages, where
each stage evolves from the preceding stage in a
prescribed manner.
z It is defined by two types of variables: the control or design
variables and state variables.
z The problem is to find a set of control or design variables such that the
total objective function (also known as the performance index, PI) over
all stages is minimized subject to a set of constraints on the control and
state variables. An OC problem can be stated as follows:
z Where x
i
is the i
th
control variable, y
i
is the i
th
state variable, and f
i
is the
contribution of the i
th
stage to the total objective function. g
j
, h
k
, and q
i
are the functions of xj, yj ; x
k,
y
k
and x
i
and y
i
, respectively, and l is the
total number of states. The control and state variables x
i
and y
i
can be
vectors in some cases.
(ii) The problems which are not optimal control problems are
called nonoptimal control problems.
subject to the constraints:
D Nagesh Kumar, IISc Optimization Methods: M1L3
10
Classification based on the nature of the equations
involved
z Based on the nature of expressions for the objective
function and the constraints, optimization problems can
be classified as linear, nonlinear, geometric and
quadratic programming problems.
D Nagesh Kumar, IISc Optimization Methods: M1L3
11
Classification based on the nature of the equations
involved (contd.)
(i) Linear programming problem
z If the objective function and all the constraints are linear functions of
the design variables, the mathematical programming problem is called
a linear programming (LP) problem.
often stated in the standard form :
subject to
D Nagesh Kumar, IISc Optimization Methods: M1L3
12
Classification based on the nature of the
equations involved (contd.)
(ii) Nonlinear programming problem
z If any of the functions among the objectives and constraint
functions is nonlinear, the problem is called a nonlinear
programming (NLP) problem this is the most general form of a
programming problem.
D Nagesh Kumar, IISc Optimization Methods: M1L3
13
Classification based on the nature of the equations
involved (contd.)
(iii) Geometric programming problem
– A geometric programming (GMP) problem is one in which the
objective function and constraints are expressed as polynomials in X.
A polynomial with N terms can be expressed as
– Thus GMP problems can be expressed as follows: Find X which
minimizes :
subject to:
D Nagesh Kumar, IISc Optimization Methods: M1L3
14
Classification based on the nature of the equations
involved (contd.)
z where N
0
and N
k
denote the number of terms in the objective and k
th
constraint function, respectively.
(iv) Quadratic programming problem
z A quadratic programming problem is the best behaved nonlinear
programming problem with a quadratic objective function and linear
constraints and is concave (for maximization problems). It is usually
formulated as follows:
Subject to:
where c, q
i
, Q
ij
, a
ij
, and b
j
are constants.
D Nagesh Kumar, IISc Optimization Methods: M1L3
15
Classification based on the permissible values of
the decision variables
z Under this classification problems can be classified as
integer and realvalued programming problems
(i) Integer programming problem
z If some or all of the design variables of an optimization problem are
restricted to take only integer (or discrete) values, the problem is
called an integer programming problem.
(ii) Realvalued programming problem
z A realvalued problem is that in which it is sought to minimize or
maximize a real function by systematically choosing the values of real
variables from within an allowed set. When the allowed set contains
only real values, it is called a realvalued programming problem.
D Nagesh Kumar, IISc Optimization Methods: M1L3
16
Classification based on deterministic nature of the
variables
z Under this classification, optimization problems
can be classified as deterministic and stochastic
programming problems
(i) Deterministic programming problem
• In this type of problems all the design variables are
deterministic.
(ii) Stochastic programming problem
z In this type of an optimization problem some or all the
parameters (design variables and/or preassigned parameters)
are probabilistic (non deterministic or stochastic). For example
estimates of life span of structures which have probabilistic
inputs of the concrete strength and load capacity. A
deterministic value of the lifespan is nonattainable.
D Nagesh Kumar, IISc Optimization Methods: M1L3
17
Classification based on separability of the functions
z Based on the separability of the objective and constraint
functions optimization problems can be classified as
separable and nonseparable programming problems
(i) Separable programming problems
z In this type of a problem the objective function and the constraints are
separable. A function is said to be separable if it can be expressed as
the sum of n singlevariable functions and separable programming
problem can be expressed in standard form as :
subject to :
where b
j
is a constant.
D Nagesh Kumar, IISc Optimization Methods: M1L3
18
Classification based on the number of objective
functions
z Under this classification objective functions can be
classified as single and multiobjective programming
problems.
(i) Singleobjective programming problemin which there is only a
single objective.
(ii) Multiobjective programming problem
z A multiobjective programming problem can be stated as follows:
z where f
1
, f
2
, . . . f
k
denote the objective functions to be minimized
simultaneously.
subject to :
D Nagesh Kumar, IISc Optimization Methods: M1L3
19
Thank You
Optimization Methods: Introduction and Basic Concepts 1
Module – 1 Lecture Notes – 4
Classical and Advanced Techniques for Optimization
In the previous lecture having understood the various classifications of optimization
problems, let us move on to understand the classical and advanced optimization techniques.
Classical Optimization Techniques
The classical optimization techniques are useful in finding the optimum solution or
unconstrained maxima or minima of continuous and differentiable functions. These are
analytical methods and make use of differential calculus in locating the optimum solution.
The classical methods have limited scope in practical applications as some of them involve
objective functions which are not continuous and/or differentiable. Yet, the study of these
classical techniques of optimization form a basis for developing most of the numerical
techniques that have evolved into advanced techniques more suitable to today’s practical
problems. These methods assume that the function is differentiable twice with respect to the
design variables and that the derivatives are continuous. Three main types of problems can be
handled by the classical optimization techniques, viz., single variable functions, multivariable
functions with no constraints and multivariable functions with both equality and inequality
constraints. For problems with equality constraints the Lagrange multiplier method can be
used. If the problem has inequality constraints, the KuhnTucker conditions can be used to
identify the optimum solution. These methods lead to a set of nonlinear simultaneous
equations that may be difficult to solve. These classical methods of optimization are further
discussed in Module 2.
The other methods of optimization include
• Linear programming: studies the case in which the objective function f is linear and
the set A is specified using only linear equalities and inequalities. (A is the design
variable space)
• Integer programming: studies linear programs in which some or all variables are
constrained to take on integer values.
• Quadratic programming: allows the objective function to have quadratic terms,
while the set A must be specified with linear equalities and inequalities.
D Nagesh Kumar, IISc, Bangalore
M1L4
Optimization Methods: Introduction and Basic Concepts 2
• Nonlinear programming: studies the general case in which the objective function or
the constraints or both contain nonlinear parts.
• Stochastic programming: studies the case in which some of the constraints depend
on random variables.
• Dynamic programming: studies the case in which the optimization strategy is based
on splitting the problem into smaller subproblems.
• Combinatorial optimization: is concerned with problems where the set of feasible
solutions is discrete or can be reduced to a discrete one.
• Infinitedimensional optimization: studies the case when the set of feasible solutions
is a subset of an infinitedimensional space, such as a space of functions.
• Constraint satisfaction: studies the case in which the objective function f is constant
(this is used in artificial intelligence, particularly in automated reasoning).
Most of these techniques will be discussed in subsequent modules.
Advanced Optimization Techniques
• Hill climbing
Hill climbing is a graph search algorithm where the current path is extended with a
successor node which is closer to the solution than the end of the current path.
In simple hill climbing, the first closer node is chosen whereas in steepest ascent hill
climbing all successors are compared and the closest to the solution is chosen. Both
forms fail if there is no closer node. This may happen if there are local maxima in the
search space which are not solutions. Steepest ascent hill climbing is similar to best
first search but the latter tries all possible extensions of the current path in order,
whereas steepest ascent only tries one.
Hill climbing is used widely in artificial intelligence fields, for reaching a goal state
from a starting node. Choice of next node starting node can be varied to give a
number of related algorithms.
D Nagesh Kumar, IISc, Bangalore
M1L4
Optimization Methods: Introduction and Basic Concepts 3
• Simulated annealing
The name and inspiration come from annealing process in metallurgy, a technique
involving heating and controlled cooling of a material to increase the size of its
crystals and reduce their defects. The heat causes the atoms to become unstuck from
their initial positions (a local minimum of the internal energy) and wander randomly
through states of higher energy; the slow cooling gives them more chances of finding
configurations with lower internal energy than the initial one.
In the simulated annealing method, each point of the search space is compared to a
state of some physical system, and the function to be minimized is interpreted as the
internal energy of the system in that state. Therefore the goal is to bring the system,
from an arbitrary initial state, to a state with the minimum possible energy.
• Genetic algorithms
A genetic algorithm (GA) is a search technique used in computer science to find
approximate solutions to optimization and search problems. Specifically it falls into
the category of local search techniques and is therefore generally an incomplete
search. Genetic algorithms are a particular class of evolutionary algorithms that use
techniques inspired by evolutionary biology such as inheritance, mutation, selection,
and crossover (also called recombination).
Genetic algorithms are typically implemented as a computer simulation. in which a
population of abstract representations (called chromosomes) of candidate solutions
(called individuals) to an optimization problem, evolves toward better solutions.
Traditionally, solutions are represented in binary as strings of 0s and 1s, but different
encodings are also possible. The evolution starts from a population of completely
random individuals and occur in generations. In each generation, the fitness of the
whole population is evaluated, multiple individuals are stochastically selected from
the current population (based on their fitness), and modified (mutated or recombined)
to form a new population. The new population is then used in the next iteration of the
algorithm.
D Nagesh Kumar, IISc, Bangalore
M1L4
Optimization Methods: Introduction and Basic Concepts 4
• Ant colony optimization
In the real world, ants (initially) wander randomly, and upon finding food return to
their colony while laying down pheromone trails. If other ants find such a path, they
are likely not to keep traveling at random, but instead follow the trail laid by earlier
ants, returning and reinforcing it, if they eventually find any food.
Over time, however, the pheromone trail starts to evaporate, thus reducing its
attractive strength. The more time it takes for an ant to travel down the path and back
again, the more time the pheromones have to evaporate. A short path, by comparison,
gets marched over faster, and thus the pheromone density remains high as it is laid on
the path as fast as it can evaporate. Pheromone evaporation has also the advantage of
avoiding the convergence to a local optimal solution. If there was no evaporation at
all, the paths chosen by the first ants would tend to be excessively attractive to the
following ones. In that case, the exploration of the solution space would be
constrained.
Thus, when one ant finds a good (short) path from the colony to a food source, other
ants are more likely to follow that path, and such positive feedback eventually leaves
all the ants following a single path. The idea of the ant colony algorithm is to mimic
this behavior with "simulated ants" walking around the search space representing the
problem to be solved.
Ant colony optimization algorithms have been used to produce nearoptimal solutions
to the traveling salesman problem. They have an advantage over simulated annealing
and genetic algorithm approaches when the graph may change dynamically. The ant
colony algorithm can be run continuously and can adapt to changes in real time. This
is of interest in network routing and urban transportation systems.
D Nagesh Kumar, IISc, Bangalore
M1L4
Optimization Methods: Introduction and Basic Concepts 5
References / Further Reading:
1. Deb K., MultiObjective Optimization using Evolutionary Algorithms, First Edition, John
Wiley & Sons Pte Ltd, 2002.
2. Deb K., Optimization for Engineering Design – Algorithms and Examples, Prentice Hall
of India Pvt. Ltd., New Delhi, 1995.
3. Dorigo M., and T. Stutzle, Ant Colony Optimization, Prentice Hall of India Pvt. Ltd., New
Delhi, 2005.
4. Hillier F.S. and G.J. Lieberman, Operations Research, CBS Publishers & Distributors,
New Delhi, 1987.
5. Jain S.K. and V.P. Singh, Water Resources Systems Planning and Management, Elsevier
B.V., The Netherlands, 2003.
6. Loucks, D.P., J.R. Stedinger, and D.A. Haith, Water Resources Systems Planning and
Analysis, Prentice – Hall, N.J., 1981.
7. Mays, L.W. and K. Tung, Hydrosystems Engineering and Management, McGrawHill
Inc., New York, 1992.
8. Rao S.S., Engineering Optimization – Theory and Practice, Third Edition, New Age
International Limited, New Delhi, 2000
9. Ravindran A., D.T. Phillips and J.J. Solberg, Operations Research – Principles and
Practice, John Wiley & Sons, New York, 2001.
10. Taha H.A., Operations Research – An Introduction, PrenticeHall of India Pvt. Ltd., New
Delhi, 2005.
11. Vedula S., and P.P. Mujumdar, Water Resources Systems: Modelling Techniques and
Analysis, Tata McGraw Hill, New Delhi, 2005.
D Nagesh Kumar, IISc, Bangalore
M1L4
D Nagesh Kumar, IISc Optimization Methods: M1L4
1
Introduction and Basic Concepts
Classical and
Advanced Techniques
for Optimization
D Nagesh Kumar, IISc Optimization Methods: M1L4
2
Classical Optimization Techniques
z The classical optimization techniques are useful in finding the optimum
solution or unconstrained maxima or minima of continuous and differentiable
functions.
z These are analytical methods and make use of differential calculus in locating
the optimum solution.
z The classical methods have limited scope in practical applications as some of
them involve objective functions which are not continuous and/or
differentiable.
z Yet, the study of these classical techniques of optimization form a basis for
developing most of the numerical techniques that have evolved into advanced
techniques more suitable to today’s practical problems
D Nagesh Kumar, IISc Optimization Methods: M1L4
3
Classical Optimization Techniques
(contd.)
z These methods assume that the function is differentiable twice with respect to the
design variables and the derivatives are continuous.
z Three main types of problems can be handled by the classical optimization
techniques:
– single variable functions
– multivariable functions with no constraints,
– multivariable functions with both equality and inequality constraints. In problems with
equality constraints the Lagrange multiplier method can be used. If the problem has
inequality constraints, the KuhnTucker conditions can be used to identify the optimum
solution.
z These methods lead to a set of nonlinear simultaneous equations that may be
difficult to solve. These methods of optimization are discussed in Module 2.
D Nagesh Kumar, IISc Optimization Methods: M1L4
4
Numerical Methods of Optimization
z Linear programming: studies the case in which the objective function
f is linear and the set A is specified using only linear equalities and
inequalities. (A is the design variable space)
z Integer programming: studies linear programs in which some or all
variables are constrained to take on integer values.
z Quadratic programming: allows the objective function to have
quadratic terms, while the set A must be specified with linear equalities
and inequalities
z Nonlinear programming: studies the general case in which the
objective function or the constraints or both contain nonlinear parts.
D Nagesh Kumar, IISc Optimization Methods: M1L4
5
Numerical Methods of Optimization
(contd.)
• Stochastic programming: studies the case in which some of the
constraints depend on random variables.
• Dynamic programming: studies the case in which the optimization
strategy is based on splitting the problem into smaller subproblems.
• Combinatorial optimization: is concerned with problems where the
set of feasible solutions is discrete or can be reduced to a discrete
one.
• Infinitedimensional optimization: studies the case when the set of
feasible solutions is a subset of an infinitedimensional space, such as
a space of functions.
• Constraint satisfaction: studies the case in which the objective
function f is constant (this is used in artificial intelligence, particularly in
automated reasoning).
D Nagesh Kumar, IISc Optimization Methods: M1L4
6
Advanced Optimization Techniques
z Hill climbing: it is a graph search algorithm where the current path is
extended with a successor node which is closer to the solution than
the end of the current path.
z In simple hill climbing, the first closer node is chosen whereas in
steepest ascent hill climbing all successors are compared and the
closest to the solution is chosen. Both forms fail if there is no closer
node. This may happen if there are local maxima in the search space
which are not solutions.
z Hill climbing is used widely in artificial intelligence fields, for reaching a
goal state from a starting node. Choice of next node/ starting node can
be varied to give a number of related algorithms.
D Nagesh Kumar, IISc Optimization Methods: M1L4
7
Simulated annealing
z The name and inspiration come from annealing process in
metallurgy, a technique involving heating and controlled cooling of a
material to increase the size of its crystals and reduce their defects.
– The heat causes the atoms to become unstuck from their initial positions
(a local minimum of the internal energy) and wander randomly through
states of higher energy;
– the slow cooling gives them more chances of finding configurations with
lower internal energy than the initial one.
z In the simulated annealing method, each point of the search space
is compared to a state of some physical system, and the function to
be minimized is interpreted as the internal energy of the system in
that state. Therefore the goal is to bring the system, from an arbitrary
initial state, to a state with the minimum possible energy.
D Nagesh Kumar, IISc Optimization Methods: M1L4
8
Genetic algorithms
z A genetic algorithm (GA) is a local search technique used to
find approximate solutions to optimization and search problems.
z Genetic algorithms are a particular class of evolutionary
algorithms that use techniques inspired by evolutionary biology
such as inheritance, mutation, selection, and crossover (also
called recombination).
D Nagesh Kumar, IISc Optimization Methods: M1L4
9
Genetic algorithms (contd.)
z Genetic algorithms are typically implemented as a computer
simulation, in which a population of abstract representations (called
chromosomes) of candidate solutions (called individuals) to an
optimization problem, evolves toward better solutions.
z The evolution starts from a population of completely random
individuals and occurs in generations.
z In each generation, the fitness of the whole population is evaluated,
multiple individuals are stochastically selected from the current
population (based on their fitness), and modified (mutated or
recombined) to form a new population.
z The new population is then used in the next iteration of the algorithm.
D Nagesh Kumar, IISc Optimization Methods: M1L4
10
Ant colony optimization
z In the real world, ants (initially) wander randomly, and upon finding food return
to their colony while laying down pheromone trails. If other ants find such a
path, they are likely not to keep traveling at random, but instead follow the trail
laid by earlier ants, returning and reinforcing it if they eventually find food
z Over time, however, the pheromone trail starts to evaporate, thus reducing its
attractive strength. The more time it takes for an ant to travel down the path
and back again, the more time the pheromones have to evaporate.
z A short path, by comparison, gets marched over faster, and thus the
pheromone density remains high
z Pheromone evaporation has also the advantage of avoiding the convergence to
a locally optimal solution. If there were no evaporation at all, the paths chosen
by the first ants would tend to be excessively attractive to the following ones. In
that case, the exploration of the solution space would be constrained.
D Nagesh Kumar, IISc Optimization Methods: M1L4
11
Ant colony optimization (contd.)
z Thus, when one ant finds a good (short) path from the colony to a food source,
other ants are more likely to follow that path, and such positive feedback
eventually leaves all the ants following a single path.
z The idea of the ant colony algorithm is to mimic this behavior with "simulated
ants" walking around the search space representing the problem to be solved.
z Ant colony optimization algorithms have been used to produce nearoptimal
solutions to the traveling salesman problem.
z They have an advantage over simulated annealing and genetic algorithm
approaches when the graph may change dynamically. The ant colony algorithm
can be run continuously and can adapt to changes in real time.
z This is of interest in network routing and urban transportation systems.
D Nagesh Kumar, IISc Optimization Methods: M1L4
12
Thank You
Optimization Methods: Optimization using Calculus  Learning Objectives
Module 2: Optimization using Calculus
Learning Objectives
Optimization problems with continuous differentiable functions can be solved using the
classical methods of optimization. These analytical methods employ differential calculus to
locate the optimum points. The classical optimization techniques fail to have an application
where the functions are not continuous and not differentiable, and this happens with many
practical problems. However a study of these calculus based methods is a foundation for
development of most of the numerical techniques presented in later modules.
In this module a brief introduction to stationary points is followed by a presentation of the
necessary and sufficient conditions in locating the optimum solution of a single variable and
two variable functions. Convexity and concavity of these functions are explained. Then the
reader is introduced to the optimization of functions or single and multivariable functions
(with and without equality constraints). A few examples are discussed for each type. An
insight is also given to the Lagrangian function and Hessian matrix formulation. Finally we
take a look at the KuhnTucker conditions with examples.
This module will help the reader to know about
1. Stationary points as maxima, minima and points of inflection
2. Concavity and convexity of functions
3. Necessary and sufficient conditions for optimization for both single and multivariable
functions
4. The Hessian matrix
5. Optimization of multivariable function with and without equality constraints
6. KuhnTucker conditions
D Nagesh Kumar, IISc, Bangalore M2LO
Optimization Methods: Optimization using CalculusStationary Points 1
Module  2 Lecture Notes – 1
Stationary points: Functions of Single and Two Variables
Introduction
In this session, stationary points of a function are defined. The necessary and sufficient
conditions for the relative maximum of a function of single or two variables are also
discussed. The global optimum is also defined in comparison to the relative or local optimum.
Stationary points
For a continuous and differentiable function f(x) a stationary point x
*
is a point at which the
slope of the function vanishes, i.e. f ’(x) = 0 at x = x
*
, where x
*
belongs to its domain of
definition.
minimum inflection point
maximum
Fig. 1
A stationary point may be a minimum, maximum or an inflection point (Fig. 1).
Relative and Global Optimum
A function is said to have a relative or local minimum at x = x
*
if
* *
( ) ( ) f x f x h ≤ + for all
sufficiently small positive and negative values of h, i.e. in the near vicinity of the point x
*
.
Similarly a point x
*
is called a relative or local maximum if
* *
( ) ( ) f x f x h ≥ +
*
( ) ( )
for all values
of h sufficiently close to zero. A function is said to have a global or absolute minimum at x =
x
*
if f x f x ≤ for all x in the domain over which f(x) is defined. Similarly, a function is
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 2
said to have a global or absolute maximum at x = x
*
if
*
( ) ( ) f x f x ≥ for all x in the domain
over which f(x) is defined.
Figure 2 shows the global and local optimum points.
a b a b
x x
f(x)
f(x)
.
.
.
.
.
.
A
1
B
1
B
2
A
3
A
2
Relative minimum is also
global optimum (since only
one minimum point is there)
A
1
, A
2
, A
3
= Relative maxima
A
2
= Global maximum
B
1
, B
2
= Relative minima
B
1
= Global minimum
Fig. 2
Functions of a single variable
Consider the function f(x) defined for a x b ≤ ≤ . To find the value of x
*
∈ such that x =
x
[ , ] a b
*
maximizes f(x) we need to solve a singlevariable optimization problem. We have the
following theorems to understand the necessary and sufficient conditions for the relative
maximum of a function of a single variable.
Necessary condition: For a single variable function f(x) defined for x which has a
relative maximum at x = x
[ , ] a b ∈
*
, x
*
∈ if the derivative [ , ] a b ) / '( ) ( f X df x dx = exists as a finite
number at x = x
*
then f ‘(x
*
) = 0. This can be understood from the following.
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 3
Proof.
Since f ‘(x
*
) is stated to exist, we have
'
0
( * ) ( *)
( *)
lim
h
f x h f x
f x
h
→
+ −
= (1)
From our earlier discussion on relative maxima we have ( *) ( * ) f x f x h ≥ + for . Hence 0 h →
( * ) ( *)
0
f x h f x
h
+ −
≥ h < 0 (2)
( * ) ( *)
0
f x h f x
h
+ −
≤ h > 0 (3)
which implies for substantially small negative values of h we have and for
substantially small positive values of h we have
( *) 0 f x ≥
( *) 0 f x ≤ . In order to satisfy both (2) and
(3), f ( *) x
(
= 0. Hence this gives the necessary condition for a relative maxima at x = x
*
for
) x . f
It has to be kept in mind that the above theorem holds good for relative minimum as well.
The theorem only considers a domain where the function is continuous and differentiable. It
cannot indicate whether a maxima or minima exists at a point where the derivative fails to
exist. This scenario is shown in Fig 3, where the slopes m
1
and m
2
at the point of a maxima
are unequal, hence cannot be found as depicted by the theorem by failing for continuity. The
theorem also does not consider if the maxima or minima occurs at the end point of the
interval of definition, owing to the same reason that the function is not continuous, therefore
not differentiable at the boundaries. The theorem does not say whether the function will have
a maximum or minimum at every point where f ‘(x) = 0, since this condition f ‘(x) = 0 is for
stationary points which include inflection points which do not mean a maxima or a minima.
A point of inflection is shown already in Fig.1
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 4
f(x)
a b
x
m
2
m
1
f(x*)
x*
Fig. 3
Sufficient condition: For the same function stated above let f ’(x
*
) = f ”(x
*
) = . . . = f
(n1)
(x
*
)
= 0, but f
(n)
(x
*
) 0, then it can be said that f (x ≠
*
) is (a) a minimum value of f (x) if f
(n)
(x
*
) > 0
and n is even; (b) a maximum value of f (x) if f
(n)
(x
*
) < 0 and n is even; (c) neither a
maximum or a minimum if n is odd.
Proof
Applying the Taylor’s theorem with remainder after n terms, we have
2 1
( 1)
( * ) ( *) '( *) ''( *) ... ( *) ( * )
2! ( 1)! !
n n
n n
h h h
f x h f x hf x f x f x f x h
n n
θ
−
−
+ = + + + + + +
−
(4)
for 0<θ <1
since f ‘(x
*
) = f ‘’(x
*
) = . . . = f
(n1)
(x
*
) = 0, (4) becomes
( * ) ( *) ( * )
!
n
n
h
f x h f x f x h
n
θ + − = + (5)
As f
(n)
(x
*
) 0, there exists an interval around x ≠
*
for every point x of which the nth derivative
f
(n)
(x) has the same sign, viz., that of f
(n)
(x
*
). Thus for every point x
*
+ h of this interval, f
(n)
(x
*
+ h) has the sign of f
(n)
(x
*
). When n is even
! n
n
h
( * ) ( *)
is positive irrespective of the sign of h,
and hence f x h f x + − will have the same sign as that of f
(n)
(x
*
). Thus x
*
will be a
relative minimum if f
(n)
(x
*
) is positive, with f(x) convex around x
*
, and a relative maximum if
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 5
f
(n)
(x
*
) is negative, with f(x) concave around x
*
. When n is odd,
! n
n
h
changes sign with the
change in the sign of h and hence the point x
*
is neither a maximum nor a minimum. In this
case the point x
*
is called a point of inflection.
Example 1.
Find the optimum value of the function
2
( ) 3 5 f x x x = + − and also state if the function
attains a maximum or a minimum.
Solution
'( ) 2 3 0 f x x = + = for maxima or minima.
or x
*
= 3/2
''( *) 2 f x = which is positive hence the point x
*
= 3/2 is a point of minima and the function
attains a minimum value of 29/4 at this point.
Example 2.
Find the optimum value of the function and also state if the function attains a
maximum or a minimum.
4
( ) ( 2) f x x = −
Solution
3
'( ) 4( 2) 0 f x x = − = for maxima or minima.
or x = x
*
= 2 for maxima or minima.
2
''( *) 12( * 2) 0 f x x = − = at x
*
= 2
'''( *) 24( * 2) 0 f x x = − = at x
*
= 2
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 6
( ) 24
*
= ′ ′ ′ ′ x f at x
*
= 2
Hence f
n
(x) is positive and n is even hence the point x = x
*
= 2 is a point of minimum and the
function attains a minimum value of 0 at this point.
Example 3.
Analyze the function and classify the stationary points as
maxima, minima and points of inflection.
5 4 3
( ) 12 45 40 5 f x x x x = − + +
Solution
4 3 2
4 3 2
'( ) 60 180 120 0
3 2 0
or 0,1, 2
f x x x x
x x x
x
= − + =
=> − + =
=
Consider the point x =x
*
= 0
'' * * 3 * 2 *
( ) 240( ) 540( ) 240 0 f x x x x = − + =
−
at x
*
= 0
''' * * 2 *
( ) 720( ) 1080 240 240 f x x x = − + = at x
*
= 0
Since the third derivative is nonzero, x = x
*
= 0 is neither a point of maximum or minimum
but it is a point of inflection.
Consider x = x
*
= 1
'' * * 3 * 2 *
( ) 240( ) 540( ) 240 60 f x x x x = − + = at x
*
= 1
Since the second derivative is negative the point x = x
*
= 1 is a point of local maxima with a
maximum value of f(x) = 12 – 45 + 40 + 5 = 12
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 7
Consider x = x
*
= 2
'' * * 3 * 2 *
( ) 240( ) 540( ) 240 240 f x x x x = − + = at x
*
= 2
Since the second derivative is positive, the point x = x
*
= 2 is a point of local minima with a
minimum value of f(x) = 11
Example 4.
The horse power generated by a Pelton wheel is proportional to u(vu) where u is the velocity
of the wheel, which is variable and v is the velocity of the jet which is fixed. Show that the
efficiency of the Pelton wheel will be maximum at u = v/2.
Solution
K. ( )
0 K 2K
or
2
0
f u v u
f
v u
u
v
u
= −
∂
= => − =
∂
=
where K is a proportionality constant (assumed positive).
2
2
2
2K
v
u
f
u
=
∂
= −
∂
which is negative.
Hence, f is maximum at
2
v
u =
Functions of two variables
This concept may be easily extended to functions of multiple variables. Functions of two
variables are best illustrated by contour maps, analogous to geographical maps. A contour is a
line representing a constant value of f(x) as shown in Fig.4. From this we can identify
maxima, minima and points of inflection.
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 8
Necessary conditions
As can be seen in Fig. 4 and 5, perturbations from points of local minima in any direction
result in an increase in the response function f(x), i.e. the slope of the function is zero at this
point of local minima. Similarly, at maxima and points of inflection as the slope is zero, the
first derivatives of the function with respect to the variables are zero.
Which gives us
1 2
0; 0
f f
x x
∂ ∂
= =
∂ ∂
at the stationary points, i.e., the gradient vector of f(X),
x
f Δ
at X = X
*
= [x
1
, x
2
] defined as follows, must equal zero:
1
2
( *)
0
( *)
x
f
x
f
f
x
∂
⎡ ⎤
Χ
⎢ ⎥
∂
⎢ ⎥
Δ = =
∂ ⎢ ⎥
Χ
⎢ ⎥
∂
⎣ ⎦
This is the necessary condition.
x
2
x
1
Fig. 4
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 9
Global maxima
Relative maxima
Relative minima
Global minima
Fig. 5
Sufficient conditions
Consider the following second order derivatives:
2 2 2
2 2
1 2 1
; ;
2
f f f
x x x x
∂ ∂ ∂
∂ ∂ ∂ ∂
The Hessian matrix defined by H is made using the above second order derivatives.
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 10
1 2
2 2
2
1 1 2
2 2
2
1 2 2
[ , ] x x
f f
x x x
f f
x x x
⎛ ⎞ ∂ ∂
⎜ ⎟
∂ ∂ ∂
⎜ ⎟
=
⎜ ⎟
∂ ∂
⎜ ⎟
⎜ ⎟
∂ ∂ ∂
⎝ ⎠
H
a) If H is positive definite then the point X = [x
1
, x
2
] is a point of local minima.
b) If H is negative definite then the point X = [x
1
, x
2
] is a point of local maxima.
c) If H is neither then the point X = [x
1
, x
2
] is neither a point of maxima nor minima.
A square matrix is positive definite if all its eigen values are positive and it is negative
definite if all its eigen values are negative. If some of the eigen values are positive and some
negative then the matrix is neither positive definite or negative definite.
To calculate the eigen values λ of a square matrix then the following equation is solved.
0 λ − = A I
The above rules give the sufficient conditions for the optimization problem of two variables.
Optimization of multiple variable problems will be discussed in detail in lecture notes 3
(Module 2).
Example 5.
Locate the stationary points of f(X) and classify them as relative maxima, relative minima or
neither based on the rules discussed in the lecture.
f(X) = + 5
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 11
Solution
From
2
(X) 0
f
x
∂
=
∂
,
1 2
2 2 x x = +
From
1
(X) 0
f
x
∂
=
∂
2
2 2
8 14 3 x x 0 + + =
2 2
(2 3)(4 1) 0 x x + + =
2 2
3/ 2 or 1/ 4 x x = − = −
so the two stationary points are
X
1
= [1,3/2]
and
X
2
= [3/2,1/4]
The Hessian of f(X) is
2 2 2 2
1
2 2
1 2 1 2 2 1
4 ; 4; 2
f f f f
x
x x x x x x
∂ ∂ ∂ ∂
= = = =
∂ ∂ ∂ ∂ ∂ ∂
−
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 12
1
4 2
2 4
x −
⎡ ⎤
=
⎢ ⎥
−
⎣ ⎦
H
1
4 2
2 4
x λ
λ
λ
−
=
−
I  H
At X
1
= [1,3/2],
4 2
( 4)( 4) 4
2 4
λ
λ λ λ
λ
+
= = + −
−
I  H 0 − =
2
16 4 0 λ − − =
2
λ = 12
1 2
12 12 λ λ = + = −
Since one eigen value is positive and one negative, X
1
is neither a relative maximum nor a
relative minimum.
At X
2
= [3/2,1/4]
6 2
( 6)( 4) 4
2 4
λ
λ λ λ
λ
−
= = − − −
−
I  H 0 =
2
10 20 0 λ λ − + =
1 2
5 5 5 5 λ λ = + = −
Since both the eigen values are positive, X
2
is a local minimum.
Minimum value of f(x) is 0.375.
D Nagesh Kumar, IISc, Bangalore
M2L1
Optimization Methods: Optimization using CalculusStationary Points 13
Example 6
The ultimate strength attained by concrete is found to be based on a certain empirical
relationship between the ratios of cement and concrete used. Our objective is to maximize
strength attained by hardened concrete, given by f(X) = , where x
2 2
1 1 2 2
20 2 6 3 / 2 x x x x + − + −
1
and x
2
are variables based on cement and concrete ratios.
Solution
Given f(X) = ; where X =
2
1 1 2 2
20 2 6 3 / 2 x x x x + − + −
2
[ ]
1 2
, x x
The gradient vector
1 1
2
2
( *)
2 2 0
6 3 0
( *)
x
f
x x
f
x f
x
∂
⎡ ⎤
Χ
⎢ ⎥
∂ −
⎡ ⎤ ⎡ ⎤
⎢ ⎥
Δ = = =
⎢ ⎥ ⎢ ⎥
− ∂ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
Χ
⎢ ⎥
∂
⎣ ⎦
, to determine stationary point X
*
.
Solving we get X
*
= [1,2]
2 2 2
2 2
1 2 1 2
2; 3; 0
f f f
x x x x
∂ ∂ ∂
= − = −
∂ ∂ ∂ ∂
=
2 0
0 3
−
⎡ ⎤
=
⎢ ⎥
−
⎣ ⎦
H
2 0
( 2)( 3)
0 3
λ
λ λ
λ
+
= = + +
+
I  H 0 λ =
Here the values of λ do not depend on X and
1
λ = 2,
2
λ = 3. Since both the eigen values
are negative, f(X) is concave and the required ratio x
1
:x
2
= 1:2 with a global maximum
strength of f(X) = 27 units.
D Nagesh Kumar, IISc, Bangalore
M2L1
D Nagesh Kumar, IISc Optimization Methods: M2L1
1
Optimization using Calculus
Stationary Points:
Functions of Single
and Two Variables
D Nagesh Kumar, IISc Optimization Methods: M2L1
2
Objectives
¾ To define stationary points
¾ Look into the necessary and sufficient conditions for the
relative maximum of a function of a single variable and
for a function of two variables.
¾ To define the global optimum in comparison to the
relative or local optimum
D Nagesh Kumar, IISc Optimization Methods: M2L1
3
Stationary points
¾ For a continuous and differentiable function f(x) a
stationary point x
*
is a point at which the function
vanishes, i.e. f
’
(x) = 0 at x = x
*
. x
*
belongs to its domain
of definition.
¾ A stationary point may be a minimum, maximum or an
inflection point
D Nagesh Kumar, IISc Optimization Methods: M2L1
4
Stationary points
Figure showing the three types of stationary points (a) inflection point
(b) minimum (c) maximum
D Nagesh Kumar, IISc Optimization Methods: M2L1
5
Relative and Global Optimum
• A function is said to have a relative or local minimum at x = x
*
if
for all sufficiently small positive and negative
values of h, i.e. in the near vicinity of the point x.
• Similarly, a point x
*
is called a relative or local maximum if
for all values of h sufficiently close to zero.
• A function is said to have a global or absolute minimum at x = x
*
if
for all x in the domain over which f(x) is defined.
• Similarly, a function is said to have a global or absolute maximum at
x = x
*
if for all x in the domain over which f (x) is
defined.
*
( ) ( ) f x f x h ≤ +
*
( ) ( ) f x f x h ≥ +
*
( ) ( ) f x f x ≤
*
( ) ( ) f x f x ≥
D Nagesh Kumar, IISc Optimization Methods: M2L1
6
Relative and Global Optimum …contd.
a b a b
x
x
f(x)
f(x)
.
.
.
.
.
.
A
1
B
1
B
2
A
3
A
2
Relative minimum is
also global optimum
A
1
, A
2
, A
3
= Relative maxima
A
2
= Global maximum
B
1
, B
2
= Relative minima
B
1
= Global minimum
Fig. 2
D Nagesh Kumar, IISc Optimization Methods: M2L1
7
Functions of a single variable
¾ Consider the function f(x) defined for
¾ To find the value of x
*
such that x
*
maximizes f(x) we need
to solve a singlevariable optimization problem.
¾ We have the following theorems to understand the necessary and
sufficient conditions for the relative maximum of a function of a
single variable.
a x b ≤ ≤
[ , ] a b ∈
D Nagesh Kumar, IISc Optimization Methods: M2L1
8
Functions of a single variable …contd.
¾ Necessary condition : For a single variable function f(x) defined for x
which has a relative maximum at x = x
*
, x
*
if the
derivative f
‘
(x) = df(x)/dx exists as a finite number at x = x
*
then
f
‘
(x*) = 0.
¾ We need to keep in mind that the above theorem holds good for
relative minimum as well.
¾ The theorem only considers a domain where the function is
continuous and derivative.
¾ It does not indicate the outcome if a maxima or minima exists at a
point where the derivative fails to exist. This scenario is shown in the
figure below, where the slopes m
1
and m
2
at the point of a maxima are
unequal, hence cannot be found as depicted by the theorem.
[ , ] a b ∈ [ , ] a b ∈
D Nagesh Kumar, IISc Optimization Methods: M2L1
9
Functions of a single variable …contd.
Some Notes:
z The theorem does not consider if
the maxima or minima occurs at
the end point of the interval of
definition.
z The theorem does not say that the
function will have a maximum or
minimum at every point where
f
’
(x) = 0, since this condition
f
’
(x) = 0 is for stationary points
which include inflection points
which do not mean a maxima or
a minima.
D Nagesh Kumar, IISc Optimization Methods: M2L1
10
Sufficient condition
z For the same function stated above let f
’
(x
*
) = f
”
(x
*
) = . . .
= f
(n1)
(x
*
) = 0, but f
(n)
(x
*
) 0, then it can be said that
f (x
*
) is
– (a) a minimum value of f (x) if f
(n)
(x
*
) > 0 and n is even
– (b) a maximum value of f (x) if f
(n)
(x
*
) < 0 and n is even
– (c) neither a maximum or a minimum if n is odd
≠
D Nagesh Kumar, IISc Optimization Methods: M2L1
11
Example 1
Find the optimum value of the function
and also state if the function attains a maximum or a
minimum.
Solution
for maxima or minima.
or x
*
= 3/2
which is positive hence the point x
*
= 3/2 is a point of
minima and the function attains a minimum value of 29/4 at this point.
2
( ) 3 5 f x x x = + −
'( ) 2 3 0 f x x = + =
''( *) 2 f x =
D Nagesh Kumar, IISc Optimization Methods: M2L1
12
Example 2
Find the optimum value of the function and
also state if the function attains a maximum or a minimum
Solution:
4
( ) ( 2) f x x = −
3
'( ) 4( 2) 0 f x x = − =
or x = x
*
= 2 for maxima or minima.
2
''( *) 12( * 2) 0 f x x = − =
at x
*
= 2
'''( *) 24( * 2) 0 f x x = − =
at x
*
= 2
( ) 24
*
=
′ ′ ′ ′
x f at x
*
= 2
Hence f
n
(x) is positive and n is even hence the point x = x* = 2 is a point of
minimum and the function attains a minimum value of 0 at this point.
D Nagesh Kumar, IISc Optimization Methods: M2L1
13
Example 3
Analyze the function and
classify the stationary points as maxima, minima and points
of inflection.
Solution:
Consider the point x = x
*
= 0
at x
*
= 0
at x
*
= 0
5 4 3
( ) 12 45 40 5 f x x x x = − + +
4 3 2
4 3 2
'( ) 60 180 120 0
3 2 0
or 0,1, 2
f x x x x
x x x
x
= − + =
=> − + =
=
'' * * 3 * 2 *
( ) 240( ) 540( ) 240 0 f x x x x = − + =
''' * * 2 *
( ) 720( ) 1080 240 240 f x x x = − + =
D Nagesh Kumar, IISc Optimization Methods: M2L1
14
Example 3 …contd.
Since the third derivative is nonzero, x = x
*
= 0 is neither a point of
maximum or minimum but it is a point of inflection
Consider x = x
*
= 1
at x
*
= 1
Since the second derivative is negative the point x = x
*
= 1 is a point of
local maxima with a maximum value of f(x) = 12 – 45 + 40 + 5 = 12
Consider x = x
*
= 2
at x
*
= 2
Since the second derivative is positive, the point x = x
*
= 2 is a point of
local minima with a minimum value of f(x) = 11
'' * * 3 * 2 *
( ) 240( ) 540( ) 240 60 f x x x x = − + = −
'' * * 3 * 2 *
( ) 240( ) 540( ) 240 240 f x x x x = − + =
D Nagesh Kumar, IISc Optimization Methods: M2L1
15
Example 4
The horse power generated by a Pelton wheel is proportional to u(vu) where
u is the velocity of the wheel, which is variable and v is the velocity of the jet
which is fixed. Show that the efficiency of the Pelton wheel will be maximum
at u = v/2.
Solution:
where K is a proportionality constant (assumed positive).
which is negative. Hence, f is maximum at
K. ( )
0 K 2K 0
or
2
f u v u
f
v u
u
v
u
= −
∂
= => − =
∂
=
2
2
2K
v
u
f
u
=
∂
= −
∂
2
2
v
u =
D Nagesh Kumar, IISc Optimization Methods: M2L1
16
Functions of two variables
¾ The concept discussed for one variable functions
may be easily extended to functions of multiple
variables.
¾ Functions of two variables are best illustrated by
contour maps, analogous to geographical maps.
¾ A contour is a line representing a constant value of f(x)
as shown in the following figure. From this we can
identify maxima, minima and points of inflection.
D Nagesh Kumar, IISc Optimization Methods: M2L1
17
A contour plot
D Nagesh Kumar, IISc Optimization Methods: M2L1
18
Necessary conditions
¾ As can be seen in the above contour map, perturbations
from points of local minima in any direction result in an
increase in the response function f(x), i.e.
¾ the slope of the function is zero at this point of local
minima.
¾ Similarly, at maxima and points of inflection as the slope
is zero, the first derivative of the function with respect to
the variables are zero.
D Nagesh Kumar, IISc Optimization Methods: M2L1
19
Necessary conditions …contd.
¾ Which gives us at the stationary points. i.e. the
gradient vector of f(X), at X = X
*
= [x
1
, x
2
] defined as follows,
must equal zero:
This is the necessary condition.
1 2
0; 0
f f
x x
∂ ∂
= =
∂ ∂
1
2
( *)
0
( *)
x
f
x
f
f
x
∂
⎡ ⎤
Χ
⎢ ⎥
∂
⎢ ⎥
Δ = =
∂ ⎢ ⎥
Χ
⎢ ⎥
∂
⎣ ⎦
x
f Δ
D Nagesh Kumar, IISc Optimization Methods: M2L1
20
Sufficient conditions
¾ Consider the following second order derivatives:
¾ The Hessian matrix defined by H is made using the above second
order derivatives.
2 2 2
2 2
1 2 1 2
; ;
f f f
x x x x
∂ ∂ ∂
∂ ∂ ∂ ∂
1 2
2 2
2
1 1 2
2 2
2
1 2 2
[ , ] x x
f f
x x x
f f
x x x
⎛ ⎞
∂ ∂
⎜ ⎟
∂ ∂ ∂
⎜ ⎟
=
⎜ ⎟
∂ ∂
⎜ ⎟
⎜ ⎟
∂ ∂ ∂
⎝ ⎠
H
D Nagesh Kumar, IISc Optimization Methods: M2L1
21
Sufficient conditions …contd.
¾ The value of determinant of the H is calculated and
¾ if H is positive definite then the point X = [x
1
, x
2
] is a
point of local minima.
¾ if H is negative definite then the point X = [x
1
, x
2
] is a
point of local maxima.
¾ if H is neither then the point X = [x
1
, x
2
] is neither a
point of maxima nor minima.
D Nagesh Kumar, IISc Optimization Methods: M2L1
22
Example 5
Locate the stationary points of f(X) and classify them as relative
maxima, relative minima or neither based on the rules discussed in the
lecture.
Solution
3 2
1 1 2 1 2 2
( ) 2 / 3 2 5 2 4 5 f x x x x x x = − − + + + X
D Nagesh Kumar, IISc Optimization Methods: M2L1
23
Example 5 …contd.
From ,
So the two stationary points are
X
1
= [1,3/2] and X
2
= [3/2,1/4]
1
(X) 0
f
x
∂
=
∂
2
2 2
8 14 3 0 x x + + =
2 2
(2 3)(4 1) 0 x x + + =
2 2
3/ 2 or 1/ 4 x x = − = −
D Nagesh Kumar, IISc Optimization Methods: M2L1
24
Example 5 …contd.
The Hessian of f(X) is
At X
1
= [1,3/2]
,
2 2 2 2
1
2 2
1 2 1 2 2 1
4 ; 4; 2
f f f f
x
x x x x x x
∂ ∂ ∂ ∂
= = = = −
∂ ∂ ∂ ∂ ∂ ∂
1
4 2
2 4
x −
⎡ ⎤
=
⎢ ⎥
−
⎣ ⎦
H
1
4 2
2 4
x λ
λ
λ
−
=
−
I  H
4 2
( 4)( 4) 4 0
2 4
λ
λ λ λ
λ
+
= = + − − =
−
I  H
2
16 4 0 λ − − =
1 2
12 12 λ λ = + = −
Since one eigen value is positive
and one negative, X
1
is neither
a relative maximum nor a
relative minimum
D Nagesh Kumar, IISc Optimization Methods: M2L1
25
Example 5 …contd.
At X
2
= [3/2,1/4]
Since both the eigen values are positive, X
2
is a local minimum.
Minimum value of f(x) is 0.375
6 2
( 6)( 4) 4 0
2 4
λ
λ λ λ
λ
−
= = − − − =
−
I  H
1 2
5 5 5 5 λ λ = + = −
D Nagesh Kumar, IISc Optimization Methods: M2L1
26
Example 6
Maximize f(X) =
;
2 2
1 1 2 2
20 2 6 3 / 2 x x x x + − + −
1 1
2
2
( *)
2 2 0
6 3 0
( *)
x
f
x x
f
x f
x
∂
⎡ ⎤
Χ
⎢ ⎥
∂ −
⎡ ⎤ ⎡ ⎤
⎢ ⎥
Δ = = =
⎢ ⎥ ⎢ ⎥
− ∂ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
Χ
⎢ ⎥
∂
⎣ ⎦
X
*
= [1,2]
2 2 2
2 2
1 2 1 2
2; 3; 0
f f f
x x x x
∂ ∂ ∂
= − = − =
∂ ∂ ∂ ∂
2 0
0 3
−
⎡ ⎤
=
⎢ ⎥
−
⎣ ⎦
H
D Nagesh Kumar, IISc Optimization Methods: M2L1
27
Example 6 …contd.
Since both the eigen values are negative, f(X) is concave and
the required ratio x
1
:x
2
= 1:2 with a global maximum strength
of f(X) = 27 MPa
2 0
( 2)( 3) 0
0 3
λ
λ λ λ
λ
+
= = + + =
+
I  H
1 2
2 3 and λ λ = − = −
D Nagesh Kumar, IISc Optimization Methods: M2L1
28
Thank you
Optimization Methods: Optimization using CalculusConvexity and Concavity 1
Module – 2 Lecture Notes – 2
Convexity and Concavity of Functions of One and Two Variables
Introduction
In the previous class we studied about stationary points and the definition of relative and
global optimum. The necessary and sufficient conditions required for a relative optimum in
functions of one variable and its extension to functions of two variables was also studied. In
this lecture, determination of the convexity and concavity of functions is discussed.
The analyst must determine whether the objective functions and constraint equations are
convex or concave. In realworld problems, if the objective function or the constraints are not
convex or concave, the problem is usually mathematically intractable.
Functions of one variable
Convex function
A realvalued function f defined on an interval (or on any convex subset C of some vector
space) is called convex, if for any two points a and b in its domain C and any t in [0,1], we
have
) ( ) 1 ( ) ( ) ) 1 ( ( b f t a tf b t ta f − + ≤ − +
Fig. 1
In other words, a function is convex if and only if its epigraph (the set of points lying on or
above the graph) is a convex set. A function is also said to be strictly convex if
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 2
( (1 ) ) ( ) (1 ) ( ) f ta t b tf a t f b + − < + −
for any t in (0,1) and a line connecting any two points on the function lies completely above
the function. These relationships are illustrated in Fig. 1.
Testing for convexity of a single variable function
A function is convex if its slope is non decreasing or
2 2
f / x ∂ ∂ ≥ 0. It is strictly convex if its
slope is continually increasing or > 0 throughout the function.
Properties of convex functions
A convex function f, defined on some convex open interval C, is continuous on C and
differentiable at all or at most, countable many points. If C is closed, then f may fail to be
continuous at the end points of C.
A continuous function on an interval C is convex if and only if
( ) ( )
2 2
a b f a f b
f
+ +
⎛ ⎞
≤
⎜ ⎟
⎝ ⎠
for all a and b in C.
A differentiable function of one variable is convex on an interval if and only if its derivative
is monotonically nondecreasing on that interval.
A continuously differentiable function of one variable is convex on an interval if and only if
the function lies above all of its tangents: ( ) ( ) '( )( ) f b f a f a b a ≥ + − for all a and b in the
interval.
A twice differentiable function of one variable is convex on an interval if and only if its
second derivative is nonnegative in that interval; this gives a practical test for convexity. If
its second derivative is positive then it is strictly convex, but the converse does not hold, as
shown by f(x) = x
4
.
More generally, a continuous, twice differentiable function of several variables is convex on
a convex set if and only if its Hessian matrix is positive semi definite on the interior of the
convex set.
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 3
If two functions f and g are convex, then so is any weighted combination a f + b g with non
negative coefficients a and b. Likewise, if f and g are convex, then the function max{f,g} is
convex.
A strictly convex function will have only one minimum which is also the global minimum.
Examples
• The second derivative of x
2
is 2; it follows that x
2
is a convex function of x.
• The absolute value function x is convex, even though it does not have a derivative at
x = 0.
• The function f with domain [0,1] defined by f(0)=f(1)=1, f(x)=0 for 0<x<1 is convex;
it is continuous on the open interval (0,1), but not continuous at 0 and 1.
• Every linear transformation is convex but not strictly convex, since if f is linear, then
f(a + b) = f(a) + f(b). This implies that the identity map (i.e., f(x) = x) is convex but
not strictly convex. The fact holds good if we replace "convex" by "concave".
• An affine function (f (x) = ax + b) is simultaneously convex and concave.
Concave function
A differentiable function f is concave on an interval if its derivative function f ′ is decreasing
on that interval: a concave function has a decreasing slope.
A function that is convex is often synonymously called concave upwards, and a function
that is concave is often synonymously called concave downward.
For a twicedifferentiable function f, if the second derivative, f ''(x), is positive (or, if the
acceleration is positive), then the graph is convex (or concave upward); if the second
derivative is negative, then the graph is concave (or concave downward). Points, at which
concavity changes, are called inflection points.
If a convex (i.e., concave upward) function has a "bottom", any point at the bottom is a
minimal extremum. If a concave (i.e., concave downward) function has an "apex", any point
at the apex is a maximal extremum.
A function f(x) is said to be concave on an interval if, for all a and b in that interval,
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 4
[0,1], ( (1 ) ) ( ) (1 ) ( ) t f ta t b tf a t f ∀ ∈ + − ≥ + − b
Additionally, f(x) is strictly concave if
[0,1], ( (1 ) ) ( ) (1 ) ( ) t f ta t b tf a t f b ∀ ∈ + − > + −
These relationships are illustrated in Fig. 2
Fig. 2
Testing for concavity of a single variable function
A function is concave if its slope is non increasing or
2 2
/ f x ∂ ∂ ≤ 0. It is strictly concave if its
slope is continually decreasing or
2 2
/ f x ∂ ∂ <0 throughout the function.
Properties of a concave functions
A continuous function on C is concave if and only if
( ) ( )
2 2
a b f a f b
f
+ +
⎛ ⎞
≥
⎜ ⎟
⎝ ⎠
for any x and y in C.
Equivalently, f(x) is concave on [a, b] if and only if the function −f(x) is convex on every
subinterval of [a, b].
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 5
If f(x) is twicedifferentiable, then f(x) is concave if and only if f ′′(x) is nonpositive. If its
second derivative is negative then it is strictly concave, but the opposite is not true, as shown
by f(x) = x
4
.
A function is called quasiconcave if and only if there is an x
0
such that for all x < x
0
, f(x) is
nondecreasing while for all x > x
0
it is nonincreasing. x
0
can also be , making the
function nondecreasing (nonincreasing) for all
±∞
x. The opposite of quasiconcave is
quasiconvex.
Example 1
Consider the example in lecture notes 1 for a function of two variables. Locate the stationary
points of and find out if the function is convex, concave or
neither at the points of optima based on the testing rules discussed above.
5 4 3
( ) 12 45 40 5 f x x x x = − + +
Solution
4 3 2
4 3 2
'( ) 60 180 120 0
3 2 0
or 0,1, 2
f x x x x
x x x
x
= − + =
=> − + =
=
Consider the point x =x* = 0
3 2
''( *) 240( *) 540( *) 240 * 0 f x x x x = − + =
−
at x * = 0
2
'''( *) 720( *) 1080 * 240 240 f x x x = − + = at x * = 0
Since the third derivative is nonzero x = x* = 0 is neither a point of maximum or minimum
but it is a point of inflection. Hence the function is neither convex nor concave at this point.
Consider x = x* = 1
3 2
''( *) 240( *) 540( *) 240 * 60 f x x x x = − + = at x* = 1
Since the second derivative is negative, the point x = x* = 1 is a point of local maxima with a
maximum value of f(x) = 12 – 45 + 40 + 5 = 12. At this point the function is concave since
2 2
/ f x ∂ ∂ < 0.
Consider x = x* = 2
3 2
''( *) 240( *) 540( *) 240 * 240 f x x x x = − + = at x* = 2
Since the second derivative is positive, the point x = x* = 2 is a point of local minima with a
minimum value of f(x) = 11. At this point the function is convex since
2 2
/ f x ∂ ∂ > 0.
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 6
Functions of two variables
A function of two variables, f(X) where X is a vector = [x
1
,x
2
], is strictly convex if
1 2 1
( (1 ) ) ( ) (1 ) ( ) f t t tf t f Χ + − Χ < Χ + − Χ
2
2
where X
1
and X
2
are points located by the coordinates given in their respective vectors.
Similarly a two variable function is strictly concave if
1 2 1
( (1 ) ) ( ) (1 ) ( ) f t t tf t f Χ + − Χ > Χ + − Χ
Contour plot of a convex function is illustrated in Fig. 3
340
Fig. 3
Contour plot of a convex function is shown in Fig. 4
Fig. 4
450
70
x
2
120
x
1
x
2
x
1
110
210
305
40
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 7
To determine convexity or concavity of a function of multiple variables, the eigenvalues of
its Hessian matrix are examined and the following rules apply.
(a) If all eigenvalues of the Hessian are positive the function is strictly convex.
(b) If all eigenvalues of the Hessian are negative the function is strictly concave.
(c) If some eigenvalues are positive and some are negative, or if some are zero, the
function is neither strictly concave nor strictly convex.
Example 2
Consider the example in lecture notes 1 for a function of two variables. Locate the stationary
points of f(X) and find out if the function is convex, concave or neither at the points of
optima based on the rules discussed in this lecture.
f(X) =
3 2
1 1 2 1 2
2 / 3 2 5 2 4
2
x x x x x x − − + + + 5
Solution
2
1
1 2
1 2
2
( *)
0 2 2 5
0 2 4 4
( *)
x
f
x
x x
f
f x x
x
∂
⎡ ⎤
Χ
⎢ ⎥
∂ ⎡ ⎤ − − ⎡ ⎤
⎢ ⎥
Δ = = =
⎢ ⎥
⎢ ⎥
∂ ⎢ ⎥ − + +
⎣ ⎦
⎣ ⎦
Χ
⎢ ⎥
∂
⎣ ⎦
Solving the above the two stationary points are
X
1
= [1,3/2]
and
X
2
= [3/2,1/4]
The Hessian of f(X) is
2 2 2 2
1
2 2
1 2 1 2 2 1
4 ; 4; 2
f f f f
x
x x x x x x
∂ ∂ ∂ ∂
= = = =
∂ ∂ ∂ ∂ ∂ ∂
−
1
4 2
2 4
x −
⎡ ⎤
=
⎢ ⎥
−
⎣ ⎦
H
1
4 2
2 4
x λ
λ
λ
−
=
−
I  H
At X
1
4 2
( 4)( 4) 4
2 4
λ
λ λ λ
λ
+
= = + −
−
I  H 0 − =
2
16 4 0 λ − − =
D Nagesh Kumar, IISc, Bangalore
M2L2
Optimization Methods: Optimization using CalculusConvexity and Concavity 8
2
λ = 12
1 2
12 12 λ λ = + = −
Since one eigen value is positive and one negative, X
1
is neither a relative maximum nor a
relative minimum. Hence at X
1
the function is neither convex nor concave.
At X
2
= [3/2,1/4]
6 2
( 6)( 4) 4
2 4
λ
λ λ λ
λ
−
= = − − −
−
I  H 0 =
2
10 20 0 λ λ − + =
1 2
5 5 5 5 λ λ = + = −
Since both the eigen values are positive, X
2
is a local minimum, and the function is convex at
this point as both the eigen values are positive.
D Nagesh Kumar, IISc, Bangalore
M2L2
D Nagesh Kumar, IISc Optimization Methods: M2L2
1
Optimization using Calculus
Convexity and Concavity
of Functions of One and
Two Variables
D Nagesh Kumar, IISc Optimization Methods: M2L2
2
Objective
¾ To determine the convexity and concavity of functions
D Nagesh Kumar, IISc Optimization Methods: M2L2
3
Convex Function (Function of one variable)
¾ A realvalued function f defined on an interval (or on any convex subset
C of some vector space) is called convex, if for any two points x and y in
its domain C and any t in [0,1], we have
¾ In other words, a function is convex if and only if its epigraph (the set of
points lying on or above the graph) is a convex set. A function is also said
to be strictly convex if
for any t in (0,1) and a line connecting any two points on the function lies
completely above the function.
( (1 ) ) ( ) (1 ) ( )) f ta t b tf a t f b + − ≤ + −
( (1 ) ) ( ) (1 ) ( ) f ta t b tf a t f b + − < + −
D Nagesh Kumar, IISc Optimization Methods: M2L2
4
A convex function
D Nagesh Kumar, IISc Optimization Methods: M2L2
5
Testing for convexity of a single variable
function
¾A function is convex if its slope is non decreasing or
0. It is strictly convex if its slope is continually
increasing or 0 throughout the function.
2 2
/ f x ∂ ∂ ≥
2 2
/ f x ∂ ∂ >
D Nagesh Kumar, IISc Optimization Methods: M2L2
6
Properties of convex functions
z A convex function f, defined on some convex open interval C, is
continuous on C and differentiable at all or at many points. If C is
closed, then f may fail to be continuous at the end points of C.
z A continuous function on an interval C is convex if and only if
for all a and b in C.
• A differentiable function of one variable is convex on an interval if
and only if its derivative is monotonically nondecreasing on that
interval.
( ) ( )
2 2
a b f a f b
f
+ +
⎛ ⎞
≤
⎜ ⎟
⎝ ⎠
D Nagesh Kumar, IISc Optimization Methods: M2L2
7
Properties of convex functions (contd.)
z A continuously differentiable function of one variable is convex on an
interval if and only if the function lies above all of its tangents: for all a
and b in the interval.
z A twice differentiable function of one variable is convex on an interval if
and only if its second derivative is nonnegative in that interval; this
gives a practical test for convexity.
z More generally, a continuous, twice differentiable function of several
variables is convex on a convex set if and only if its Hessian matrix is
positive semi definite on the interior of the convex set.
z If two functions f and g are convex, then so is any weighted combination
af + b g with nonnegative coefficients a and b. Likewise, if f and g are
convex, then the function max{f, g} is convex.
D Nagesh Kumar, IISc Optimization Methods: M2L2
8
Concave function (function of one variable)
z A differentiable function f is concave on an interval if its derivative
function f ′ is decreasing on that interval: a concave function has a
decreasing slope.
z A function f(x) is said to be concave on an interval if, for all a and b
in that interval,
z Additionally, f(x) is strictly concave if
[0,1], ( (1 ) ) ( ) (1 ) ( ) t f ta t b tf a t f b ∀ ∈ + − ≥ + −
[0,1], ( (1 ) ) ( ) (1 ) ( ) t f ta t b tf a t f b ∀ ∈ + − > + −
D Nagesh Kumar, IISc Optimization Methods: M2L2
9
A concave function
D Nagesh Kumar, IISc Optimization Methods: M2L2
10
Testing for concavity of a single variable
function
z A function is convex if its slope is non increasing or
0. It is strictly concave if its slope is continually
decreasing or 0 throughout the function.
2 2
/ f x ∂ ∂ ≤
2 2
/ f x ∂ ∂ <
D Nagesh Kumar, IISc Optimization Methods: M2L2
11
Properties of concave functions
z A continuous function on C is concave if and only if
for any a and b in C.
• Equivalently, f(x) is concave on [a, b] if and only if the function −f(x)
is convex on every subinterval of [a, b].
• If f(x) is twicedifferentiable, then f(x) is concave if and only if
f ′′(x) is nonpositive. If its second derivative is negative then it is
strictly concave, but the opposite is not true, as shown by f(x) = x
4
.
( ) ( )
2 2
a b f a f b
f
+ +
⎛ ⎞
≥
⎜ ⎟
⎝ ⎠
D Nagesh Kumar, IISc Optimization Methods: M2L2
12
Example
Consider the example in lecture notes 1 for a function of two variables.
Locate the stationary points of
and find out if the function is convex, concave or neither at the points of
optima based on the testing rules discussed above.
5 4 3
( ) 12 45 40 5 f x x x x = − + +
D Nagesh Kumar, IISc Optimization Methods: M2L2
13
Example …contd.
D Nagesh Kumar, IISc Optimization Methods: M2L2
14
Example …contd.
D Nagesh Kumar, IISc Optimization Methods: M2L2
15
Functions of two variables
z A function of two variables, f(X) where X is a vector = [x
1
,x
2
], is
strictly convex if
z where X
1
and X
2
are points located by the coordinates given in their
respective vectors. Similarly a two variable function is strictly
concave if
1 2 1 2
( (1 ) ) ( ) (1 ) ( ) f t t tf t f Χ + − Χ < Χ + − Χ
1 2 1 2
( (1 ) ) ( ) (1 ) ( ) f t t tf t f Χ + − Χ > Χ + − Χ
D Nagesh Kumar, IISc Optimization Methods: M2L2
16
Contour plot of a convex function
D Nagesh Kumar, IISc Optimization Methods: M2L2
17
Contour plot of a concave function
D Nagesh Kumar, IISc Optimization Methods: M2L2
18
Sufficient conditions
z To determine convexity or concavity of a function of
multiple variables, the eigen values of its Hessian matrix
is examined and the following rules apply.
– If all eigen values of the Hessian are positive the function is
strictly convex.
– If all eigen values of the Hessian are negative the function is
strictly concave.
– If some eigen values are positive and some are negative, or if
some are zero, the function is neither strictly concave nor strictly
convex.
D Nagesh Kumar, IISc Optimization Methods: M2L2
19
Example
Consider the example in lecture notes 1 for a function of two
variables. Locate the stationary points of f(X) and find out if the
function is convex, concave or neither at the points of optima based
on the rules discussed in this lecture.
3 2
1 1 2 1 2 2
( ) 2 / 3 2 5 2 4 5 f x x x x x x = − − + + + X
D Nagesh Kumar, IISc Optimization Methods: M2L2
21
Example (contd..)
D Nagesh Kumar, IISc Optimization Methods: M2L2
22
Thank you
Optimization Methods: Optimization using Calculus  Unconstrained Optimization 1
Module – 2 Lecture Notes – 3
Optimization of Functions of Multiple Variables: Unconstrained Optimization
Introduction
In the previous lectures we learnt how to determine the convexity and concavity of functions
of single and two variables. For functions of single and two variables we also learnt
determining stationary points and examining higher derivatives to check for convexity and
concavity, and tests were recommended to evaluate stationary points as local minima, local
maxima or points of inflection.
In this lecture functions of multiple variables, which are more difficult to be analyzed owing
to the difficulty in graphical representation and tedious calculations involved in mathematical
analysis, will be studied for unconstrained optimization. This is done with the aid of the
gradient vector and the Hessian matrix. Examples are discussed to show the implementation
of the technique.
Unconstrained optimization
If a convex function is to be minimized, the stationary point is the global minimum and
analysis is relatively straightforward as discussed earlier. A similar situation exists for
maximizing a concave variable function. The necessary and sufficient conditions for the
optimization of unconstrained function of several variables are given below.
Necessary condition
In case of multivariable functions a necessary condition for a stationary point of the function
f(X) is that each partial derivative is equal to zero. In other words, each element of the
gradient vector defined below must be equal to zero.
i.e. the gradient vector of f(X),
x
f Δ at X=X*, defined as follows, must be equal to zero:
1
2
( *)
( *)
( *)
x
n
f
x
f
x
f
f
dx
∂
⎡ ⎤
Χ
⎢ ⎥
∂
⎢ ⎥
∂ ⎢ ⎥
Χ
⎢ ⎥
∂
⎢ ⎥
Δ =
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
∂
Χ
⎢ ⎥
∂
⎣ ⎦
M
M
= 0
D Nagesh Kumar, IISc, Bangalore
M2L3
Optimization Methods: Optimization using Calculus  Unconstrained Optimization 2
The proof given for the theorem on necessary condition for single variable optimization can
be easily extended to prove the present condition.
Sufficient condition
For a stationary point X* to be an extreme point, the matrix of second partial derivatives
(Hessian matrix) of f(X) evaluated at X* must be:
(i) positive definite when X* is a point of relative minimum, and
(ii) negative definite when X* is a relative maximum point.
Proof (Formulation of the Hessian matrix)
The Taylor’s theorem with reminder after two terms gives us
2
1 1 1
*
1
( * ) ( *) ( *)
2!
n n n
i i j
i i j
i i
h
df f
f h f h h h
dx x x
j
θ
= = =
Χ=Χ +
∂
Χ + = Χ + Χ +
∂ ∂
∑ ∑∑
0<θ <1
Since X* is a stationary point, the necessary condition gives
0
i
df
dx
= , i = 1,2,…,n
Thus
2
1 1
*
1
( * ) ( *)
2!
n n
i j
i j
i j
h
f
f h f h h
x x
θ
= =
Χ=Χ +
∂
Χ + − Χ =
∂ ∂
∑∑
For a minimization problem the left hand side of the above expression must be positive.
Since the second partial derivative is continuous in the neighborhood of X* the sign of
2
*
i j
f x x h θ ∂ ∂ ∂ Χ = Χ + is the same as the sign of
2
*
i j
f x x ∂ ∂ ∂ Χ = Χ . And hence
will be a relative minimum, if ( * ) ( *) f h f Χ + − Χ
2
1 1
*
1
( * ) ( *)
2!
n n
i j
i j
i j
f
f h f h h
x x
= =
Χ=Χ
∂
Χ + − Χ =
∂ ∂
∑∑
is positive. This can also be written in the matrix form as
X=X*
T
Q = h Hh
where
2
X=X*
*
i j
f
x x
Χ=Χ
⎡ ⎤
∂
= ⎢ ⎥
∂ ∂
⎢ ⎥
⎣ ⎦
H
is the matrix of second partial derivatives and is called the Hessian matrix of f(X).
D Nagesh Kumar, IISc, Bangalore
M2L3
Optimization Methods: Optimization using Calculus  Unconstrained Optimization 3
Q will be positive for all h if and only if H is positive definite at X=X*. i.e. the sufficient
condition for X* to be a relative minimum is that the Hessian matrix evaluated at the same
point is positive definite, which completes the proof for the minimization case. In a similar
manner, it can be proved that the Hessian matrix will be negative definite if X* is a point of
relative maximum.
A matrix A will be positive definite if all its eigenvalues are positive. i.e. all values of λ that
satisfy the equation
0 λ − = A I
should be positive. Similarly, the matrix A will be negative definite if its eigenvalues are
negative. When some eigenvalues are positive and some are negative then matrix A is neither
positive definite or negative definite.
When all eigenvalues are negative for all possible values of X, then X* is a global maximum,
and when all eigenvalues are positive for all possible values of X, then X* is a global
minimum.
If some of the eigenvalues of the Hessian at X* are positive and some negative, or if some are
zero, the stationary point, X*, is neither a local maximum nor a local minimum.
Example
Analyze the function and classify the
stationary points as maxima, minima and points of inflection.
2 2 2
1 2 3 1 2 1 3 1 3
( ) 2 2 4 5 2 f x x x x x x x x x x = − − − + + + − +
Solution
1
1 2 3
2 1
2
3 1
3
( *)
2 2 2 4 0
( *) 2 2 0
2 2 5 0
( *)
x
f
x
x x x
f
f x x
x
x x
f
x
⎡ ⎤
∂
Χ
⎢ ⎥
∂
⎢ ⎥
− + + +
⎡ ⎤ ⎡ ⎤
⎢ ⎥
∂
⎢ ⎥ ⎢ ⎥
Δ = Χ = − + =
⎢ ⎥
⎢ ⎥ ⎢ ⎥
∂
⎢ ⎥
⎢ ⎥ ⎢ ⎥ − + −
⎣ ⎦ ⎣ ⎦
⎢ ⎥
∂
Χ
⎢ ⎥
∂
⎣ ⎦
Solving these simultaneous equations we get X
*
=[1/2, 1/2, 2]
2 2 2
2 2 2
1 2 3
2 2
1 2 2 1
2; 2; 2
2
f f f
x x x
f f
x x x x
∂ ∂ ∂
= − = − =
∂ ∂ ∂
∂ ∂
= =
∂ ∂ ∂ ∂
−
D Nagesh Kumar, IISc, Bangalore
M2L3
Optimization Methods: Optimization using Calculus  Unconstrained Optimization 4
2 2
2 3 3 2
2 2
3 1 1 3
0
2
f f
x x x x
f f
x x x x
∂ ∂
= =
∂ ∂ ∂ ∂
∂ ∂
= =
∂ ∂ ∂ ∂
Hessian of f(X) is
2
i j
f
x x
⎡ ⎤
∂
=
⎢ ⎥
∂ ∂
⎢ ⎥
⎣ ⎦
H
2 2 2
2 2 0
2 0 2
−
⎡ ⎤
⎢ ⎥
= −
⎢ ⎥
⎢ ⎥ −
⎣ ⎦
H
2 2 2
2 2 0
2 0 2
λ
λ λ
λ
+ − −
0 = − + =
− +
I  H
or ( 2)( 2)( 2) 2( 2)(2) 2(2)( 2) 0 λ λ λ λ λ + + + − + + + =
2
( 2)[ 4 4 4 4] λ λ λ + + + − + = 0
0
3
( 2) λ + =
or
1 2 3
2 λ λ λ = = = −
Since all eigenvalues are negative the function attains a maximum at the point
X
*
=[1/2, 1/2, 2]
D Nagesh Kumar, IISc, Bangalore
M2L3
D Nagesh Kumar, IISc Optimization Methods: M2L3
1
Optimization using Calculus
Optimization of
Functions of Multiple
Variables: Unconstrained
Optimization
D Nagesh Kumar, IISc Optimization Methods: M2L3
2
Objectives
¾ To study functions of multiple variables, which are more difficult to
analyze owing to the difficulty in graphical representation and
tedious calculations involved in mathematical analysis for
unconstrained optimization.
¾ To study the above with the aid of the gradient vector and the
Hessian matrix.
¾ To discuss the implementation of the technique through examples
D Nagesh Kumar, IISc Optimization Methods: M2L3
3
Unconstrained optimization
¾ If a convex function is to be minimized, the stationary point is the
global minimum and analysis is relatively straightforward as
discussed earlier.
¾ A similar situation exists for maximizing a concave variable function.
¾ The necessary and sufficient conditions for the optimization of
unconstrained function of several variables are discussed.
D Nagesh Kumar, IISc Optimization Methods: M2L3
4
Necessary condition
z In case of multivariable functions a necessary condition for a
stationary point of the function f(X) is that each partial derivative is
equal to zero. In other words, each element of the gradient vector
defined below must be equal to zero. i.e. the gradient vector of f(X),
at X=X
*
, defined as follows, must be equal to zero:
x
f Δ
*
1
*
2
*
( )
( )
0
( )
x
n
f
x
f
x
f
f
dx
∂
⎡ ⎤
Χ
⎢ ⎥
∂
⎢ ⎥
∂ ⎢ ⎥
Χ
⎢ ⎥
∂
⎢ ⎥
Δ = =
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
∂
Χ
⎢ ⎥
∂
⎣ ⎦
M
M
D Nagesh Kumar, IISc Optimization Methods: M2L3
5
Sufficient condition
¾ For a stationary point X* to be an extreme point, the matrix of second
partial derivatives (Hessian matrix) of f(X) evaluated at X* must be:
¾ positive definite when X* is a point of relative minimum, and
¾ negative definite when X* is a relative maximum point.
¾ When all eigen values are negative for all possible values of X, then
X* is a global maximum, and when all eigen values are positive for
all possible values of X, then X* is a global minimum.
¾ If some of the eigen values of the Hessian at X* are positive and some
negative, or if some are zero, the stationary point, X*, is neither a
local maximum nor a local minimum.
D Nagesh Kumar, IISc Optimization Methods: M2L3
6
Example
Analyze the function
and classify the stationary points as maxima, minima and points of
inflection
Solution
2 2 2
1 2 3 1 2 1 3 1 3
( ) 2 2 4 5 2 f x x x x x x x x x x = − − − + + + − +
*
1
1 2 3
*
2 1
2
3 1
*
3
( )
2 2 2 4 0
( ) 2 2 0
2 2 5 0
( )
x
f
x
x x x
f
f x x
x
x x
f
x
⎡ ⎤
∂
Χ
⎢ ⎥
∂
⎢ ⎥
− + + +
⎡ ⎤ ⎡ ⎤
⎢ ⎥
∂
⎢ ⎥ ⎢ ⎥
Δ = Χ = − + =
⎢ ⎥
⎢ ⎥ ⎢ ⎥
∂
⎢ ⎥
⎢ ⎥ ⎢ ⎥ − + −
⎣ ⎦ ⎣ ⎦
⎢ ⎥
∂
Χ
⎢ ⎥
∂
⎣ ⎦
D Nagesh Kumar, IISc Optimization Methods: M2L3
7
Example …contd.
D Nagesh Kumar, IISc Optimization Methods: M2L3
8
Example …contd.
D Nagesh Kumar, IISc Optimization Methods: M2L3
9
Example …contd.
D Nagesh Kumar, IISc Optimization Methods: M2L3
10
Thank you
Optimization Methods: Optimization using Calculus  Equality constraints 1
Module – 2 Lecture Notes – 4
Optimization of Functions of Multiple Variables subject to Equality Constraints
Introduction
In the previous lecture we learnt the optimization of functions of multiple variables studied
for unconstrained optimization. This is done with the aid of the gradient vector and the
Hessian matrix. In this lecture we will learn the optimization of functions of multiple
variables subjected to equality constraints using the method of constrained variation and the
method of Lagrange multipliers.
Constrained optimization
A function of multiple variables, f(x), is to be optimized subject to one or more equality
constraints of many variables. These equality constraints, g
j
(x), may or may not be linear. The
problem statement is as follows:
Maximize (or minimize) f(X), subject to g
j
(X) = 0, j = 1, 2, … , m
where
1
2
n
x
x
X
x
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
M
with the condition that ; or else if m > n then the problem becomes an over defined one
and there will be no solution. Of the many available methods, the method of constrained
variation and the method using Lagrange multipliers are discussed.
m n ≤
Solution by method of Constrained Variation
For the optimization problem defined above, let us consider a specific case with n = 2 and
m=1 before we proceed to find the necessary and sufficient conditions for a general problem
using Lagrange multipliers. The problem statement is as follows:
Minimize f(x
1
,x
2
), subject to g(x
1
,x
2
) = 0
For f(x
1
,x
2
) to have a minimum at a point X* = [x
1
*,x
2
*], a necessary condition is that the
total derivative of f(x
1
,x
2
) must be zero at [x
1
*,x
2
*].
1 2
1 2
0
f f
df dx dx
x x
∂ ∂
= + =
∂ ∂
(1)
D Nagesh Kumar, IISc, Bangalore
M2L4
Optimization Methods: Optimization using Calculus  Equality constraints 2
Since g(x
1
*,x
2
*) = 0 at the minimum point, variations dx
1
and dx
2
about the point [x
1
*, x
2
*]
must be admissible variations, i.e. the point lies on the constraint:
g(x
1
* + dx
1
, x
2
* + dx
2
) = 0 (2)
assuming dx
1
and dx
2
are small the Taylor series expansion of this gives us
1 1 2 2 1 2 1 2 1 1 2 2
1 2
( * , * ) ( *, *) (x *,x *) (x *,x *) 0
g g
g x dx x dx g x x dx dx
x x
∂ ∂
+ + = + +
∂ ∂
= (3)
or
1 2
1 2
0
g g
dg dx dx
x x
∂ ∂
= +
∂ ∂
=
0
at [x
1
*,x
2
*] (4)
which is the condition that must be satisfied for all admissible variations.
Assuming (4)
2
/ g x ∂ ∂ ≠
can be rewritten as
1
2 1
2
/
( *, *)
/
g x
dx x x dx
g x
2 1
∂ ∂
= −
∂ ∂
(5)
which indicates that once variation along x
1
(d x
1
) is chosen arbitrarily, the variation along x
2
(d x
2
) is decided automatically to satisfy the condition for the admissible variation.
Substituting equation (5)
in
(1)we have:
1 2
1
1
1 2 2
(x *, x *)
/
0
/
g x f f
df dx
x g x x
⎛ ⎞
∂ ∂ ∂ ∂
= − =
⎜ ⎟
∂ ∂ ∂ ∂
⎝ ⎠
(6)
The equation on the left hand side is called the constrained variation of f. Equation (5)
has to
be satisfied for all dx
1
, hence we have
1 2
1 2 2 1
(x *, x *)
0
f g f g
x x x x
⎛ ⎞
∂ ∂ ∂ ∂
− =
⎜ ⎟
∂ ∂ ∂ ∂
⎝ ⎠
(7)
This gives us the necessary condition to have [x
1
*, x2*] as an extreme point (maximum or
minimum)
Solution by method of Lagrange multipliers
Continuing with the same specific case of the optimization problem with n = 2 and m = 1 we
define a quantityλ , called the Lagrange multiplier as
1 2
2
2
(x *, x *)
/
/
f x
g x
λ
∂ ∂
= −
∂ ∂
(8)
Using this in (6)
D Nagesh Kumar, IISc, Bangalore
M2L4
Optimization Methods: Optimization using Calculus  Equality constraints 3
1 2
1 1
(x *, x *)
0
f g
x x
λ
⎛ ⎞
∂ ∂
+ =
⎜ ⎟
∂ ∂
⎝ ⎠
(9)
And (8) written as
1 2
2 2
(x *, x *)
0
f g
x x
λ
⎛ ⎞
∂ ∂
+ =
⎜ ⎟
∂ ∂
⎝ ⎠
(10)
Also, the constraint equation has to be satisfied at the extreme point
1 2
1 2
( *, *)
( , ) 0
x x
g x x = (11)
Hence equations (9) to (11) represent the necessary conditions for the point [x
1
*, x2*] to be
an extreme point.
Note that λ could be expressed in terms of
1
/ g x ∂ ∂ as well and
1
/ g x ∂ ∂ has to be nonzero.
Thus, these necessary conditions require that at least one of the partial derivatives of g(x
1
, x
2
)
be nonzero at an extreme point.
The conditions given by equations (9) to (11) can also be generated by constructing a
function L, known as the Lagrangian function, as
1 2 1 2 1 2
( , , ) ( , ) ( , ) L x x f x x g x x λ λ = + (12)
Alternatively, treating L as a function of x
1
,x
2
and λ , the necessary conditions for its
extremum are given by
1 2 1 2 1 2
1 1 1
1 2 1 2 1 2
2 2 2
1 2 1 2
( , , ) ( , ) ( , ) 0
( , , ) ( , ) ( , ) 0
( , , ) ( , ) 0
L f g
x x x x x x
x x x
L f g
x x x x x x
x x x
L
x x g x x
λ λ
λ λ
λ
λ
∂ ∂ ∂
= + =
∂ ∂ ∂
∂ ∂ ∂
= +
∂ ∂ ∂
∂
= =
∂
= (13)
The necessary and sufficient conditions for a general problem are discussed next.
Necessary conditions for a general problem
For a general problem with n variables and m equality constraints the problem is defined as
shown earlier
Maximize (or minimize) f(X), subject to g
j
(X) = 0, j = 1, 2, … , m
where
1
2
n
x
x
x
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
X
M
D Nagesh Kumar, IISc, Bangalore
M2L4
Optimization Methods: Optimization using Calculus  Equality constraints 4
In this case the Lagrange function, L, will have one Lagrange multiplier
j
λ for each constraint
as (X)
j
g
1 2 , 1 2 1 1 2 2
( , ,..., , ,..., ) ( ) ( ) ( ) ... ( )
n m m m
L x x x f g g g λ λ λ λ λ λ = + + + + X X X X
m
(14)
L is now a function of n + m unknowns,
1 2 , 1 2
, ,..., , ,...,
n
x x x λ λ λ , and the necessary conditions
for the problem defined above are given by
1
( ) ( ) 0, 1, 2,..., 1, 2,...,
( ) 0, 1, 2,...,
m
j
j
j
i i i
j
j
g
L f
i n j
x x x
L
g j m
λ
λ
=
∂
∂ ∂
= + = = =
∂ ∂ ∂
∂
= = =
∂
∑
X X
X
m
(15)
which represent n + m equations in terms of the n + m unknowns, x
i
and
j
λ . The solution to
this set of equations gives us
1
2
*
*
*
n
x
x
x
⎧ ⎫
⎪ ⎪
⎪
=
⎨
⎪ ⎪
⎪ ⎪
⎩ ⎭
X
M
⎪
⎬
and
1
2
*
*
*
*
m
λ
λ
λ
λ
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
M
(16)
The vector X corresponds to the relative constrained minimum of f(X) (subject to the
verification of sufficient conditions).
Sufficient conditions for a general problem
A sufficient condition for f(X) to have a relative minimum at X* is that each root of the
polynomial in ∈, defined by the following determinant equation be positive.
11 12 1 11 21 1
21 22 2 12 22 2
1 2 1 2
11 12 1
21 22 2
1 2
0
0 0
0 0
n m
n m
n n nn n n mn
n
n
m m mn
L L L g g g
L L L g g g
L L L g g g
g g g
g g g
g g g
−∈
−∈
−∈
=
L L
M O M M O M
L L
L L L
M O M
M O M M M
L L L
(17)
D Nagesh Kumar, IISc, Bangalore
M2L4
Optimization Methods: Optimization using Calculus  Equality constraints 5
where
2
( *, *), for 1, 2,..., 1, 2,...,
( *), where 1, 2,..., and 1, 2,...,
ij
i j
p
pq
q
L
L i n j
x x
g
g p m
x
λ
∂
= =
∂ ∂
∂
= =
∂
X
X
m
q n
=
=
2
(18)
Similarly, a sufficient condition for f(X) to have a relative maximum at X* is that each root of
the polynomial in ∈, defined by equation (17)
be negative. If equation (17), on solving yields
roots, some of which are positive and others negative, then the point X* is neither a
maximum nor a minimum.
Example
Minimize
2 2
1 1 2 2 1
( ) 3 6 5 7 5 f x x x x x = − − − + + X x
Subject to
1 2
5 x x + =
Solution
1 1 2
( ) 5 0 g x x = + − = X
1 2 , 1 2 1 1 2 2
( , ,..., , ,..., ) ( ) ( ) ( ) ... ( )
n m m m
x x x f g g g λ λ λ λ λ λ = + + + + L X X X X
)
with n = 2 and m = 1
L =
2 2
1 1 2 2 1 2 1 1 2
3 6 5 7 5 ( 5 x x x x x x x x λ − − − + + + + −
1 2 1
1
1 2 1
1
6 6 7
1
(7 )
6
1
5 (7 )
6
x x
x
x x
λ
λ
λ
∂
0 = − − + + =
∂
=> + = +
=> = +
L
or
1
23 λ =
1 2 1
2
1 2 1
1 2 2 1
6 10 5 0
1
3 5 (5 )
2
1
3( ) 2 (5 )
2
x x
x
x x
x x x
λ
λ
λ
∂
= − − + + =
∂
=> + = +
=> + + = +
L
D Nagesh Kumar, IISc, Bangalore
M2L4
Optimization Methods: Optimization using Calculus  Equality constraints 6
2
1
2
x
−
=
and,
1
11
2
x =
Hence
[ ]
1 11
* , ; * 2
2 2
−
⎡ ⎤
= =
⎢ ⎥
⎣ ⎦
X λ 3
11 12 11
21 22 21
11 12
0
0
L L g
L L g
g g
−∈
⎛ ⎞
⎜ ⎟
−∈ =
⎜ ⎟
⎜ ⎟
⎝ ⎠
2
11
2
1
( )
6 L
x
∂
= =
∂
X*,λ*
L
−
2
12 21
1 2
( )
6 L L
x x
∂
= = = −
∂ ∂
X*,λ*
L
2
22
2
2
( )
10 L
x
∂
= =
∂
X*,λ*
L
−
1
11
1
( )
1
12 21
2
( )
1
1
g
g
x
g
g g
x
∂
= =
∂
∂
= = =
∂
X*,λ*
X*,λ*
The determinant becomes
6 6 1
6 10 1
1 1 0
− −∈ −
⎛ ⎞
⎜ ⎟
0 − − −∈ =
⎜ ⎟
⎜ ⎟
⎝ ⎠
or
( 6 )[ 1] ( 6)[ 1] 1[ 6 10 ] 0
2
− −∈ − − − − + − + +∈ =
=>∈= −
Since ∈ is negative, X*, correspond to a maximum. * λ
D Nagesh Kumar, IISc, Bangalore
M2L4
D Nagesh Kumar, IISc Optimization Methods: M2L4
1
Optimization using Calculus
Optimization of Functions of
Multiple Variables subject to
Equality Constraints
D Nagesh Kumar, IISc Optimization Methods: M2L4
2
Objectives
¾ Optimization of functions of multiple variables
subjected to equality constraints using
¾ the method of constrained variation, and
¾ the method of Lagrange multipliers.
D Nagesh Kumar, IISc Optimization Methods: M2L4
3
Constrained optimization
A function of multiple variables, f(x), is to be optimized subject to one or
more equality constraints of many variables. These equality constraints,
g
j
(x), may or may not be linear. The problem statement is as follows:
Maximize (or minimize) f(X), subject to g
j
(X) = 0, j = 1, 2, …, m
where
1
2
n
x
x
x
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
X
M
D Nagesh Kumar, IISc Optimization Methods: M2L4
4
Constrained optimization (contd.)
¾ With the condition that ; or else if m > n then the problem
becomes an over defined one and there will be no solution. Of the
many available methods, the method of constrained variation and the
method of using Lagrange multipliers are discussed.
m n ≤
D Nagesh Kumar, IISc Optimization Methods: M2L4
5
Solution by method of Constrained
Variation
z For the optimization problem defined above, let us consider a specific
case with n = 2 and m = 1 before we proceed to find the necessary and
sufficient conditions for a general problem using Lagrange
multipliers. The problem statement is as follows:
Minimize f(x
1
,x
2
), subject to g(x
1
,x
2
) = 0
z For f(x
1
,x
2
) to have a minimum at a point X
*
= [x
1
*
,x
2
*
], a necessary
condition is that the total derivative of f(x
1
,x
2
) must be zero at [x
1
*
,x
2
*
].
(1)
1 2
1 2
0
f f
df dx dx
x x
∂ ∂
= + =
∂ ∂
D Nagesh Kumar, IISc Optimization Methods: M2L4
6
Method of Constrained Variation (contd.)
z Since g(x
1
*
,x
2
*
) = 0 at the minimum point, variations dx
1
and dx
2
about
the point [x
1
*
, x
2
*
] must be admissible variations, i.e. the point lies on
the constraint:
g(x
1
*
+ dx
1
, x
2
*
+ dx
2
) = 0 (2)
assuming dx
1
and dx
2
are small the Taylor series expansion of this
gives us
(3)
*
1 1 2 2
* * * * * *
1 2 1 2 1 1 2 2
1 2
( * , )
( , ) (x ,x ) (x ,x ) 0
g x dx x dx
g g
g x x dx dx
x x
+ +
∂ ∂
= + + =
∂ ∂
D Nagesh Kumar, IISc Optimization Methods: M2L4
7
Method of Constrained Variation (contd.)
or at [x
1
*
,x
2
*
] (4)
which is the condition that must be satisfied for all admissible
variations.
Assuming , (4) can be rewritten as
(5)
1 2
1 2
0
g g
dg dx dx
x x
∂ ∂
= + =
∂ ∂
2
/ 0 g x ∂ ∂ ≠
* *
1
2 1 2 1
2
/
( , )
/
g x
dx x x dx
g x
∂ ∂
= −
∂ ∂
D Nagesh Kumar, IISc Optimization Methods: M2L4
8
Method of Constrained Variation (contd.)
(5) indicates that once variation along x
1
(dx
1
) is chosen arbitrarily, the variation
along x
2
(dx
2
) is decided automatically to satisfy the condition for the admissible
variation. Substituting equation (5) in (1) we have:
(6)
The equation on the left hand side is called the constrained variation of f. Equation
(5) has to be satisfied for all dx
1
, hence we have
(7)
This gives us the necessary condition to have [x
1
*
, x
2
*
] as an extreme point
(maximum or minimum)
* *
1 2
1
1
1 2 2
(x , x )
/
0
/
f g x f
df dx
x g x x
⎛ ⎞
∂ ∂ ∂ ∂
= − =
⎜ ⎟
∂ ∂ ∂ ∂
⎝ ⎠
* *
1 2
1 2 2 1
(x , x )
0
f g f g
x x x x
⎛ ⎞
∂ ∂ ∂ ∂
− =
⎜ ⎟
∂ ∂ ∂ ∂
⎝ ⎠
D Nagesh Kumar, IISc Optimization Methods: M2L4
9
Solution by method of Lagrange
multipliers
Continuing with the same specific case of the optimization problem
with n = 2 and m = 1 we define a quantity λ, called the Lagrange
multiplier as
(8)
Using this in (5)
(9)
And (8) written as
(10)
* *
1 2
2
2
(x , x )
/
/
f x
g x
λ
∂ ∂
= −
∂ ∂
* *
1 2
1 1
(x , x )
0
f g
x x
λ
⎛ ⎞
∂ ∂
+ =
⎜ ⎟
∂ ∂
⎝ ⎠
* *
1 2
2 2
(x , x )
0
f g
x x
λ
⎛ ⎞
∂ ∂
+ =
⎜ ⎟
∂ ∂
⎝ ⎠
D Nagesh Kumar, IISc Optimization Methods: M2L4
10
Solution by method of Lagrange
multipliers…contd.
Also, the constraint equation has to be satisfied at the extreme point
(11)
Hence equations (9) to (11) represent the necessary conditions for the
point [x
1
*, x
2
*] to be an extreme point.
Note that λ could be expressed in terms of as well and
has to be nonzero.
Thus, these necessary conditions require that at least one of the partial
derivatives of g(x
1
, x
2
) be nonzero at an extreme point.
* *
1 2
1 2
( , )
( , ) 0
x x
g x x =
1
/ g x ∂ ∂
1
/ g x ∂ ∂
D Nagesh Kumar, IISc Optimization Methods: M2L4
11
Solution by method of Lagrange
multipliers…contd.
The conditions given by equations (9) to (11) can also be generated by
constructing a functions L, known as the Lagrangian function, as
(12)
Alternatively, treating L as a function of x
1
,x
2
and λ, the necessary
conditions for its extremum are given by
(13)
1 2 1 2 1 2
( , , ) ( , ) ( , ) L x x f x x g x x λ λ = +
1 2 1 2 1 2
1 1 1
1 2 1 2 1 2
2 2 2
( , , ) ( , ) ( , ) 0
( , , ) ( , ) ( , ) 0
( , , ) ( , ) 0
L f g
x x x x x x
x x x
L f g
x x x x x x
x x x
L
x x g x x
λ λ
λ λ
λ
1 2 1 2
λ
∂ ∂ ∂
= + =
∂ ∂ ∂
∂ ∂ ∂
= + =
∂ ∂ ∂
∂
= =
∂
D Nagesh Kumar, IISc Optimization Methods: M2L4
12
Necessary conditions for a general
problem
For a general problem with n variables and m equality constraints the
problem is defined as shown earlier
Maximize (or minimize) f(X), subject to g
j
(X) = 0, j = 1, 2, …, m
where
In this case the Lagrange function, L, will have
one Lagrange multiplier λ
j
for each constraint
as
(14)
1 2 , 1 2 1 1 2 2
( , ,..., , ,..., ) ( ) ( ) ( ) ... ( )
n m m m
L x x x f g g g λ λ λ λ λ λ = + + + + X X X X
1
2
n
x
x
x
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
X
M
D Nagesh Kumar, IISc Optimization Methods: M2L4
13
Necessary conditions for a general
problem…contd.
L is now a function of n + m unknowns, , and the
necessary conditions for the problem defined above are given by
(15)
which represent n + m equations in terms of the n + m unknowns, x
i
and λ
j
.
The solution to this set of equations gives us
(16)
and
1 2 , 1 2
, ,..., , ,...,
n m
x x x λ λ λ
1
( ) ( ) 0, 1, 2,..., 1, 2,...,
( ) 0, 1, 2,...,
m
j
j
j
i i i
j
j
g
L f
i n j m
x x x
L
g j m
λ
λ
=
∂
∂ ∂
= + = = =
∂ ∂ ∂
∂
= = =
∂
∑
X X
X
*
1
*
2
*
n
x
x
x
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
X
M
*
1
*
* 2
*
m
λ
λ
λ
λ
⎧ ⎫
⎪ ⎪
⎪ ⎪
=
⎨ ⎬
⎪ ⎪
⎪ ⎪
⎩ ⎭
M
D Nagesh Kumar, IISc Optimization Methods: M2L4
14
Sufficient conditions for a general problem
A sufficient condition for f(X) to have a relative minimum at X
*
is that each
root of the polynomial in Є, defined by the following determinant equation
be positive.
(17)
11 12 1 11 21 1
21 22 2 12 22 2
1 2 1 2
11 12 1
21 22 2
1 2
0
0 0
0 0
n m
n m
n n nn n n mn
n
n
m m mn
L L L g g g
L L L g g g
L L L g g g
g g g
g g g
g g g
−∈
−∈
−∈
=
L L
M O M M O M
L L
L L L
M O M
M O M M M
L L L
D Nagesh Kumar, IISc Optimization Methods: M2L4
15
Sufficient conditions for a general
problem…contd.
where
(18)
Similarly, a sufficient condition for f(X) to have a relative maximum at X
*
is that each root of the polynomial in Є, defined by equation (17) be
negative.
If equation (17), on solving yields roots, some of which are positive and
others negative, then the point X
*
is neither a maximum nor a minimum.
2
* *
*
( , ), for 1, 2,..., 1, 2,...,
( ), where 1, 2,..., and 1, 2,...,
ij
i j
p
pq
q
L
L i n and j m
x x
g
g p m q
x
λ
∂
= = =
∂ ∂
∂
= = =
∂
X
X n
D Nagesh Kumar, IISc Optimization Methods: M2L4
16
Example
Minimize , Subject to
or
2 2
1 1 2 2 1 2
( ) 3 6 5 7 5 f x x x x x x = − − − + + X
1 2
5 x x + =
1 2 1
2
1 2 1
1 2 2 1
6 10 5 0
1
3 5 (5 )
2
1
3( ) 2 (5 )
2
x x
x
x x
x x x
λ
λ
λ
∂
= − − + + =
∂
=> + = +
=> + + = +
L
2
1
2
x
−
=
1
11
2
x =
[ ]
1 11
* , ; * 23
2 2
−
⎡ ⎤
= =
⎢ ⎥
⎣ ⎦
X λ
11 12 11
21 22 21
11 12
0
0
L L g
L L g
g g
−∈
⎛ ⎞
⎜ ⎟
−∈ =
⎜ ⎟
⎜ ⎟
⎝ ⎠
D Nagesh Kumar, IISc Optimization Methods: M2L4
19
Thank you
Optimization Methods: Optimization using Calculus – KuhnTucker Conditions 1
Module  2 Lecture Notes – 5
KuhnTucker Conditions
Introduction
In the previous lecture the optimization of functions of multiple variables subjected to
equality constraints using the method of constrained variation and the method of Lagrange
multipliers was dealt. In this lecture the KuhnTucker conditions will be discussed with
examples for a point to be a local optimum in case of a function subject to inequality
constraints.
KuhnTucker Conditions
It was previously established that for both an unconstrained optimization problem and an
optimization problem with an equality constraint the firstorder conditions are sufficient for a
global optimum when the objective and constraint functions satisfy appropriate
concavity/convexity conditions. The same is true for an optimization problem with inequality
constraints.
The KuhnTucker conditions are both necessary and sufficient if the objective function is
concave and each constraint is linear or each constraint function is concave, i.e. the problems
belong to a class called the convex programming problems.
Consider the following optimization problem:
Minimize f(X) subject to g
j
(X) ≤ 0 for j = 1,2,…,p ; where X = [x
1
x
2
. . . x
n
]
Then the KuhnTucker conditions for X
*
= [x
1
*
x
2
*
. . . x
n
*
] to be a local minimum are
1
0 1, 2,...,
0 1, 2,...,
0 1, 2,...,
0 1, 2,...,
m
j
j
i i
j j
j
j
f g
i n
x x
g j
g j
m
m
j m
λ
λ
λ
=
∂ ∂
+ = =
∂ ∂
= =
≤ =
≥ =
∑
(1)
D Nagesh Kumar, IISc, Bangalore
M2L5
Optimization Methods: Optimization using Calculus – KuhnTucker Conditions 2
In case of minimization problems, if the constraints are of the form g
j
(X) 0, then ≥
j
λ have
to be nonpositive in (1)
.
On the other hand, if the problem is one of maximization with the
constraints in the form g
j
(X) ≥ 0, then
j
λ have to be nonnegative.
It may be noted that sign convention has to be strictly followed for the KuhnTucker
conditions to be applicable.
Example 1
Minimize
2 2
1 2
2 3
2
3
f x x x = + + subject to the constraints
1 1 2 3
2 1 2 3
2 1
2 3
g x x x
g x x x
= − − ≤
= + − ≤
2
8
using KuhnTucker conditions.
Solution:
The KuhnTucker conditions are given by
a)
1 2
1 2
0
i i i
g g f
x x x
λ λ
∂ ∂ ∂
+ + =
∂ ∂ ∂
i.e.
1 1 2
2 1 2
3 1 2
2 0 (2)
4 2 0 (3)
6 2 3 0
x
x
x
λ λ
λ λ
λ λ
+ + =
− + =
− − = (4)
b) 0
j j
g λ =
i.e.
1 1 2 3
2 1 2 3
( 2 12) 0 (5)
( 2 3 8) 0 (6)
x x x
x x x
λ
λ
− − − =
+ − − =
c) 0
j
g ≤
D Nagesh Kumar, IISc, Bangalore
M2L5
Optimization Methods: Optimization using Calculus – KuhnTucker Conditions 3
i.e.,
1 2 3
1 2 3
2 12 0 (7)
2 3 8 0 (8)
x x x
x x x
− − − ≤
+ − − ≤
d) 0
j
λ ≥
i.e.,
1
2
0 (9)
0 (10)
λ
λ
≥
≥
From (5) either
1
λ = 0 or,
1 2 3
2 12 x x x − − − = 0
Case 1:
1
λ = 0
From (2), (3) and (4) we have x
1
= x
2
=
2
/ 2 λ − and x
3
=
2
/ 2 λ .
Using these in (6) we get
2
2 2 2
8 0, 0 or λ λ λ + = ∴ = −8
From (10),
2
0 λ ≥ , therefore,
2
λ =0, X
*
= [ 0, 0, 0 ], this solution set satisfies all of (6) to (9)
Case 2:
1 2 3
2 12 0 x x x − − − =
Using (2), (3) and (4), we have
1 2 1 2 1 2
2 2 3
12 0
2 4 3
λ λ λ λ λ λ − − − +
− − − = or,
1 2
17 12 144 λ λ + = − . But conditions (9)
and (10) give us
1
0 λ ≥ and
2
0 λ ≥ simultaneously,
which cannot be possible with
1 2
17 12 144 λ λ + = − .
Hence the solution set for this optimization problem is X
*
= [ 0 0 0 ]
D Nagesh Kumar, IISc, Bangalore
M2L5
Optimization Methods: Optimization using Calculus – KuhnTucker Conditions 4
Example 2
Minimize
2 2
1 2
60
1
f x x x = + + subject to the constraints
1 1
2 1 2
80 0
120 0
g x
g x x
= − ≥
= + − ≥
using KuhnTucker conditions.
Solution
The KuhnTucker conditions are given by
a)
3 1 2
1 2 3
0
i i i i
g g g f
x x x x
λ λ λ
∂ ∂ ∂ ∂
+ + + =
∂ ∂ ∂ ∂
i.e.
1 1 2
2 2
2 60 0 (11)
2 0 (12)
x
x
λ λ
λ
+ + + =
+ =
b) 0
j j
g λ =
i.e.
1 1
2 1 2
( 120) 0 (14) x x
( 80) 0 (13) x λ
λ + − =
− =
80 0 (15) x − ≥
c) 0
j
g ≤
i.e.,
1
1 2
120 0 (16) x x + + ≥
d) 0
j
λ ≤
i.e.,
D Nagesh Kumar, IISc, Bangalore
M2L5
Optimization Methods: Optimization using Calculus – KuhnTucker Conditions 5
1
2
0 (17)
0 (18)
λ
λ
≤
≤
From (13) either
1
λ = 0 or,
1
( 80) 0 x − =
Case 1:
1
λ = 0
From (11) and (12) we have
2
1
30
2
x
λ
= − − and
2
2
2
x
λ
= −
Using these in (14) we get ;
( )
2 2
150 0 λ λ − =
2
0 150 or λ ∴ = −
Considering
2
0 λ = , X
*
= [ 30, 0].
But this solution set violates (15) and (16)
For
2
150 λ = − , X
*
= [ 45, 75].
But this solution set violates (15) .
Case 2:
1
80) 0 x − = (
Using in (11) and (12), we have
1
80 x =
2 2
1 2
2
2 220 (19)
x
x
λ
λ
= −
= −
Substitute (19) in (14), we have
( )
2 2
2 40 x x − − 0 =
0 =
.
For this to be true, either
2 2
0 40 x or x = −
For ,
2
0 x =
1
220 λ = − . This solution set violates (15) and (16)
D Nagesh Kumar, IISc, Bangalore
M2L5
Optimization Methods: Optimization using Calculus – KuhnTucker Conditions 6
For ,
2
40 0 x − =
1 2
140 80 and λ λ = − = − . This solution set is satisfying all equations from
(15) to (19) and hence the desired. Therefore, the solution set for this optimization problem
is X
*
= [ 80 40 ].
References / Further Reading:
1. Rao S.S., Engineering Optimization – Theory and Practice, Third Edition, New Age
International Limited, New Delhi, 2000.
2. Ravindran A., D.T. Phillips and J.J. Solberg, Operations Research – Principles and
Practice, John Wiley & Sons, New York, 2001.
3. Taha H.A., Operations Research – An Introduction, PrenticeHall of India Pvt. Ltd., New
Delhi, 2005.
4. Vedula S., and P.P. Mujumdar, Water Resources Systems: Modelling Techniques and
Analysis, Tata McGraw Hill, New Delhi, 2005.
D Nagesh Kumar, IISc, Bangalore
M2L5
D Nagesh Kumar, IISc Optimization Methods: M2L5
1
Optimization using Calculus
KuhnTucker
Conditions
D Nagesh Kumar, IISc Optimization Methods: M2L5
2
Introduction
Optimization with multiple decision variables and equality
constraint : Lagrange Multipliers.
Optimization with multiple decision variables and inequality
constraint : KuhnTucker (KT) conditions
KT condition: Both necessary and sufficient if the objective
function is concave and each constraint is linear or each constraint
function is concave, i.e. the problems belongs to a class called the
convex programming problems.
D Nagesh Kumar, IISc Optimization Methods: M2L5
3
Kuhn Tucker Conditions: Optimization
Model
Consider the following optimization problem
Minimize f(X)
subject to
g
j
(X) 0 for j=1,2,…,p
where the decision variable vector
X=[x
1
,x
2
,…,x
n
]
≤
D Nagesh Kumar, IISc Optimization Methods: M2L5
4
Kuhn Tucker Conditions
1
0 1, 2,...,
0 1, 2,...,
0 1, 2,...,
0 1, 2,...,
m
j
j
i i
j j
j
j
f g
i n
x x
g j m
g j m
j m
λ
λ
λ
=
∂ ∂
+ = =
∂ ∂
= =
≤ =
≥ =
∑
KuhnTucker conditions for X
*
= [x
1
*
x
2
*
. . . x
n
*
] to be a local minimum are
D Nagesh Kumar, IISc Optimization Methods: M2L5
5
Kuhn Tucker Conditions …contd.
j
λ
In case of minimization problems, if the constraints are
of the form g
j
(X) 0, then have to be nonpositive
On the other hand, if the problem is one of maximization
with the constraints in the form g
j
(X) 0, then have to
be nonnegative.
≥
j
λ
≥
D Nagesh Kumar, IISc Optimization Methods: M2L5
6
Example (1)
Minimize
subject to
2 2 2
1 2 3
2 3 f x x x = + +
1 1 2 3
2 1 2 3
2 12
2 3 8
g x x x
g x x x
= − − ≤
= + − ≤
D Nagesh Kumar, IISc Optimization Methods: M2L5
7
Example (1) …contd.
1 2
1 2
0
i i i
g g f
x x x
λ λ
∂ ∂ ∂
+ + =
∂ ∂ ∂
1 1 2
2 1 2
3 1 2
2 0 (2)
4 2 0 (3)
6 2 3 0 (4)
x
x
x
λ λ
λ λ
λ λ
+ + =
− + =
− − =
0
j j
g λ = 1 1 2 3
2 1 2 3
( 2 12) 0 (5)
( 2 3 8) 0 (6)
x x x
x x x
λ
λ
− − − =
+ − − =
0
j
g ≤
1 2 3
1 2 3
2 12 0 (7)
2 3 8 0 (8)
x x x
x x x
− − − ≤
+ − − ≤
0
j
λ ≥
1
2
0 (9)
0 (10)
λ
λ
≥
≥
Kuhn – Tucker Conditions
D Nagesh Kumar, IISc Optimization Methods: M2L5
8
Example (1) …contd.
From (5) either = 0 or ,
Case 1
¾ From (2), (3) and (4) we have x
1
= x
2
= and x
3
=
¾ Using these in (6) we get
¾ From (10), , therefore, =0,
¾ Therefore, X
*
= [ 0, 0, 0 ]
This solution set satisfies all of (6) to (9)
1
λ
1 2 3
2 12 0 x x x − − − =
2
/ 2 λ −
2
/ 2 λ
2
2 2 2
8 0, 0 8 or λ λ λ + = ∴ = −
2
0 λ ≥
2
λ
D Nagesh Kumar, IISc Optimization Methods: M2L5
9
Example (1) …contd.
Case 2:
¾ Using (2), (3) and (4), we have
or
¾ But conditions (9) and (10) give us and simultaneously,
which cannot be possible with
Hence the solution set for this optimization problem is X
*
= [ 0 0 0 ]
1 2 3
2 12 0 x x x − − − =
1 2 1 2 1 2
2 2 3
12 0
2 4 3
λ λ λ λ λ λ − − − +
− − − =
1 2
17 12 144 λ λ + = −
1
0 λ ≥
2
0 λ ≥
1 2
17 12 144 λ λ + = −
D Nagesh Kumar, IISc Optimization Methods: M2L5
10
Example (2)
Minimize
subject to
2 2
1 2 1
60 f x x x = + +
1 1
2 1 2
80 0
120 0
g x
g x x
= − ≥
= + − ≥
D Nagesh Kumar, IISc Optimization Methods: M2L5
11
Example (2) …contd.
1 2
1 2
0
i i i
g g f
x x x
λ λ
∂ ∂ ∂
+ + =
∂ ∂ ∂
0
j j
g λ =
0
j
g ≤
0
j
λ ≥
Kuhn – Tucker Conditions
1 1 2
2 2
2 60 0 (11)
2 0 (12)
x
x
λ λ
λ
+ + + =
+ =
1 1
2 1 2
( 80) 0 (13)
( 120) 0 (14)
x
x x
λ
λ
− =
+ − =
1
1 2
80 0 (15)
120 0 (16)
x
x x
− ≥
+ + ≥
1
2
0 (17)
0 (18)
λ
λ
≤
≤
D Nagesh Kumar, IISc Optimization Methods: M2L5
12
Example (2) …contd.
From (13) either = 0 or ,
Case 1
¾ From (11) and (12) we have and
¾ Using these in (14) we get
¾ Considering , X
*
= [ 30, 0]. But this solution set violates (15)
and (16)
¾ For , X
*
= [ 45, 75]. But this solution set violates (15)
1
λ
1
( 80) 0 x − =
2
1
30
2
x
λ
= − −
2
2
2
x
λ
= −
( )
2 2
150 0 λ λ − =
2
0 150 or λ ∴ = −
2
0 λ =
2
150 λ = −
D Nagesh Kumar, IISc Optimization Methods: M2L5
13
Example (2) …contd.
Case 2:
¾ Using in (11) and (12), we have
¾ Substitute (19) in (14), we have
¾ For this to be true, either
1
( 80) 0 x − =
1
80 x =
2 2
1 2
2
2 220 (19)
x
x
λ
λ
= −
= −
( )
2 2
2 40 0 x x − − =
2 2
0 40 0 x or x = − =
D Nagesh Kumar, IISc Optimization Methods: M2L5
14
Example (2) …contd.
¾ For ,
¾ This solution set violates (15) and (16)
¾ For ,
¾ This solution set is satisfying all equations from (15) to (19) and hence
the desired
¾ Thus, the solution set for this optimization problem is X
*
= [ 80 40 ].
2
0 x =
1
220 λ = −
2
40 0 x − =
1 2
140 80 and λ λ = − = −
D Nagesh Kumar, IISc Optimization Methods: M2L5
15
Thank you
Optimization Methods: Linear Programming Learning Objectives
Module 3: Linear Programming
Learning Objectives
It was discussed in module 2 that optimization methods using calculus have several
limitations and thus not suitable for many practical applications. Most widely used
optimization method is linear programming which is the main objective of this module. The
characteristics of linear programming problem (LPP) and also different techniques to solve
LPP are introduced.
The module starts with the definition of LPP, underlying assumptions and elementary
operations. Illustration of graphical method will help to conceive the idea behind the solution
of LPP. This will also help the reader to visualize the overall concept though explained for
only two decisions variables. Once the concept becomes clear, theoretical as well as logical
approach of most popularly used simplex method will be explained. Discussion on revised
simplex method, duality in LPP, PrimalDual relation, Dual simplex method and sensitivity or
postoptimality analysis will help the reader to understand the practical application of LPP.
Among the other algorithms for solving LP problems, Karmakar’s projective scaling method
will be outlined.
At the end of the module the reader will be able to
1. Formulate the LPP.
2. Conceptualize the feasible region.
3. Solve the LPP with two variables using graphical method.
4. Solve the LPP using simplex method.
5. Formulate the dual problem from primal.
6. Analyse the sensitivity of a decision variable.
7. Run and analyse the results of user friendly software for LPP.
D Nagesh Kumar, IISc, Bangalore M3LO
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
1
M3L1
Module – 3 Lecture Notes – 1
Preliminaries
Introduction
Linear Programming (LP) is the most useful optimization technique used for the solution of
engineering problems. The term ‘linear’ implies that the objective function and constraints
are ‘linear’ functions of ‘nonnegative’ decision variables. Thus, the conditions of LP
problems (LPP) are
1. Objective function must be a linear function of decision variables
2. Constraints should be linear function of decision variables
3. All the decision variables must be nonnegative
For example,
Condition ity Nonnegativ 0 ,
Constraint 3rd 15 4
Constraint 2nd 11 3
Constraint 1st 5 3 2 to subject
Function Objective 5 6 Maximize
π
π
π
π
π
≥
≤ +
≤ +
≤ −
+ =
y x
y x
y x
y x
y x Z
is an example of LP problem. However, example shown above is in “general” form.
Standard form of LPP
Standard form of LPP must have following three characteristics:
1. Objective function should be of maximization type
2. All the constraints should of equality type
3. All the decision variables should be nonnegative
The procedure to transform a general form of a LPP to its standard form is discussed below.
Let us consider the following example.
1 2
1 2
1 2
1 2
1
2
Minimize 3 5
subject to 2 3 15
3
4 2
0
unrestricted
Z x x
x x
x x
x x
x
x
=− −
− ≤
+ ≤
+ ≥
≥
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
2
M3L1
The above LPP is violating the following criteria of standard form:
1. Objective function is of minimization type
2. Constraints are of inequality type
3. Decision variable
2
x is unrestricted, i.e., it can take negative values also, thus
violating the nonnegativity criterion.
However, a standard form for this LPP can be obtained by transforming it as follows:
Objective function can be rewritten as
2 1
5 3 Maximize x x Z Z + = − = ′
The first constraint can be rewritten as: 15 3 2
3 2 1
= + − x x x . Note that, a new nonnegative
variable x
3
is added to the lefthandside (LHS) to make both sides equal. Similarly, the
second constraint can be rewritten as: 3
4 2 1
= + + x x x . The variables x
3
and x
4
are known as
slack variables. The third constraint can be rewritten as: 2 4
5 2 1
= − + x x x . Again, note that a
new nonnegative variable
5
x is subtracted form the LHS to make both sides equal. The
variable x
5
is known as surplus variable.
Decision variable x
2
can expressed by introducing two extra nonnegative variables as
2 2 2
x x x ′ ′ − ′ =
Thus,
2
x can be negative if
2 2
x x ′ ′ < ′ and positive if
2 2
x x ′ ′ > ′ depending on the values of
2 2
and x x ′ ′ ′ .
2
x can be zero also if
2 2
x x ′ ′ = ′ .
Thus, the standard form of above LPP is as follows:
( )
( )
( )
( )
0 , , , , ,
2 4
3
15 3 2 to subject
5 3 Maximize
5 4 3 2 2 1
5 2 2 1
4 2 2 1
3 2 2 1
2 2 1
≥ ′ ′ ′
= − ′ ′ − ′ +
= + ′ ′ − ′ +
= + ′ ′ − ′ −
′ ′ − ′ + = − = ′
x x x x x x
x x x x
x x x x
x x x x
x x x Z Z
After obtaining solution for
2 2
and x x ′ ′ ′ , solution for
2
x can be obtained as,
2 2 2
x x x ′ ′ − ′ = .
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
3
M3L1
Canonical form of LPP
Canonical form of standard LPP is a set of equations consisting of the ‘objective function’
and all the ‘equality constraints’ (standard form of LPP) expressed in canonical form.
Understanding the canonical form of LPP is necessary for studying simplex method, the most
popular method of solving LPP. Simplex method will be discussed in some other class. In this
class, canonical form of a set of linear equations will be discussed first. Canonical form of
LPP will be discussed next.
Canonical form of a set of linear equations
Let us consider a set of three equations with three variables for ease of discussion. Later, the
method will be generalized.
Let us consider the following set of equations,
10 2 3 = + + z y x (A
0
)
6 3 2 = + − z y x (B
0
)
1 2 = − + z y x (C
0
)
The system of equations can be transformed in such a way that a new set of three different
equations are obtained, each having only one variable with nonzero coefficient. This can be
achieved by some elementary operations.
The following operations are known as elementary operations.
1. Any equation E
r
can be replaced by kE
r
, where k is a nonzero constant.
2. Any equation E
r
can be replaced by E
r
+ kE
s
, where E
s
is another equation of the
system and k is as defined above.
Note that the transformed set of equations through elementary operations is equivalent to the
original set of equations. Thus, solution of the transformed set of equations will be the
solution of the original set of equations too.
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
4
M3L1
Now, let us transform the above set of equation (A
0
, B
0
and C
0
) through elementary
operations (shown inside bracket in the right side).
3
10
3
1
3
2
= + + z y x (A
1
=
3
1
A
0
)
3
8
3
8
3
8
0 = + − z y (B
1
= B
0
– A
1
)
3
17
3
5
3
1
0 − = − − z y (C
1
= C
0
– 2 A
1
)
Note that variable x is eliminated from equations B
0
and C
0
to obtain B
1
and C
1
respectively.
Equation A
0
in the previous set is known as pivotal equation.
Following similar procedure, y is eliminated from A
1
and C
1
as follows, considering B
1
as
pivotal equation.
4 0 = + + z x (A
2
= A
1

3
2
B
2
)
1 0 − = − + z y (B
2
=
8
3
− B
1
)
6 2 0 0 − = − + z (C
2
= C
1
+
3
1
B
2
)
Finally, z is eliminated form A
2
and B
2
as follows, considering C
2
as pivotal equation.
1 0 0 = + + x (A
3
= A
2
– C
3
)
2 0 0 = + + y (B
3
= B
2
+ C
3
)
3 0 0 = + + z (C
3
=
2
1
− C
2
)
Thus we end up with another set of equations which is equivalent to the original set having
one variable in each equation. Transformed set of equations, (A
3
, B
3
and C
3
), thus obtained
are said to be in canonical form. Operation at each step to eliminate one variable at a time,
from all equations except one, is known as pivotal operation. It is obvious that the number of
pivotal operations is the same as the number of variables in the set of equations. Thus we did
three pivotal operations to obtain the canonical form of the set of equations having three
variables each.
It may be noted that, at each pivotal operation, the pivotal equation is transformed first and
using the transformed pivotal equation, other equations in the system are transformed. For
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
5
M3L1
example, while transforming, A
1
, B
1
and C
1
to A
2
, B
2
and C
2
, considering B
1
as pivotal
equation, B
2
is obtained first. A
2
and C
2
are then obtained using B
2
. Transformation can be
obtained by some other elementary operations also but will end up in the same canonical
form. The procedure explained above is used in simplex algorithm which will be discussed
later. The elementary operations involved in pivotal operations, as explained above, will help
the reader to follow the analogy while understanding the simplex algorithm.
To generalize the procedure explained above, let us consider the following system of n
equations with n variables.
) (
) (
) (
2 2 1 1
2 2 2 2 22 1 21
1 1 1 2 12 1 11
n n n nn n n
n n
n n
E b x a x a x a
E b x a x a x a
E b x a x a x a
= + + +
= + + +
= + + +
Λ Λ Λ
Μ Μ
Μ Μ
Λ Λ Λ
Λ Λ Λ
Canonical form of above system of equations can be obtained by performing n pivotal
operations through elementary operations. In general, variable ( ) n i x
i
Λ 1 = is eliminated
from all equations except j
th
equation for which
ji
a is nonzero.
General procedure for one pivotal operation consists of following two steps,
1. Divide j
th
equation by
ji
a . Let us designate it as ) (
j
E′ , i.e.,
ji
j
j
a
E
E = ′
2. Subtract
ki
a times of equation ) (
j
E′ from k
th
equation( ) n j j k , , 1 , 1 , 2 , 1 Λ Λ + − = , i.e.,
j ki k
E a E ′ −
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
6
M3L1
Above steps are repeated for all the variables in the system of equations to obtain the
canonical form. Finally the canonical form will be as follows:
) ( 1 0 0
) ( 0 1 0
) ( 0 0 1
2 1
2 2 2 1
1 1 2 1
c
n n n
c
n
c
n
E b x x x
E b x x x
E b x x x
′ ′ = + + +
′ ′ = + + +
′ ′ = + + +
Λ Λ Λ
Μ Μ
Μ Μ
Λ Λ Λ
Λ Λ Λ
It is obvious that solution of the system of equations can be easily obtained from canonical
form, such as:
i i
b x ′ ′ =
which is the solution of the original set of equations too as the canonical form is obtained
through elementary operations.
Now let us consider more general case for which the system of equations has m equations
with n variables ( m n ≥ ). It is possible to transform the set of equations to an equivalent
canonical form from which at least one solution can be easily deduced.
Let us consider the following general set of equations.
) (
) (
) (
2 2 1 1
2 2 2 2 22 1 21
1 1 1 2 12 1 11
m m n mn m m
n n
n n
E b x a x a x a
E b x a x a x a
E b x a x a x a
= + + +
= + + +
= + + +
Λ Λ Λ
Μ Μ
Μ Μ
Λ Λ Λ
Λ Λ Λ
Optimization Methods: Linear Programming Preliminaries
D Nagesh Kumar, IISc, Bangalore
7
M3L1
By performing n pivotal operations (described earlier) for any m variables (say,
m
x x x Λ , ,
2 1
,
called pivotal variables), the system of equations reduced to canonical form will be as
follows:
) ( 1 0 0
) ( 0 1 0
) ( 0 0 1
1 1 , 2 1
2 2 2 1 1 , 2 2 1
1 1 1 1 1 , 1 2 1
c
m m n mn m m m m
c
n n m m m
c
n n m m m
E b x a x a x x x
E b x a x a x x x
E b x a x a x x x
′ ′ = ′ ′ + + ′ ′ + + + +
′ ′ = ′ ′ + + ′ ′ + + + +
′ ′ = ′ ′ + + ′ ′ + + + +
+ +
+ +
+ +
Λ Λ Λ Λ Λ Λ
Μ Μ
Μ Μ
Λ Λ Λ Λ Λ Λ
Λ Λ Λ Λ Λ Λ
Variables,
n m
x x , ,
1
Λ
+
, of above set of equations are known as nonpivotal variables or
independent variables. One solution that can be obtained from the above set of equations
is
i i
b x ′ ′ = for m i Λ 1 = and 0 =
i
x for ( ) n m i Λ 1 + = . This solution is known as basic
solution. Pivotal variables,
m
x x x Λ , ,
2 1
, are also known as basic variables. Nonpivotal
variables,
n m
x x , ,
1
Λ
+
, are known as nonbasic variables.
Canonical form of a set of LPP
Similar procedure can be followed in the case of a standard form of LPP. Objective function
and all constraints for such standard form of LPP constitute a linear set of equations. In
general this linear set will have m equations with n variables ( m n ≥ ). The set of canonical
form obtained from this set of equations is known as canonical form of LPP.
If the basic solution satisfies all the constraints as well as nonnegativity criterion for all the
variables, such basic solution is also known as basic feasible solution. It is obvious that, there
can be
m
n
c numbers of different canonical forms and corresponding basic feasible solutions.
Thus, if there are 10 equations with 15 variables there exist
10
15
c = 3003 solutions, a huge
number to be inspected one by one to find out the optimal solution. This is the reason which
motivates for an efficient algorithm for solution of the LPP. Simplex method is one such
popular method, which will be discussed after graphical method.
D Nagesh Kumar, IISc Optimization Methods: M3L1
1
Linear Programming
Preliminaries
D Nagesh Kumar, IISc Optimization Methods: M3L1
2
Objectives
z To introduce linear programming problems (LPP)
z To discuss the standard and canonical form of LPP
z To discuss elementary operation for linear set of
equations
D Nagesh Kumar, IISc Optimization Methods: M3L1
3
Introduction and Definition
z Linear Programming (LP) is the most useful optimization
technique
z Objective function and constraints are the ‘linear’ functions of
‘nonnegative’ decision variables
z Thus, the conditions of LP problems are
1. Objective function must be a linear function of decision
variables
2. Constraints should be linear function of decision variables
3. All the decision variables must be nonnegative
D Nagesh Kumar, IISc Optimization Methods: M3L1
4
Example
Condition ity Nonnegativ 0 ,
Constraint 3rd 15 4
Constraint 2nd 11 3
Constraint 1st 5 3 2 to subject
Function Objective 5 6 Maximize
p
p
p
p
p
≥
≤ +
≤ +
≤ −
+ =
y x
y x
y x
y x
y x Z
This is in “general” form
D Nagesh Kumar, IISc Optimization Methods: M3L1
5
Standard form of LP problems
z Standard form of LP problems must have following
three characteristics:
1. Objective function should be of maximization type
2. All the constraints should be of equality type
3. All the decision variables should be nonnegative
D Nagesh Kumar, IISc Optimization Methods: M3L1
6
General form Vs Standard form
z Violating points for
standard form of LPP:
1. Objective function is of
minimization type
2. Constraints are of inequality
type
3. Decision variable, x
2
, is
unrestricted, thus, may take
negative values also.
z General form
ed unrestrict
0
2 4
3
15 3 2 to subject
5 3 Minimize
2
1
2 1
2 1
2 1
2 1
x
x
x x
x x
x x
x x Z
≥
≥ +
≤ +
≤ −
− − =
How to transform a general form of a LPP to the standard form ?
D Nagesh Kumar, IISc Optimization Methods: M3L1
7
General form Standard form
z General form
1. Objective function
2. First constraint
3. Second constraint
z Standard form
1. Objective function
2. First constraint
3. Second constraint
Transformation
2 1
5 3 Minimize x x Z − − =
15 3 2
2 1
≤ − x x
15 3 2
3 2 1
= + − x x x
3
2 1
≤ + x x
3
4 2 1
= + + x x x
Variables and are known as slack variables
3
x
4
x
2 1
5 3 Maximize x x Z Z + = − =
′
D Nagesh Kumar, IISc Optimization Methods: M3L1
8
General form Standard form
z General form
4. Third constraint
z Standard form
4. Third constraint
Transformation
2 4
5 2 1
= − + x x x 2 4
2 1
≥ + x x
5. Constraints for decision
variables, x
1
and x
2
Variable is known as surplus variable
5
x
5. Constraints for decision
variables, x
1
and x
2
ed unrestrict
2
x
0
1
≥ x 0
1
≥ x
2 2 2
x x x
′ ′
−
′
=
0 , and
2 2
≥
′ ′ ′
x x
D Nagesh Kumar, IISc Optimization Methods: M3L1
9
Canonical form of LP Problems
z The ‘objective function’ and all the ‘equality constraints’
(standard form of LP problems) can be expressed in canonical
form.
z This is known as canonical form of LPP
z Canonical form of LP problems is essential for simplex method
(will be discussed later)
z Canonical form of a set of linear equations will be discussed
next.
D Nagesh Kumar, IISc Optimization Methods: M3L1
10
Canonical form of a set of linear equations
Let us consider the following example of a set of linear equations
(A
0
)
(B
0
)
(C
0
)
The system of equation will be transformed through ‘Elementary
Operations’.
10 2 3 = + + z y x
6 3 2 = + − z y x
1 2 = − + z y x
D Nagesh Kumar, IISc Optimization Methods: M3L1
11
Elementary Operations
The following operations are known as elementary operations:
1. Any equation E
r
can be replaced by kE
r
, where k is a nonzero
constant.
2. Any equation E
r
can be replaced by E
r
+ kE
s
, where E
s
is
another equation of the system and k is as defined above.
Note: Transformed set of equations through elementary operations is
equivalent to the original set of equations. Thus, solution of
transformed set of equations is the solution of original set of
equations too.
D Nagesh Kumar, IISc Optimization Methods: M3L1
12
Transformation to Canonical form: An
Example
Set of equation (A
0
, B
0
and C
0
) is transformed through elementary
operations (shown inside bracket in the right side)
⎟
⎠
⎞
⎜
⎝
⎛
= = + +
0 1
A
3
1
A
3
10
3
1
3
2
z y x
( )
1 0 1
A B B
3
8
3
8
3
8
0 − = = + − z y
( )
1 0 1
2A C C
3
17
3
5
3
1
0 − = − = − − z y
Note that variable x is eliminated from B
0
and C
0
equations to
obtain B
1
and C
1
. Equation A
0
is known as pivotal equation.
D Nagesh Kumar, IISc Optimization Methods: M3L1
13
Transformation to Canonical form:
Example contd.
Following similar procedure, y is eliminated from equation A
1
and C
1
considering B
1
as pivotal equation:
⎟
⎠
⎞
⎜
⎝
⎛
− = = + +
2 1 2
B
3
2
A A 4 0 z x
⎟
⎠
⎞
⎜
⎝
⎛
− = − = − +
1 2
B
8
3
B 1 0 z y
⎟
⎠
⎞
⎜
⎝
⎛
+ = − = − +
2 1 2
B
3
1
C C 6 2 0 0 z
D Nagesh Kumar, IISc Optimization Methods: M3L1
14
Transformation to Canonical form:
Example contd.
Finally, z is eliminated form equation A
2
and B
2
considering C
2
as
pivotal equation :
( )
3 2 3
C A A 1 0 0 − = = + + x
( )
3 2 3
C B B 2 0 0 + = = + + y
⎟
⎠
⎞
⎜
⎝
⎛
− = = + +
2 3
C
2
1
C 3 0 0 z
Note: Pivotal equation is transformed first and using the transformed pivotal equation
other equations in the system are transformed.
The set of equations (A
3
, B
3
and C
3
) is said to be in Canonical form which
is equivalent to the original set of equations (A
0
, B
0
and C
0
)
D Nagesh Kumar, IISc Optimization Methods: M3L1
15
Pivotal Operation
Operation at each step to eliminate one variable at a time,
from all equations except one, is known as pivotal
operation.
Number of pivotal operations are same as the number of
variables in the set of equations.
Three pivotal operations were carried out to obtain the
canonical form of set of equations in last example having
three variables.
D Nagesh Kumar, IISc Optimization Methods: M3L1
16
Transformation to Canonical form:
Generalized procedure
Consider the following system of n equations with n variables
) (
) (
) (
2 2 1 1
2 2 2 2 22 1 21
1 1 1 2 12 1 11
n n n nn n n
n n
n n
E b x a x a x a
E b x a x a x a
E b x a x a x a
= + + +
= + + +
= + + +
L L L
M M
M M
L L L
L L L
D Nagesh Kumar, IISc Optimization Methods: M3L1
17
Transformation to Canonical form:
Generalized procedure
Canonical form of above system of equations can be
obtained by performing n pivotal operations
Variable is eliminated from all equations
except j
th
equation for which is nonzero.
General procedure for one pivotal operation consists of
following two steps,
1. Divide j
th
equation by . Let us designate it as , i.e.,
2. Subtract times of equation from
k
th
equation , i.e.,
( ) n i x
i
L 1 =
ji
a
ji
a
) (
j
E
′
ki
a ) (
j
E
′
( ) n j j k , , 1 , 1 , 2 , 1 L L + − =
ji
j
j
a
E
E =
′
j ki k
E a E
′
−
D Nagesh Kumar, IISc Optimization Methods: M3L1
18
Transformation to Canonical form:
Generalized procedure
After repeating above steps for all the variables in the system
of equations, the canonical form will be obtained as
follows:
) ( 1 0 0
) ( 0 1 0
) ( 0 0 1
2 1
2 2 2 1
1 1 2 1
c
n n n
c
n
c
n
E b x x x
E b x x x
E b x x x
′ ′
= + + +
′ ′
= + + +
′ ′
= + + +
L L L
M M
M M
L L L
L L L
It is obvious that solution of above set of equation such as
is the solution of original set of equations also.
i i
b x
′ ′
=
D Nagesh Kumar, IISc Optimization Methods: M3L1
19
Transformation to Canonical form:
More general case
Consider more general case for which the system of equations
has m equation with n variables ( )
It is possible to transform the set of equations to an equivalent
canonical form from which at least one solution can be easily
deduced
m n ≥
) (
) (
) (
2 2 1 1
2 2 2 2 22 1 21
1 1 1 2 12 1 11
m m n mn m m
n n
n n
E b x a x a x a
E b x a x a x a
E b x a x a x a
= + + +
= + + +
= + + +
L L L
M M
M M
L L L
L L L
D Nagesh Kumar, IISc Optimization Methods: M3L1
20
Transformation to Canonical form:
More general case
By performing n pivotal operations for any m variables (say, ,
called pivotal variables) the system of equations reduced to
canonical form is as follows
Variables, , of above set of equations is known as
nonpivotal variables or independent variables.
m
x x x L , ,
2 1
) ( 1 0 0
) ( 0 1 0
) ( 0 0 1
1 1 , 2 1
2 2 2 1 1 , 2 2 1
1 1 1 1 1 , 1 2 1
c
m m n mn m m m m
c
n n m m m
c
n n m m m
E b x a x a x x x
E b x a x a x x x
E b x a x a x x x
′ ′
=
′ ′
+ +
′ ′
+ + + +
′ ′
=
′ ′
+ +
′ ′
+ + + +
′ ′
=
′ ′
+ +
′ ′
+ + + +
+ +
+ +
+ +
L L L L L L
M M
M M
L L L L L L
L L L L L L
n m
x x , ,
1
L
+
D Nagesh Kumar, IISc Optimization Methods: M3L1
21
Basic variable, Nonbasic variable,
Basic solution, Basic feasible solution
One solution that can be obtained from the above set of equations is
m
x x x L , ,
2 1
n m
x x , ,
1
L
+
( ) n m i x
m i b x
i
i i
, , 1 for 0
, , 1 for
L
L
+ = =
=
′ ′
=
This solution is known as basic solution.
Pivotal variables, , are also known as basic variables.
Nonpivotal variables, , are known as nonbasic variables.
Basic solution is also known as basic feasible solution because it
satisfies all the constraints as well as nonnegativity criterion for all the
variables
D Nagesh Kumar, IISc Optimization Methods: M3L1
22
Thank You
Optimization Methods: Linear Programming Graphical Method 1
Module – 3 Lecture Notes – 2
Graphical Method
Graphical method to solve Linear Programming problem (LPP) helps to visualize the
procedure explicitly. It also helps to understand the different terminologies associated with
the solution of LPP. In this class, these aspects will be discussed with the help of an example.
However, this visualization is possible for a maximum of two decision variables. Thus, a LPP
with two decision variables is opted for discussion. However, the basic principle remains the
same for more than two decision variables also, even though the visualization beyond two
dimensional case is not easily possible.
Let us consider the same LPP (general form) discussed in previous class, stated here once
again for convenience.
5) (C & 4) (C 0 ,
3) (C 15 4
2) (C 11 3
1) (C 5 3 2 to subject
5 6 Maximize
− − ≥
− ≤ +
− ≤ +
− ≤ −
+ =
y x
y x
y x
y x
y x Z
First step to solve above LPP by graphical method, is to plot the inequality constraints one
byone on a graph paper. Fig. 1a shows one such plotted constraint.
5 3 2 ≤ − y x
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Fig. 1a Plot showing first constraint ( 5 3 2 ≤ − y x )
Fig. 1b shows all the constraints including the nonnegativity of the decision variables (i.e.,
and ). 0 ≥ x 0 ≥ y
D Nagesh Kumar, IISc, Bangalore M3L2
Optimization Methods: Linear Programming Graphical Method 2
11 3 ≤ + y x
15 4 ≤ + y x
0 ≥ x
0 ≥ y
5 3 2 ≤ − y x
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Fig. 1b Plot of all the constraints
Common region of all these constraints is known as feasible region (Fig. 1c). Feasible region
implies that each and every point in this region satisfies all the constraints involved in the
LPP.
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Feasible
region
Fig. 1c Feasible region
Once the feasible region is identified, objective function ( y x Z 5 6 + = ) is to be plotted on it.
As the (optimum) value of Z is not known, objective function is plotted by considering any
constant, k (Fig. 1d). The straight line, k y x + = 5 6 (constant), is known as Z line (Fig. 1d).
This line can be shifted in its perpendicular direction (as shown in the Fig. 1d) by changing
the value of k. Note that, position of Z line shown in Fig. 1d, showing the intercept, c, on the
D Nagesh Kumar, IISc, Bangalore M3L2
Optimization Methods: Linear Programming Graphical Method 3
y axis is 3. If,
5 5
6 5 5 6 x y k x y k y x +
6 k −
= => + − = => = + , i.e.,
5
= m
6 −
and
15 3
5
= => = = k c
k
.
2
3
4
5
2 0 1 2 3 4 5
1
0
1
2
1
Z Line
Fig. 1d Plot of Z line and feasible region
2
1
0
1
2
3
4
5
2 1 4 5 0 1 2 3
Optimal
Point
Z Line
Fig. 1e Location of Optimal Point
Now it can be visually noticed that value of the objective function will be maximum when it
passes through the intersection of 11 3 + = y x 15 4 and + = y x
*
x 636 . 2
*
= y
* *
5 6 y x + =
(straight lines associated with
the second and third inequality constraints). This is known as optimal point (Fig. 1e). Thus
the optimal point of the present problem is and . And the optimal
solution is = 31.727
091 . 3 =
D Nagesh Kumar, IISc, Bangalore M3L2
Optimization Methods: Linear Programming Graphical Method 4
Visual representation of different cases of solution of LPP
A linear programming problem may have i) a unique, finite solution, ii) an unbounded
solution iii) multiple (or infinite) number of optimal solutions, iv) infeasible solution and v) a
unique feasible point. In the context of graphical method it is easy to visually demonstrate the
different situations which may result in different types of solutions.
Unique, finite solution
The example demonstrated above is an example of LPP having a unique, finite solution. In
such cases, optimum value occurs at an extreme point or vertex of the feasible region.
Unbounded solution
If the feasible region is not bounded, it is possible that the value of the objective function
goes on increasing without leaving the feasible region. This is known as unbounded solution
(Fig 2).
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Z Line
Fig. 2 Unbounded Solution
D Nagesh Kumar, IISc, Bangalore M3L2
Optimization Methods: Linear Programming Graphical Method 5
Multiple (infinite) solutions
If the Z line is parallel to any side of the feasible region all the points lying on that side
constitute optimal solutions as shown in Fig 3.
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Parallel
Z Line
Fig. 3 Multiple (infinite) Solution
Infeasible solution
Sometimes, the set of constraints does not form a feasible region at all due to inconsistency in
the constraints. In such situation the LPP is said to have infeasible solution. Fig 4 illustrates
such a situation.
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Z Line
Fig. 4 Infeasible Solution
D Nagesh Kumar, IISc, Bangalore M3L2
Optimization Methods: Linear Programming Graphical Method 6
Unique feasible point
This situation arises when feasible region consist of a single point. This situation may occur
only when number of constraints is at least equal to the number of decision variables. An
example is shown in Fig 5. In this case, there is no need for optimization as there is only one
solution.
2
1
0
1
2
3
4
5
2 1 0 1 2 3 4 5
Unique
feasible point
Fig. 5 Unique feasible point
D Nagesh Kumar, IISc, Bangalore M3L2
D Nagesh Kumar, IISc Optimization Methods: M3L2
1
Linear Programming
Graphical method
D Nagesh Kumar, IISc Optimization Methods: M3L2
2
Objectives
z To visualize the optimization procedure
explicitly
z To understand the different terminologies
associated with the solution of LPP
z To discuss an example with two decision
variables
D Nagesh Kumar, IISc Optimization Methods: M3L2
3
Example
(c1)
(c2)
(c3)
(c4 & c5)
0 ,
15 4
11 3
5 3 2 to subject
5 6 Maximize
≥
≤ +
≤ +
≤ −
+ =
y x
y x
y x
y x
y x Z
D Nagesh Kumar, IISc Optimization Methods: M3L2
4
Graphical method: Step  1
Plot all the
constraints one
by one on a
graph paper
D Nagesh Kumar, IISc Optimization Methods: M3L2
5
Graphical method: Step  2
Identify the common
region of all the
constraints.
This is known as
‘feasible region’
D Nagesh Kumar, IISc Optimization Methods: M3L2
6
Graphical method: Step  3
Plot the objective
function assuming any
constant, k, i.e.
This is known as ‘Z line’,
which can be shifted
perpendicularly by
changing the value of
k.
k y x = + 5 6
D Nagesh Kumar, IISc Optimization Methods: M3L2
7
Graphical method: Step  4
Notice that value of the
objective function will be
maximum when it
passes through the
intersection of
and (straight
lines associated with 2
nd
and 3
rd
constraints).
This is known as ‘Optimal
Point’
11 3 = + y x
15 4 = + y x
D Nagesh Kumar, IISc Optimization Methods: M3L2
8
Graphical method: Step  5
Thus the optimal point of
the present problem is
And the optimal solution
is
31.726 5 6
* *
= + y x
091 . 3
*
= x
636 . 2
*
= y
D Nagesh Kumar, IISc Optimization Methods: M3L2
9
Different cases of optimal solution
A linear programming problem may have
1. A unique, finite solution (example already discussed)
2. An unbounded solution,
3. Multiple (or infinite) number of optimal solution,
4. Infeasible solution, and
5. A unique feasible point.
D Nagesh Kumar, IISc Optimization Methods: M3L2
10
Unbounded solution:
Graphical representation
Situation: If the feasible
region is not bounded
Solution: It is possible that
the value of the
objective function goes
on increasing without
leaving the feasible
region, i.e., unbounded
solution
D Nagesh Kumar, IISc Optimization Methods: M3L2
11
Multiple solutions:
Graphical representation
Situation: Z line is parallel
to any side of the
feasible region
Solution: All the points
lying on that side
constitute optimal
solutions
D Nagesh Kumar, IISc Optimization Methods: M3L2
12
Infeasible solution:
Graphical representation
Situation: Set of
constraints does not
form a feasible region at
all due to inconsistency
in the constraints
Solution: Optimal solution
is not feasible
D Nagesh Kumar, IISc Optimization Methods: M3L2
13
Unique feasible point:
Graphical representation
Situation: Feasible region
consist of a single point.
Number of constraints
should be at least equal
to the number of decision
variables
Solution: There is no need
for optimization as there
is only one feasible point
D Nagesh Kumar, IISc Optimization Methods: M3L2
14
Thank You
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
1
M3L3
Module – 3 Lecture Notes – 3
Simplex Method  I
Introduction
It is already stated in a previous lecture that the most popular method used for the solution of
Linear Programming Problems (LPP) is the simplex method. In this lecture, motivation for
simplex method will be discussed first. Simplex algorithm and construction of simplex
tableau will be discussed later with an example problem.
Motivation for Simplex method
Recall from the second class that the optimal solution of a LPP, if exists, lies at one of the
vertices of the feasible region. Thus one way to find the optimal solution is to find all the
basic feasible solutions of the canonical form and investigate them onebyone to get at the
optimal. However, again recall the example at the end of the first class that, for 10 equations
with 15 variables there exists a huge number (
10
15
c = 3003) of basic feasible solutions. In such
a case, inspection of all the solutions onebyone is not practically feasible. However, this can
be overcome by simplex method. Conceptual principle of this method can be easily
understood for a three dimensional case (however, simplex method is applicable for any
higher dimensional case as well).
Imagine a feasible region (i.e., volume) bounded by several surfaces. Each vertex of this
volume, which is a basic feasible solution, is connected to three other adjacent vertices by a
straight line to each being the intersection of two surfaces. Being at any one vertex (one of
the basic feasible solutions), simplex algorithm helps to move to another adjacent vertex
which is closest to the optimal solution among all the adjacent vertices. Thus, it follows the
shortest route to reach the optimal solution from the starting point. It can be noted that the
shortest route consists of a sequence of basic feasible solutions which is generated by simplex
algorithm. The basic concept of simplex algorithm for a 3D case is shown in Fig 1.
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
2
M3L3
Fig 1.
The general procedure of simplex method is as follows:
1. General form of given LPP is transformed to its canonical form (refer Lecture note 1).
2. A basic feasible solution of the LPP is found from the canonical form (there should
exist at least one).
3. This initial solution is moved to an adjacent basic feasible solution which is closest to
the optimal solution among all other adjacent basic feasible solutions.
4. The procedure is repeated until the optimum solution is achieved.
Step three involves simplex algorithm which is discussed in the next section.
Simplex algorithm
Simplex algorithm is discussed using an example of LPP. Let us consider the following
problem.
0 , ,
4 2 2 5
0 2 4
6 2 2 to subject
2 4 Maximize
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
≥
≤ − −
≤ + −
≤ + +
+ − =
x x x
x x x
x x x
x x x
x x x Z
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
3
M3L3
Simplex algorithm is used to obtain the solution of this problem. First let us transform the
LPP to its standard form as shown below.
0 , , , , ,
4 2 2 5
0 2 4
6 2 2 to subject
2 4 Maximize
6 5 4 3 2 1
6 3 2 1
5 3 2 1
4 3 2 1
3 2 1
≥
= + − −
= + + −
= + + +
+ − =
x x x x x x
x x x x
x x x x
x x x x
x x x Z
It can be recalled that
4
x ,
5
x and
6
x are slack variables. Above set of equations, including the
objective function can be transformed to canonical form as follows:
4 1 0 0 2 2 5
0 0 1 0 2 4
6 0 0 1 2 2
0 0 0 0 2 4
6 5 4 3 2 1
6 5 4 3 2 1
6 5 4 3 2 1
6 5 4 3 2 1
= + + + − −
= + + + + −
= + + + + +
= + + + + − + −
x x x x x x
x x x x x x
x x x x x x
Z x x x x x x
The basic solution of above canonical form is 6
4
= x , 0
5
= x , 4
6
= x , 0
3 2 1
= = = x x x and
0 = Z . It can be noted that,
4
x ,
5
x and
6
x are known as basic variables and
3 2 1
and , x x x are
known as nonbasic variables of the canonical form shown above. Let us denote each equation
of above canonical form as:
( )
( )
( )
( ) 4 1 0 0 2 2 5
0 0 1 0 2 4
6 0 0 1 2 2
0 0 0 0 2 4
6 5 4 3 2 1 6
6 5 4 3 2 1 5
6 5 4 3 2 1 4
6 5 4 3 2 1
= + + + − −
= + + + + −
= + + + + +
= + + + + − + −
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
For the ease of discussion, right hand side constants and the coefficients of the variables are
symbolized as follows:
( )
( )
( )
( )
6 5 66 5 65 4 64 3 63 2 62 1 61 6
5 5 56 5 55 4 54 3 53 2 52 1 51 5
4 5 46 5 45 4 44 3 43 2 42 1 41 4
5 6 5 5 4 4 3 3 2 2 1 1
b x c x c x c x c x c x c x
b x c x c x c x c x c x c x
b x c x c x c x c x c x c x
b Z x c x c x c x c x c x c Z
= + + + + +
= + + + + +
= + + + + +
= + + + + + +
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
4
M3L3
The leftmost column is known as basis as this is consisting of basic variables. The
coefficients in the first row (
6 1
c c Λ ) are known as cost coefficients. Other subscript notations
are self explanatory and used for the ease of discussion. For each coefficient, first subscript
indicates the subscript of the basic variable in that equation. Second subscript indicates the
subscript of variable with which the coefficient is associated. For example,
52
c is the
coefficient of
2
x in the equation having the basic variable
5
x with nonzero coefficient (i.e.,
c
55
is nonzero).
This completes first step of calculation. After completing each step (iteration) of calculation,
three points are to be examined:
1. Is there any possibility of further improvement?
2. Which nonbasic variable is to be entered into the basis?
3. Which basic variable is to be exited from the basis?
The procedure to check these points is discussed next.
1. Is there any possibility of further improvement?
If any of the cost coefficients is negative, further improvement is possible. In
other words, if all the cost coefficients are nonnegative, the basic feasible
solution obtained in that step is optimum.
2. Which nonbasic variable is to be entered?
Entering nonbasic variable is decided such that the unit change of this variable
should have maximum effect on the objective function. Thus the variable having
the coefficient which is minimum among all the cost coefficients is to be
entered, i.e.,
S
x is to be entered if cost coefficient
S
c is minimum.
3. Which basic variable is to be exited?
After deciding the entering variable
S
x ,
r
x (from the set of basic variables) is
decided to be the exiting variable if
rs
r
c
b
is minimum for all possible r, provided
rs
c is positive.
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
5
M3L3
It can be noted that,
rs
c is considered as pivotal element to obtain the next
canonical form.
In this example, ( ) 4
1
− = c is the minimum. Thus,
1
x is the entering variable for the next step
of calculation. r may take any value from 4, 5 and 6. It is found that 3
2
6
41
4
= =
c
b
,
0
1
0
51
5
= =
c
b
and 8 . 0
5
4
61
6
= =
c
b
. As,
51
5
c
b
is minimum, r is 5. Thus
5
x is to be exited and
51
c is
the pivotal element and
5
x is replaced by
1
x in the basis. Set of equations are transformed
through pivotal operation to another canonical form considering
51
c as the pivotal element.
The procedure of pivotal operation is already explained in first class. However, as a refresher
it is explained here once again.
1. Pivotal row is transformed by dividing it with the pivotal element. In this case, pivotal
element is 1.
2. For other rows: Let the coefficient of the element in the pivotal column of a particular
row be “l”. Let the pivotal element be “m”. Then the pivotal row is multiplied by l / m
and then subtracted from that row to be transformed. This operation ensures that the
coefficients of the element in the pivotal column of that row becomes zero, e.g., Z
row: l = 4 , m = 1. So, pivotal row is multiplied by l / m = 4 / 1 = 4, obtaining
0 0 4 0 8 16 4
6 5 4 3 2 1
= + − + − + − x x x x x x
This is subtracted from Z row obtaining,
0 0 4 0 6 15 0
6 5 4 3 2 1
= + + + + + − Z x x x x x x
The other two rows are also suitably transformed.
After the pivotal operation, the canonical form obtained is shown below.
( )
( )
( )
( ) 4 1 5 0 12 18 0
0 0 1 0 2 4 1
6 0 2 1 2 9 0
0 0 4 0 6 15 0
6 5 4 3 2 1 6
6 5 4 3 2 1 1
6 5 4 3 2 1 4
6 5 4 3 2 1
= + − − − +
= + + + + −
= + − + − +
= + + + + + −
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
The basic solution of above canonical form is 0
1
= x , 6
4
= x , 4
6
= x , 0
5 4 3
= = = x x x and
0 = Z . However, this is not the optimum solution as the cost coefficient
2
c is negative. It is
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
6
M3L3
observed that
2
c (= 15) is minimum. Thus, 2 = s and
2
x is the entering variable. r may take
any value from 4, 1 and 6. However, ( ) 4
12
− = c is negative. Thus, r may be either 4 or 6. It is
found that, 667 . 0
9
6
42
4
= =
c
b
, and 222 . 0
18
4
62
6
= =
c
b
. As
62
6
c
b
is minimum, r is 6 and
6
x is to
be exited from the basis.
62
c (=18) is to be treated as pivotal element. The canonical form for
next iteration is as follows:
( )
( )
( )
( )
9
2
18
1
18
5
0
3
2
1 0
9
8
9
2
9
1
0
3
2
0 1
4
2
1
2
1
1 4 0 0
3
10
6
5
6
1
0 4 0 0
6 5 4 3 2 1 2
6 5 4 3 2 1 1
6 5 4 3 2 1 4
6 5 4 3 2 1
= + − + − +
= + − + − +
= − + + + +
= + + − + − +
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
The basic solution of above canonical form is
9
8
1
= x ,
9
2
2
= x , 4
4
= x , 0
5 3 2
= = = x x x and
3
10
= Z .
It is observed that
3
c (= 4) is negative. Thus, optimum is not yet achieved. Following similar
procedure as above, it is decided that
3
x should be entered in the basis and
4
x should be
exited from the basis. Thus,
4
x is replaced by
3
x in the basis. Set of equations are
transformed to another canonical form considering
43
c (= 4) as pivotal element. By doing so,
the canonical form is shown below.
( )
( )
( )
( )
9
8
36
1
36
7
6
1
0 1 0
9
14
36
5
36
1
6
1
0 0 1
1
8
1
8
1
4
1
1 0 0
3
22
3
1
3
1
1 0 0 0
6 5 4 3 2 1 2
6 5 4 3 2 1 1
6 5 4 3 2 1 3
6 5 4 3 2 1
= − − + + +
= + − + + +
= − + + + +
= + + + + + +
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
7
M3L3
The basic solution of above canonical form is
9
14
1
= x ,
9
8
2
= x , 1
3
= x , 0
6 5 4
= = = x x x and
3
22
= Z .
It is observed that all the cost coefficients are positive. Thus, optimum is achieved. Hence,
the optimum solution is
333 . 7
3
22
= = Z
556 . 1
9
14
1
= = x
889 . 0
9
8
2
= = x
1
3
= x
The calculation shown above can be presented in a tabular form, which is known as Simplex
Tableau. Construction of Simplex Tableau will be discussed next.
Construction of Simplex Tableau
Same LPP is considered for the construction of simplex tableau. This helps to compare the
calculation shown above and the construction of simplex tableau for it.
After preparing the canonical form of the given LPP, simplex tableau is constructed as
follows.
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
8
M3L3
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
rs
r
c
b
Z 1 4 1 2 0 0 0 0 
4
x 0 2 1 2 1 0 0 6 3
5
x
0 1
4 2 0 1 0 0 0
1
6
x
0 5 2 2 0 0 1 4
5
4
After completing each iteration, the steps given below are to be followed.
Logically, these steps are exactly similar to the procedure described earlier. However, steps
described here are somewhat mechanical and easy to remember!
Check for optimum solution:
1. Investigate whether all the elements in the first row (i.e., Z row) are nonnegative or
not. Basically these elements are the coefficients of the variables headed by that
column. If all such coefficients are nonnegative, optimum solution is obtained and no
need of further iterations. If any element in this row is negative, the operation to
obtain simplex tableau for the next iteration is as follows:
Operations to obtain next simplex tableau:
2. The entering variable is identified (described earlier). The corresponding column is
marked as Pivotal Column as shown above.
3. The exiting variable from the basis is identified (described earlier). The corresponding
row is marked as Pivotal Row as shown above.
4. Coefficient at the intersection of Pivotal Row and Pivotal Column is marked as
Pivotal Element as shown above.
5. In the basis, the exiting variable is replaced by entering variable.
Pivotal Column
Pivotal Element
Pivotal Row
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
9
M3L3
6. All the elements in the pivotal row are divided by pivotal element.
7. For any other row, an elementary operation is identified such that the coefficient in
the pivotal column in that row becomes zero. The same operation is applied for all
other elements in that row and the coefficients are changed accordingly. A similar
procedure is followed for all other rows.
For example, say, (2 x pivotal element + pivotal coefficient in first row) produce zero
in the pivotal column in first row. The same operation is applied for all other elements
in the first row and the coefficients are changed accordingly.
Simplex tableaus for successive iterations are shown below. Pivotal Row, Pivotal Column
and Pivotal Element for each tableau are marked as earlier for the ease of understanding.
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
rs
r
c
b
Z 1 0 15 6 0 4 0 0 
4
x 0 0 9 2 1 2 0 6 3 1
1
x 0 1 4 2 0 1 0 0 
2
6
x
0 0
18
12 0 5 1 4 9 2
……continued to next page
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
10
M3L3
……continued from previous page
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
rs
r
c
b
Z
1
0
0
4 0
6
1
−
6
5
3
10

4
x
0 0 0 4 1
2
1
2
1
−
4
1
1
x 0 1 0
3
2
− 0
9
1
−
9
2
9
8

3
2
x 0 0 1
3
2
− 0
18
5
−
18
1
9
2

Z
1
0 0 0 1
3
1
3
1
3
22
3
x
0 0 0 1
4
1
8
1
8
1
−
1
1
x 0 1 0 0
6
1
36
1
−
9
2
9
14
4
2
x 0 0 1 0
6
1
36
7
−
36
1
−
9
8
Optimum value of Z
Value of
3
x
Value of
1
x
Value of
2
x
All the coefficients are
nonnegative. Thus optimum
solution is achieved.
Optimization Methods: Linear Programming Simplex MethodI
D Nagesh Kumar, IISc, Bangalore
11
M3L3
As all the elements in the first row (i.e., Z row), at iteration 4, are nonnegative, optimum
solution is achieved. Optimum value of Z is 333 . 7
3
22
= as shown above. Corresponding
values of basic variables are 556 . 1
9
14
1
= = x , 889 . 0
9
8
2
= = x , 1
3
= x and those of nonbasic
variables are all zero (i.e., 0
6 5 4
= = = x x x ).
It can be noted that at any iteration the following two points must be satisfied:
1. All the basic variables (other than Z) have a coefficient of zero in the Z row.
2. Coefficients of basic variables in other rows constitute a unit matrix.
If any of these points are violated at any iteration, it indicates a wrong calculation. However,
reverse is not true.
D Nagesh Kumar, IISc Optimization Methods: M3L3
1
Linear Programming
Simplex method  I
D Nagesh Kumar, IISc Optimization Methods: M3L3
2
Introduction and Objectives
Simplex method is the most popular method
used for the solution of Linear Programming
Problems (LPP).
Objectives
z To discuss the motivation of simplex method
z To discuss Simplex algorithm
z To demonstrate the construction of simplex
tableau
D Nagesh Kumar, IISc Optimization Methods: M3L3
3
Motivation of Simplex method
z Solution of a LPP, if exists, lies at one of the vertices of
the feasible region.
z All the basic solutions can be investigated onebyone
to pick up the optimal solution.
z For 10 equations with 15 variables there exists
15
C
10
=
3003 basic feasible solutions!
z Too large number to investigate onebyone.
z This can be overcome by simplex method
D Nagesh Kumar, IISc Optimization Methods: M3L3
4
Simplex Method: Concept in 3D case
z In 3D, a feasible region (i.e., volume) is bounded by
several surfaces
z Each vertex (a basic feasible solution) of this volume
is connected to the three other adjacent vertices by a
straight line to each, being intersection of two
surfaces.
z Simplex algorithm helps to move from one vertex to
another adjacent vertex which is closest to the
optimal solution among all other adjacent vertices.
z Thus, it follows the shortest route to reach the
optimal solution from the starting point.
D Nagesh Kumar, IISc Optimization Methods: M3L3
5
Simplex Method: Concept in 3D case
Optimum Solution
Starting Point Route followed
Thus there is no need
to investigate all the
basic feasible
solutions.
Sequence of basic
feasible solutions on
the shortest route is
generated by
simplex algorithm
Pictorial representation
D Nagesh Kumar, IISc Optimization Methods: M3L3
6
General procedure of simplex method
Simplex method involves following steps
1. General form of given LPP is transformed to its canonical
form (refer Lecture notes 1).
2. Find a basic feasible solution of the LPP (there should exist at
least one).
3. Move to an adjacent basic feasible solution which is closest to
the optimal solution among all other adjacent vertices.
4. Repeat until optimum solution is achieved.
Step three involves ‘Simplex Algorithm’
D Nagesh Kumar, IISc Optimization Methods: M3L3
7
Simplex Algorithm
Let us consider the following LPP
0 , ,
4 2 2 5
0 2 4
6 2 2 to subject
2 4 Maximize
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
≥
≤ − −
≤ + −
≤ + +
+ − =
x x x
x x x
x x x
x x x
x x x Z
D Nagesh Kumar, IISc Optimization Methods: M3L3
8
Simplex Algorithm …contd.
LPP is transformed to its standard form
0 , , , , ,
4 2 2 5
0 2 4
6 2 2 to subject
2 4 Maximize
6 5 4 3 2 1
6 3 2 1
5 3 2 1
4 3 2 1
3 2 1
≥
= + − −
= + + −
= + + +
+ − =
x x x x x x
x x x x
x x x x
x x x x
x x x Z
Note that x
4
, x
5
and x
6
are slack variables
D Nagesh Kumar, IISc Optimization Methods: M3L3
9
Simplex Algorithm …contd.
Set of equations, including the objective function is
transformed to canonical form
Basic feasible solution of above canonical form is
x
4
= 6, x
5
= 0, x
6
= 4, x
1
= x
2
= x
3
= 0 and Z = 0
4 1 0 0 2 2 5
0 0 1 0 2 4
6 0 0 1 2 2
0 0 0 0 2 4
6 5 4 3 2 1
6 5 4 3 2 1
6 5 4 3 2 1
6 5 4 3 2 1
= + + + − −
= + + + + −
= + + + + +
= + + + + − + −
x x x x x x
x x x x x x
x x x x x x
Z x x x x x x
x
4
, x
5
, x
6
: Basic Variables; x
1
, x
2
, x
3
: Nonbasic Variables
D Nagesh Kumar, IISc Optimization Methods: M3L3
10
Simplex Algorithm …contd.
Symbolized form (for ease of discussion)
( )
( )
( )
( )
6 5 66 5 65 4 64 3 63 2 62 1 61 6
5 5 56 5 55 4 54 3 53 2 52 1 51 5
4 5 46 5 45 4 44 3 43 2 42 1 41 4
5 6 5 5 4 4 3 3 2 2 1 1
b x c x c x c x c x c x c x
b x c x c x c x c x c x c x
b x c x c x c x c x c x c x
b Z x c x c x c x c x c x c Z
= + + + + +
= + + + + +
= + + + + +
= + + + + + +
• The leftmost column is known as basis as this is consisting of basic variables
• The coefficients in the first row (
6 1
, , c c K ) are known as cost coefficients.
• Other subscript notations are self explanatory
D Nagesh Kumar, IISc Optimization Methods: M3L3
11
Simplex Algorithm …contd.
This completes first step of algorithm. After completing
each step (iteration) of algorithm, following three points
are to be examined:
1. Is there any possibility of further improvement?
2. Which nonbasic variable is to be entered into the basis?
3. Which basic variable is to be exited from the basis?
D Nagesh Kumar, IISc Optimization Methods: M3L3
12
Simplex Algorithm …contd.
Is there any possibility of further improvement?
If any one of the cost coefficients is negative further improvement is
possible.
Which nonbasic variable is to be entered?
Entering variable is decided such that the unit change of this
variable should have maximum effect on the objective
function. Thus the variable having the coefficient which is
minimum among all cost coefficients is to be entered, i.e., x
s
is
to be entered if cost coefficient c
s
is minimum.
D Nagesh Kumar, IISc Optimization Methods: M3L3
13
Simplex Algorithm …contd.
Which basic variable is to be exited?
After deciding the entering variable x
s
, x
r
(from the set of basic
variables) is decided to be the exiting variable if is
minimum for all possible r, provided c
rs
is positive.
c
rs
is considered as pivotal element to obtain the next canonical
form.
rs
r
c
b
D Nagesh Kumar, IISc Optimization Methods: M3L3
14
Simplex Algorithm …contd.
Exiting variable
r may take any value from 4, 5 and 6. It is found that ,
. As is minimum, r is 5. Thus, x
5
is to be exited.
c
51
( = 1) is considered as pivotal element and x
5
is replaced by x
1
in the basis.
Thus a new canonical form is obtained through pivotal operation, which was
explained in first class.
3
2
6
41
4
= =
c
b
0
1
0
51
5
= =
c
b
8 . 0
5
4
61
6
= =
c
b
Entering variable
c
1
is minimum ( 4), thus, x
1
is the entering variable for the next step of
calculation.
51
5
c
b
D Nagesh Kumar, IISc Optimization Methods: M3L3
15
Simplex Algorithm …contd.
Pivotal operation as a refresher
• Pivotal row is transformed by dividing it with the pivotal element. In
this case, pivotal element is 1.
• For other rows: Let the coefficient of the element in the pivotal column
of a particular row be “l”. Let the pivotal element me “m”. Then the
pivotal row is multiplied by ‘l / m’ and then subtracted from that row to
be transformed. This operation ensures that the coefficients of the
element in the pivotal column of that row becomes zero, e.g., Z row: l =
4 , m = 1. So, pivotal row is multiplied by l / m = 4 / 1 = 4, obtaining
. This is subtracted from Z row, obtaining,
The other two rows are also suitably transformed.
0 0 4 0 8 16 4
6 5 4 3 2 1
= + − + − + − x x x x x x
0 0 4 0 6 15 0
6 5 4 3 2 1
= + + + + + − Z x x x x x x
D Nagesh Kumar, IISc Optimization Methods: M3L3
16
Simplex Algorithm …contd.
After the pivotal operation, the canonical form obtained as follows
The basic solution of above canonical form is x
1
= 0, x
4
= 6, x
6
= 4,
x
2
= x
3
= x
5
= 0 and Z = 0.
( )
( )
( )
( ) 4 1 5 0 12 18 0
0 0 1 0 2 4 1
6 0 2 1 2 9 0
0 0 4 0 6 15 0
6 5 4 3 2 1 6
6 5 4 3 2 1 1
6 5 4 3 2 1 4
6 5 4 3 2 1
= + − − − +
= + + + + −
= + − + − +
= + + + + + −
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
Note that cost coefficient c
2
is negative. Thus optimum solution is not yet
achieved. Further improvement is possible.
D Nagesh Kumar, IISc Optimization Methods: M3L3
17
Simplex Algorithm …contd.
Exiting variable
r may take any value from 4, 1 and 6. However, c
12
is negative ( 4). Thus, r
may be either 4 or 6. It is found that and .
As is minimum, r is 6. Thus x
6
is to be exited. c
62
( = 18) is considered
as pivotal element and x
6
is to be replaced by x
2
in the basis.
Thus another canonical form is obtained.
667 . 0
9
6
42
4
= =
c
b
222 . 0
18
4
62
6
= =
c
b
Entering variable
c
2
is minimum ( 15), thus, x
2
is the entering variable for the next step of
calculation.
62
6
c
b
D Nagesh Kumar, IISc Optimization Methods: M3L3
18
Simplex Algorithm …contd.
The canonical form obtained after third iteration
( )
( )
( )
( )
9
2
18
1
18
5
0
3
2
1 0
9
8
9
2
9
1
0
3
2
0 1
4
2
1
2
1
1 4 0 0
3
10
6
5
6
1
0 4 0 0
6 5 4 3 2 1 2
6 5 4 3 2 1 1
6 5 4 3 2 1 4
6 5 4 3 2 1
= + − + − +
= + − + − +
= − + + + +
= + + − + − +
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
The basic solution of above canonical form is
x
1
= 8/9, x
2
= 2/9, x
4
= 4, x
3
= x
5
= x
6
= 0 and Z = 10/3.
D Nagesh Kumar, IISc Optimization Methods: M3L3
19
Simplex Algorithm …contd.
Exiting variable (Following the similar procedure)
x
4
is the exiting variable. Thus c
43
( = 4) is the pivotal element and x
4
is to be
replaced by x
3
in the basis.
Thus another canonical form is obtained.
Entering variable (Following the similar procedure)
x
3
is the entering variable for the next step of calculation.
Note that cost coefficient c
3
is negative. Thus optimum solution is not yet
achieved. Further improvement is possible.
D Nagesh Kumar, IISc Optimization Methods: M3L3
20
Simplex Algorithm …contd.
The canonical form obtained after fourth iteration
( )
The basic solution of above canonical form is
x
1
= 14/9, x
2
= 8/9, x
3
= 1, x
4
= x
5
= x
6
= 0 and Z = 22/3.
( )
( )
( )
9
8
36
1
36
7
6
1
0 1 0
9
14
36
5
36
1
6
1
0 0 1
1
8
1
8
1
4
1
1 0 0
3
22
3
1
3
1
1 0 0 0
6 5 4 3 2 1 2
6 5 4 3 2 1 1
6 5 4 3 2 1 3
6 5 4 3 2 1
= − − + + +
= + − + + +
= − + + + +
= + + + + + +
x x x x x x x
x x x x x x x
x x x x x x x
Z x x x x x x Z
D Nagesh Kumar, IISc Optimization Methods: M3L3
21
Simplex Algorithm …contd.
Note that all the cost coefficients are nonnegative. Thus
the optimum solution is achieved.
Optimum solution is
333 . 7
3
22
= = Z
556 . 1
9
14
1
= = x
889 . 0
9
8
2
= = x
1
3
= x
D Nagesh Kumar, IISc Optimization Methods: M3L3
22
Construction of Simplex Tableau:
General notes
Calculations shown till now can be presented in a tabular form, known
as simplex tableau
After preparing the canonical form of the given LPP, first simplex
tableau is constructed.
After completing each simplex tableau (iteration), few steps
(somewhat mechanical and easy to remember) are followed.
Logically, these steps are exactly similar to the procedure described
earlier.
D Nagesh Kumar, IISc Optimization Methods: M3L3
23
Construction of Simplex Tableau:
Basic steps
Check for optimum solution:
1. Investigate whether all the elements (coefficients of the variables
headed by that column) in the first row (i.e., Z row) are
nonnegative or not. If all such coefficients are nonnegative,
optimum solution is obtained and no need of further iterations.
If any element in this row is negative follow next steps to obtain
the simplex tableau for next iteration.
D Nagesh Kumar, IISc Optimization Methods: M3L3
24
Construction of Simplex Tableau:
Basic steps
Operations to obtain next simplex tableau:
2. Identify the entering variable (described earlier) and mark that
column as Pivotal Column.
3. Identify the exiting variable from the basis as described earlier
and mark that row as Pivotal Row.
4. Mark the coefficient at the intersection of Pivotal Row and
Pivotal Column as Pivotal Element.
D Nagesh Kumar, IISc Optimization Methods: M3L3
25
Construction of Simplex Tableau:
Basic steps
Operations to obtained simplex tableau…contd.:
5. In the basis, replace the exiting variable by entering variable.
6. Divide all the elements in the pivotal row by pivotal element.
7. For any other row, identify the elementary operation such that the
coefficient in the pivotal column, in that row, becomes zero. Apply
the same operation for all other elements in that row and change
the coefficients.
Follow similar procedure for all other rows.
D Nagesh Kumar, IISc Optimization Methods: M3L3
26
Construction of Simplex Tableau:
example
Consider the same problem discussed before.
Canonical form of this LPP is
4 1 0 0 2 2 5
0 0 1 0 2 4
6 0 0 1 2 2
0 0 0 0 2 4
6 5 4 3 2 1
6 5 4 3 2 1
6 5 4 3 2 1
6 5 4 3 2 1
= + + + − −
= + + + + −
= + + + + +
= + + + + − + −
x x x x x x
x x x x x x
x x x x x x
Z x x x x x x
D Nagesh Kumar, IISc Optimization Methods: M3L3
27
Construction of Simplex Tableau:
example
Corresponding simplex tableau
D Nagesh Kumar, IISc Optimization Methods: M3L3
28
Construction of Simplex Tableau:
example
Successive iterations
D Nagesh Kumar, IISc Optimization Methods: M3L3
29
Construction of Simplex Tableau:
example
Successive iterations…contd.
D Nagesh Kumar, IISc Optimization Methods: M3L3
30
Final Tableau
D Nagesh Kumar, IISc Optimization Methods: M3L3
31
Final results from Simplex Tableau
All the elements in the first row (i.e., Z row), at iteration
4, are nonnegative. Thus, optimum solution is
achieved.
Optimum solution is
333 . 7
3
22
= = Z
556 . 1
9
14
1
= = x
889 . 0
9
8
2
= = x
1
3
= x
D Nagesh Kumar, IISc Optimization Methods: M3L3
32
It can be noted that at any iteration the following two
points must be satisfied:
1. All the basic variables (other than Z) have a coefficient of
zero in the Z row.
2. Coefficients of basic variables in other rows constitute a unit
matrix.
Violation of any of these points at any iteration indicates a
wrong calculation. However, reverse is not true.
Construction of Simplex Tableau:
A note
D Nagesh Kumar, IISc Optimization Methods: M3L3
33
Thank You
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
1
M3L4
Module – 3 Lecture Notes – 4
Simplex Method – II
Introduction
In the previous lecture the simplex method was discussed with required transformation of
objective function and constraints. However, all the constraints were of inequality type with
‘lessthanequalto’ ( ≤) sign. However, ‘greaterthanequalto’ ( ≥) and ‘equality’ ( =)
constraints are also possible. In such cases, a modified approach is followed, which will be
discussed in this lecture. Different types of LPP solutions in the context of Simplex method
will also be discussed. Finally, a discussion on minimization vs maximization will be
presented.
Simplex Method with ‘greaterthanequalto’ (
≥
) and equality (
=
) constraints
The LP problem, with ‘greaterthanequalto’ ( ≥) and equality ( =) constraints, is transformed
to its standard form in the following way.
1. One ‘artificial variable’ is added to each of the ‘greaterthanequalto’ ( ≥) and equality
( =) constraints to ensure an initial basic feasible solution.
2. Artificial variables are ‘penalized’ in the objective function by introducing a large
negative (positive) coefficient M for maximization (minimization) problem.
3. Cost coefficients, which are supposed to be placed in the Zrow in the initial simplex
tableau, are transformed by ‘pivotal operation’ considering the column of artificial
variable as ‘pivotal column’ and the row of the artificial variable as ‘pivotal row’.
4. If there are more than one artificial variable, step 3 is repeated for all the artificial
variables one by one.
Let us consider the following LP problem
1 2
1 2
2
1 2
1 2
Maximize 3 5
subject to 2
6
3 2 18
, 0
Z x x
x x
x
x x
x x
= +
+ ≥
≤
+ =
≥
After incorporating the artificial variables, the above LP problem becomes as follows:
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
2
M3L4
1 2 1 2
1 2 3 1
2 4
1 2 2
1 2
Maximize 3 5
subject to 2
6
3 2 18
, 0
Z x x Ma Ma
x x x a
x x
x x a
x x
= + − −
+ − + =
+ =
+ + =
≥
where
3
x is surplus variable,
4
x is slack variable and
1
a and
2
a are the artificial variables.
Cost coefficients in the objective function are modified considering the first constraint as
follows:
( )
( )
1 2 1 2 1
1 2 3 1 2
3 5 0
2
Z x x Ma Ma E
x x x a E
− − + + =
+ − + =
Thus, pivotal operation is
2 1
E M E × − , which modifies the cost coefficients as follows:
( ) ( ) M Ma a Mx x M x M Z 2 0 5 3
2 1 3 2 1
− = + + + + − + −
Next, the revised objective function is considered with third constraint as follows:
( ) ( ) ( )
( )
4 2 2 1
3 2 1 3 2 1
18 2 3
2 0 5 3
E a x x
E M Ma a Mx x M x M Z
= + +
− = + + + + − + −
Obviously pivotal operation is
4 3
E M E × − , which further modifies the cost coefficients as
follows:
( ) ( ) M a a Mx x M x M Z 20 0 0 3 5 4 3
2 1 3 2 1
− = + + + + − + −
The modified cost coefficients are to be used in the Zrow of the first simplex tableau.
Next, let us move to the construction of simplex tableau. Pivotal column, pivotal row and
pivotal element are marked (same as used in the last class) for the ease of understanding.
Pivotal Column
Pivotal Row
Pivotal Column
Pivotal Row
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
3
M3L4
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
1
a
2
a
r
b
rs
r
c
b
Z 1 M 4 3 − − M 3 5 − −
M 0 0 0 M 20 − 
1
a 0
1
1 1 0 1 0 2 2
4
x 0 0 1 0 1 0 0 6 
1
2
a 0
3
2 0 0 0 1 18 6
Note that while comparing ( ) M 4 3 − − and ( ) M 3 5 − − , it is decided that
( ) ( ) M M 3 5 4 3 − − < − − as M is any arbitrarily large number.
Successive iterations are shown as follows:
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
1
a
2
a
r
b
rs
r
c
b
Z 1 0 M + − 2
M 3 3 − − 0 M 4 3 + 0 M 12 6 − 
1
x 0 1 1 1 0 1 0 2 
4
x 0 0 1
0
1 0 0 6 
2
2
a 0 0 1 3 0 3 1 12 4
……continued to next page
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
4
M3L4
……continuing from previous page
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
1
a
2
a
r
b
rs
r
c
b
Z 1 0 3 0 0 M M + 1 18 
1
x
0 1
3
2
0 0 0
1
3
6 9
4
x 0 0
1
0 1 0 0 6 6
3
3
x
0 0
3
1
− 1 0 1
3
1
4 
Z 1 0 0 0 3 M M + 1 36 
1
x 0 1 0 0
2
3
− 0
1
3
2 
2
x
0 0 1 0 1 0 0 6 
4
3
x
0 0 0 1
3
1
1
3
1
6 
It is found that, at iteration 4, optimality has reached. Optimal solution is 36 Z = with
1
2 x =
and
2
6 x = . The methodology explained above is known as BigM method. Hope, reader has
already understood the meaning of the terminology!
‘Unbounded’, ‘Multiple’ and ‘Infeasible’ solutions in the context of Simplex Method
As already discussed in lecture notes 2, a linear programming problem may have different type
of solutions corresponding to different situations. Visual demonstration of these different types
of situations was also discussed in the context of graphical method. Here, the same will be
discussed in the context of Simplex method.
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
5
M3L4
Unbounded solution
If at any iteration no departing variable can be found corresponding to entering variable, the
value of the objective function can be increased indefinitely, i.e., the solution is unbounded.
Multiple (infinite) solutions
If in the final tableau, one of the nonbasic variables has a coefficient 0 in the Zrow, it
indicates that an alternative solution exists. This nonbasic variable can be incorporated in the
basis to obtain another optimal solution. Once two such optimal solutions are obtained, infinite
number of optimal solutions can be obtained by taking a weighted sum of the two optimal
solutions.
Consider the slightly revised above problem,
1 2
1 2
2
1 2
1 2
Maximize 3 2
subject to 2
6
3 2 18
, 0
Z x x
x x
x
x x
x x
= +
+ ≥
≤
+ =
≥
Curious readers may find that the only modification is that the coefficient of
2
x is changed
from 5 to 2 in the objective function. Thus the slope of the objective function and that of third
constraint are now same. It may be recalled from lecture notes 2, that if the Z line is parallel to
any side of the feasible region (i.e., one of the constraints) all the points lying on that side
constitute optimal solutions (refer fig 3 in lecture notes 2). So, reader should be able to imagine
graphically that the LPP is having infinite solutions. However, for this particular set of
constraints, if the objective function is made parallel (with equal slope) to either the first
constraint or the second constraint, it will not lead to multiple solutions. The reason is very
simple and left for the reader to find out. As a hint, plot all the constraints and the objective
function on an arithmetic paper.
Now, let us see how it can be found in the simplex tableau. Coming back to our problem, final
tableau is shown as follows. Full problem is left to the reader as practice.
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
6
M3L4
Final tableau:
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
1
a
2
a
r
b
rs
r
c
b
Z 1 0 0 0 0 M M + 1 18 
1
x 0 1
3
2
0 0 0
1
3
6 9
4
x 0 0 1 0 1 0 0 6 6
3
3
x
0 0
3
1
− 1 0 1
3
1
4 
As there is no negative coefficient in the Zrow the optimal is reached. The solution is 18 Z =
with
1
6 x = and
2
0 x = . However, the coefficient of nonbasic variable
2
x is zero as shown in
the final simplex tableau. So, another solution is possible by incorporating
2
x in the basis.
Based on the
rs
r
c
b
,
4
x will be the exiting variable. The next tableau will be as follows:
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
1
a
2
a
r
b
rs
r
c
b
Z 1 0 0 0 0 M M + 1 18 
1
x 0 1 0 0
2
3
− 0
1
3
2 
2
x
0 0 1 0 1 0 0 6 6
4
3
x
0 0 0 1
3
1
1
3
1
6 18
Thus, another solution is obtained, which is 18 Z = with
1
2 x = and
2
6 x = . Again, it may be
noted that, the coefficient of nonbasic variable
4
x is zero as shown in the tableau. If one more
similar step is performed, same simplex tableau at iteration 3 will be obtained.
Coefficient of nonbasic variable
2
x is zero
Coefficient of nonbasic variable
4
x is zero
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
7
M3L4
Thus, we have two sets of solutions as
6
0
⎧ ⎫
⎪ ⎪
⎨ ⎬
⎪ ⎪
⎩ ⎭
and
2
6
⎧ ⎫
⎪ ⎪
⎨ ⎬
⎪ ⎪
⎩ ⎭
. Other optimal solutions will be obtained
as
( )
6 2
1
0 6
β β
⎧ ⎫ ⎧ ⎫
⎪ ⎪ ⎪ ⎪
+ −
⎨ ⎬ ⎨ ⎬
⎪ ⎪ ⎪ ⎪
⎩ ⎭ ⎩ ⎭
where,
[ ]
0,1 β ∈ . For example, let 0.4 β = , corresponding solution is
3.6
3.6
⎧ ⎫
⎪ ⎪
⎨ ⎬
⎪ ⎪
⎩ ⎭
, i.e.,
1
3.6 x = and
2
3.6 x = . Note that values of the objective function are not changed
for different sets of solution; for all the cases 18 Z = .
Infeasible solution
If in the final tableau, at least one of the artificial variables still exists in the basis, the solution
is indefinite.
Reader may check this situation both graphically and in the context of Simplex method by
considering following problem:
1 2
1 2
1 2
1 2
Maximize 3 2
subject to 2
3 2 18
, 0
Z x x
x x
x x
x x
= +
+ ≤
+ ≥
≥
Minimization versus maximization problems
As discussed earlier, standard form of LP problems consist of a maximizing objective function.
Simplex method is described based on the standard form of LP problems, i.e., objective
function is of maximization type. However, if the objective function is of minimization type,
simplex method may still be applied with a small modification. The required modification can
be done in either of following two ways.
1. The objective function is multiplied by 1 − so as to keep the problem identical and
‘minimization’ problem becomes ‘maximization’. This is because of the fact that
minimizing a function is equivalent to the maximization of its negative.
2. While selecting the entering nonbasic variable, the variable having the maximum
coefficient among all the cost coefficients is to be entered. In such cases, optimal
Optimization Methods: Linear Programming Simplex Method  II
D Nagesh Kumar, IISc, Bangalore
8
M3L4
solution would be determined from the tableau having all the cost coefficients as non
positive ( 0 ≤ )
Still one difficulty remains in the minimization problem. Generally the minimization problems
consist of constraints with ‘greaterthanequalto’ ( ≥) sign. For example, minimize the price
(to compete in the market); however, the profit should cross a minimum threshold. Whenever
the goal is to minimize some objective, lower bounded requirements play the leading role.
Constraints with ‘greaterthanequalto’ ( ≥) sign are obvious in practical situations.
To deal with the constraints with ‘greaterthanequalto’ ( ≥) and = sign, BigM method is to
be followed as explained earlier.
D Nagesh Kumar, IISc Optimization Methods: M3L4
1
Linear Programming
Simplex method  II
D Nagesh Kumar, IISc Optimization Methods: M3L4
2
Objectives
Objectives
z To discuss the BigM method
z Discussion on different types of LPP
solutions in the context of Simplex method
z Discussion on maximization verses
minimization problems
D Nagesh Kumar, IISc Optimization Methods: M3L4
3
BigM Method
Simplex method for LP problem with ‘greaterthan
equalto’ ( ) and ‘equality’ (=) constraints
needs a modified approach. This is known as
BigM method.
z The LPP is transformed to its standard form by
incorporating a large coefficient M
≥
D Nagesh Kumar, IISc Optimization Methods: M3L4
4
Transformation of LPP for BigM
method
1. One ‘artificial variable’ is added to each of the ‘greaterthan
equalto’ (≥) and equality (=) constraints to ensure an initial
basic feasible solution.
2. Artificial variables are ‘penalized’ in the objective function by
introducing a large negative (positive) coefficient for
maximization (minimization) problem.
3. Cost coefficients, which are supposed to be placed in the Z
row in the initial simplex tableau, are transformed by ‘pivotal
operation’ considering the column of artificial variable as
‘pivotal column’ and the row of the artificial variable as ‘pivotal
row’.
4. If there are more than one artificial variables, step 3 is
repeated for all the artificial variables one by one.
D Nagesh Kumar, IISc Optimization Methods: M3L4
5
Example
Consider the following problem
1 2
1 2
2
1 2
1 2
Maximize 3 5
subject to 2
6
3 2 18
, 0
Z x x
x x
x
x x
x x
= +
+ ≥
≤
+ =
≥
D Nagesh Kumar, IISc Optimization Methods: M3L4
6
Example
z After incorporating the artificial variables
where x
3
is surplus variable, x
4
is slack variable and a
1
and a
2
are the artificial variables
1 2 1 2
1 2 3 1
2 4
1 2 2
1 2
Maximize 3 5
subject to 2
6
3 2 18
, 0
Z x x Ma Ma
x x x a
x x
x x a
x x
= + − −
+ − + =
+ =
+ + =
≥
D Nagesh Kumar, IISc Optimization Methods: M3L4
7
Transformation of cost coefficients
Considering the objective function and the first constraint
( )
( )
1 2 1 2 1
1 2 3 1 2
3 5 0
2
Z x x Ma Ma E
x x x a E
− − + + =
+ − + =
Pivotal Column
Pivotal Row
By the pivotal operation
2 1
E M E × −
the cost coefficients are modified as
( ) ( ) M Ma a Mx x M x M Z 2 0 5 3
2 1 3 2 1
− = + + + + − + −
D Nagesh Kumar, IISc Optimization Methods: M3L4
8
Transformation of cost coefficients
Considering the modified objective function and the third
constraint
Pivotal Column
Pivotal Row
( )
By the pivotal operation
the cost coefficients are modified as
( ) ( )
( )
1 2 3 1 2 3
1 2 2 4
3 5 0 2
3 2 18
Z M x M x Mx a Ma M E
x x a E
− + − + + + + = −
+ + =
4 3
E M E × −
( ) ( ) M a a Mx x M x M Z 20 0 0 3 5 4 3
2 1 3 2 1
− = + + + + − + −
D Nagesh Kumar, IISc Optimization Methods: M3L4
9
Construction of Simplex
Tableau
Corresponding simplex tableau
Pivotal row, pivotal column and pivotal elements are shown as earlier
D Nagesh Kumar, IISc Optimization Methods: M3L4
10
Simplex Tableau…contd.
Successive simplex tableaus are as follows:
D Nagesh Kumar, IISc Optimization Methods: M3L4
11
Simplex Tableau…contd.
D Nagesh Kumar, IISc Optimization Methods: M3L4
12
Simplex Tableau…contd.
Optimality has reached. Optimal solution is Z = 36 with x
1
= 2 and x
2
= 6
D Nagesh Kumar, IISc Optimization Methods: M3L4
13
Simplex method: ‘Unbounded’,
‘Multiple’ and ‘Infeasible’ solutions
Unbounded solution
z If at any iteration no departing variable can be found
corresponding to entering variable, the value of the
objective function can be increased indefinitely, i.e.,
the solution is unbounded.
D Nagesh Kumar, IISc Optimization Methods: M3L4
14
Simplex method: ‘Unbounded’,
‘Multiple’ and ‘Infeasible’ solutions
Multiple (infinite) solutions
z If in the final tableau, one of the nonbasic variables
has a coefficient 0 in the Zrow, it indicates that an
alternative solution exists.
z This nonbasic variable can be incorporated in the
basis to obtain another optimal solution.
z Once two such optimal solutions are obtained,
infinite number of optimal solutions can be obtained
by taking a weighted sum of the two optimal
solutions.
D Nagesh Kumar, IISc Optimization Methods: M3L4
15
Simplex method: Example of
Multiple (indefinite) solutions
Consider the following problem
1 2
1 2
2
1 2
1 2
Maximize 3 2
subject to 2
6
3 2 18
, 0
Z x x
x x
x
x x
x x
= +
+ ≥
≤
+ =
≥
z Only modification, compared to earlier problem, is that the
coefficient of x
2
is changed from 5 to 2 in the objective function.
z Thus the slope of the objective function and that of third
constraint are now same, which leads to multiple solutions
D Nagesh Kumar, IISc Optimization Methods: M3L4
16
Simplex method: Example of
Multiple (indefinite) solutions
Following similar procedure as described earlier, final simplex
tableau for the problem is as follows:
D Nagesh Kumar, IISc Optimization Methods: M3L4
17
Simplex method: Example of
Multiple (indefinite) solutions
As there is no negative coefficient in the Zrow optimal solution
is reached.
Optimal solution is Z = 18 with x
1
= 6 and x
2
= 0
However, the coefficient of nonbasic variable x
2
is zero in the Zrow
Another solution is possible by incorporating x
2
in the basis
Based on the , x
4
will be the exiting variable
rs
r
c
b
D Nagesh Kumar, IISc Optimization Methods: M3L4
18
Simplex method: Example of
Multiple (indefinite) solutions
So, another optimal solution is Z = 18 with x
1
= 2 and x
2
= 6
If one more similar step is performed, previous simplex tableau will be obtained back
D Nagesh Kumar, IISc Optimization Methods: M3L4
19
Simplex method: Example of
Multiple (indefinite) solutions
Thus, two sets of solutions are: and
Other optimal solutions will be obtained as
where
For example, let β = 0.4, corresponding solution is
Note that values of the objective function are not
changed for different sets of solution; for all the
cases Z = 18.
6
0
⎧ ⎫
⎪ ⎪
⎨ ⎬
⎪ ⎪
⎩ ⎭
2
6
⎧ ⎫
⎪ ⎪
⎨ ⎬
⎪ ⎪
⎩ ⎭
( )
6 2
1
0 6
β β
⎧ ⎫ ⎧ ⎫
⎪ ⎪ ⎪ ⎪
+ −
⎨ ⎬ ⎨ ⎬
⎪ ⎪ ⎪ ⎪
⎩ ⎭ ⎩ ⎭
[ ]
0,1 β ∈
3.6
3.6
⎧ ⎫
⎪ ⎪
⎨ ⎬
⎪ ⎪
⎩ ⎭
D Nagesh Kumar, IISc Optimization Methods: M3L4
20
Simplex method: ‘Unbounded’,
‘Multiple’ and ‘Infeasible’ solutions
Infeasible solution
z If in the final tableau, at least one of the artificial
variables still exists in the basis, the solution is
indefinite.
D Nagesh Kumar, IISc Optimization Methods: M3L4
21
Minimization versus
maximization problems
z Simplex method is described based on the
standard form of LP problems, i.e., objective
function is of maximization type
z However, if the objective function is of
minimization type, simplex method may still
be applied with a small modification
D Nagesh Kumar, IISc Optimization Methods: M3L4
22
Minimization versus
maximization problems
The required modification can be done in either of
following two ways.
1. The objective function is multiplied by 1 so as to keep the
problem identical and ‘minimization’ problem becomes
‘maximization’. This is because minimizing a function is
equivalent to the maximization of its negative
2. While selecting the entering nonbasic variable, the variable
having the maximum coefficient among all the cost
coefficients is to be entered. In such cases, optimal
solution would be determined from the tableau having all
the cost coefficients as nonpositive ( ) 0 ≤
D Nagesh Kumar, IISc Optimization Methods: M3L4
23
Minimization versus
maximization problems
z One difficulty, that remains in the minimization
problem, is that it consists of the constraints with
‘greaterthanequalto’ ( ) sign. For example,
minimize the price (to compete in the market),
however, the profit should cross a minimum
threshold. Whenever the goal is to minimize some
objective, lower bounded requirements play the
leading role. Constraints with ‘greaterthanequalto’
( ) sign are obvious in practical situations.
z To deal with the constraints with ‘greaterthan
equalto’ ( ) and equality sign, BigM method is to
be followed as explained earlier.
≥
≥
≥
D Nagesh Kumar, IISc Optimization Methods: M3L4
24
Thank You
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
1
M3L5
Module – 3 Lecture Notes – 5
Revised Simplex Method, Duality and Sensitivity analysis
Introduction
In the previous class, the simplex method was discussed where the simplex tableau at each
iteration needs to be computed entirely. However, revised simplex method is an improvement
over simplex method. Revised simplex method is computationally more efficient and accurate.
Duality of LP problem is a useful property that makes the problem easier in some cases and
leads to dual simplex method. This is also helpful in sensitivity or post optimality analysis of
decision variables.
In this lecture, revised simplex method, duality of LP, dual simplex method and sensitivity or
post optimality analysis will be discussed.
Revised Simplex method
Benefit of revised simplex method is clearly comprehended in case of large LP problems. In
simplex method the entire simplex tableau is updated while a small part of it is used. The
revised simplex method uses exactly the same steps as those in simplex method. The only
difference occurs in the details of computing the entering variables and departing variable as
explained below.
Let us consider the following LP problem, with general notations, after transforming it to its
standard form and incorporating all required slack, surplus and artificial variables.
( )
( )
( )
( )
1 1 2 2 3 3
11 1 12 2 13 3 1 1
21 1 22 2 23 3 2 2
1 1 2 2 3 3
0
n n
i n n
j n n
l m m m mn n m
Z c x c x c x c x Z
x c x c x c x c x b
x c x c x c x c x b
x c x c x c x c x b
+ + + + + =
+ + + + =
+ + + + =
+ + + + =
L L L
L L L
L L L
M M M
M M M
L L L
As the revised simplex method is mostly beneficial for large LP problems, it will be
discussed in the context of matrix notation. Matrix notation of above LP problem can be
expressed as follows:
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
2
M3L5
: with
: subject to
z Minimize
T
0 X
B AX
X C
≥
=
=
where
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
x
x
x
Μ
2
1
X ,
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
c
c
c
Μ
2
1
C ,
1
2
m
b
b
b
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ ⎥ =
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎣ ⎦
B
M
,
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
0
0
0
Μ
0 ,
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
mn m m
n
n
c c c
c c c
c c c
Λ
Μ Ο Μ Μ
Λ
Λ
2 1
2 22 21
1 12 11
A
It can be noted for subsequent discussion that column vector corresponding to a decision
variable
k
x is
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
mk
k
k
c
c
c
Μ
2
1
.
Let
S
X is the column vector of basic variables. Also let
S
C is the row vector of costs
coefficients corresponding to
S
X and S is the basis matrix corresponding to
S
X .
1. Selection of entering variable
For each of the nonbasic variables, calculate the coefficient ( ) c WP − , where, P is the
corresponding column vector associated with the nonbasic variable at hand, c is the cost
coefficient associated with that nonbasic variable and
1 −
= S C W
S
.
For maximization (minimization) problem, nonbasic variable, having the lowest negative
(highest positive) coefficient, as calculated above, is the entering variable.
2. Selection of departing variable
a. A new column vector U is calculated as B S U
1 −
= .
b. Corresponding to the entering variable, another vector V is calculated as P S V
1 −
= ,
where P is the column vector corresponding to entering variable.
c. It may be noted that length of both Uand V is same ( m = ). For m i , , 1 Λ = , the
ratios,
( )
( ) i
i
V
U
, are calculated provided ( ) 0 > i V . r i = , for which the ratio is least, is
noted. The r
th
basic variable of the current basis is the departing variable.
If it is found that ( ) 0 ≤ i V for all i , then further calculation is stopped concluding that
bounded solution does not exist for the LP problem at hand.
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
3
M3L5
3. Update to new basis
Old basis S , is updated to new basis
new
S , as [ ]
1
1
−
−
= ES S
new
where
1
2
1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
r
m
m
η
η
η
η
η
−
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
=
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎣ ⎦
E
L L
L L
M M O M L M M
M M L L M M
M M L M O M M
L L
L L
and
( )
( )
( )
⎪
⎪
⎩
⎪
⎪
⎨
⎧
=
≠
=
r i
r V
r i
r V
i V
i
for
1
for
η
S is replaced by
new
S and steps 1 through 3 are repeated. If all the coefficients calculated in
step 1, i.e., ( ) c WP − is positive (negative) in case of maximization (minimization) problem,
then optimum solution is reached and the optimal solution is,
B S X
S
1 −
= and
S
CX = z
Duality of LP problems
Each LP problem (called as Primal in this context) is associated with its counterpart known
as Dual LP problem. Instead of primal, solving the dual LP problem is sometimes easier
when a) the dual has fewer constraints than primal (time required for solving LP problems is
directly affected by the number of constraints, i.e., number of iterations necessary to
converge to an optimum solution which in Simplex method usually ranges from 1.5 to 3
times the number of structural constraints in the problem) and b) the dual involves
maximization of an objective function (it may be possible to avoid artificial variables that
otherwise would be used in a primal minimization problem).
The dual LP problem can be constructed by defining a new decision variable for each
constraint in the primal problem and a new constraint for each variable in the primal. The
coefficients of the j
th
variable in the dual’s objective function is the i
th
component of the
primal’s requirements vector (right hand side values of the constraints in the Primal). The
dual’s requirements vector consists of coefficients of decision variables in the primal
objective function. Coefficients of each constraint in the dual (i.e., row vectors) are the
r
th
column
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
4
M3L5
column vectors associated with each decision variable in the coefficients matrix of the primal
problem. In other words, the coefficients matrix of the dual is the transpose of the primal’s
coefficient matrix. Finally, maximizing the primal problem is equivalent to minimizing the
dual and their respective values will be exactly equal.
When a primal constraint is less than equal to in equality, the corresponding variable in the
dual is nonnegative. And equality constraint in the primal problem means that the
corresponding dual variable is unrestricted in sign. Obviously, dual’s dual is primal. In
summary the following relationships exists between primal and dual.
Primal Dual
Maximization Minimization
Minimization Maximization
th
i variable
th
i constraint
th
j constraint
th
j variable
0
i
x ≥
Inequality sign of
th
i Constraint:
≤ if dual is maximization
≥ if dual is minimization
th
i variable unrestricted
th
i constraint with = sign
th
j constraint with = sign
th
j variable unrestricted
RHS of
th
j constraint
Cost coefficient associated with
th
j
variable in the objective function
Cost coefficient associated with
th
i variable in the objective
function
RHS of
th
i constraint
See the pictorial representation in the next page for better understanding and quick reference:
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
5
M3L5
Coefficients
of the 2
nd
constraint
Determine the
sign of
1
y
Determine the
sign of
2
y
1 1 2 2
11 1 12 2 1 1 1
21 1 22 2 2 2 2
1 1 2 2
1 2
Maximize
Subject to
0, unrestricted, , 0
n n
n n
n n
m m mn n m m
n
Z c x c x c x
c x c x c x b y
c x c x c x b y
c x c x c x b y
x x x
= + + +
+ + + = ⎯⎯→
+ + + ≤ ⎯⎯→
+ + + ≤ ⎯⎯→
≥ ≥
L L L
L L L
L L L
M M
L L L
L
M
M
M
M
L L
1 1 2 2
11 1 21 2 1 1
12 1 22 2 2 2
1 1 2 2
1 2
Minimize
Subject to
unrestricted, 0, , 0
m m
m m
m m
n n mn m n
m
Z b y b y b y
c y c y c y c
c y c y c y c
c y c y c y c
y y y
= + + +
+ + + ≤
+ + + =
+ + + ≤
≥ ≥
L L L
L L L
L L L
M M
L L L
L
Opposite for the Dual,
i.e., Minimize
Cost coefficients for
the Objective Function
Mark the corresponding
decision variables in the dual
Coefficients
of the 1
st
constraint
Corresponding
sign of the 1
st
constraint is ≤
Right hand
side of the 1
st
constraint
Thus the Objective Function,
1 1 2 2
Minimize
m m
b y b y b y + + + L
Thus, the 1
st
constraint,
11 1 21 2 1 1 m m
c y c y c y c + + + ≤ L
Corresponding
sign of the 2
nd
constraint is =
Right hand
side of the 2
nd
constraint
Thus, the 2
nd
constraint,
12 1 22 2 2 2 m m
c y c y c y c + + + = L
Dual Problem
Determine the
sign of
m
y
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
6
M3L5
It may be noted that, before finding its dual, all the constraints should be transformed to ‘less
thanequalto’ or ‘equalto’ type for maximization problem and to ‘greaterthanequalto’ or
‘equalto’ type for minimization problem. It can be done by multiplying with 1 − both sides
of the constraints, so that inequality sign gets reversed.
An example of finding dual problem is illustrated with the following example.
Primal Dual
Maximize
2 1
3 4 x x Z + = Minimize
3 2 1
4000 2000 6000 y y y Z + − = ′
Subject to
6000
3
2
2 1
≤ + x x
2000
2 1
≥ − x x
4000
1
≤ x
1
x unrestricted
0
2
≥ x
Subject to
4
3 2 1
= + − y y y
3
3
2
2 1
≤ + y y
0
1
≥ y
0
2
≥ y
0
3
≥ y
It may be noted that second constraint in the primal is transformed to
1 2
2000 x x − + ≤ −
before constructing the dual.
PrimalDual relationships
Following points are important to be noted regarding primaldual relationship:
1. If one problem (either primal or dual) has an optimal feasible solution, other problem
also has an optimal feasible solution. The optimal objective function value is same for
both primal and dual.
2. If one problem has no solution (infeasible), the other problem is either infeasible or
unbounded.
3. If one problem is unbounded the other problem is infeasible.
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
7
M3L5
Dual Simplex Method
Computationally, dual simplex method is same as simplex method. However, their
approaches are different from each other. Simplex method starts with a nonoptimal but
feasible solution where as dual simplex method starts with an optimal but infeasible solution.
Simplex method maintains the feasibility during successive iterations where as dual simplex
method maintains the optimality. Steps involved in the dual simplex method are:
1. All the constraints (except those with equality (=) sign) are modified to ‘lessthan
equalto’ ( ≤) sign. Constraints with greaterthanequalto’ ( ≥) sign are multiplied by
1 − through out so that inequality sign gets reversed. Finally, all these constraints are
transformed to equality (=) sign by introducing required slack variables.
2. Modified problem, as in step one, is expressed in the form of a simplex tableau. If all
the cost coefficients are positive (i.e., optimality condition is satisfied) and one or
more basic variables have negative values (i.e., nonfeasible solution), then dual
simplex method is applicable.
3. Selection of exiting variable: The basic variable with the highest negative value is
the exiting variable. If there are two candidates for exiting variable, any one is
selected. The row of the selected exiting variable is marked as pivotal row.
4. Selection of entering variable: Cost coefficients, corresponding to all the negative
elements of the pivotal row, are identified. Their ratios are calculated after changing
the sign of the elements of pivotal row, i.e.,
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
× −
=
row pivotal of Elements
ts Coefficien Cost
ratio
1
.
The column corresponding to minimum ratio is identified as the pivotal column and
associated decision variable is the entering variable.
5. Pivotal operation: Pivotal operation is exactly same as in the case of simplex
method, considering the pivotal element as the element at the intersection of pivotal
row and pivotal column.
6. Check for optimality: If all the basic variables have nonnegative values then the
optimum solution is reached. Otherwise, Steps 3 to 5 are repeated until the optimum is
reached.
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
8
M3L5
Consider the following problem:
1 2
12 3 4
24 4 3
2 to subject
2 Minimize
2 1
2 1
2 1
1
2 1
≥ + −
≥ +
≤ +
≥
+ =
x x
x x
x x
x
x x Z
By introducing the surplus variables, the problem is reformulated with equality constraints as
follows:
1 2
12 3 4
24 4 3
2 to subject
2 Minimize
6 2 1
5 2 1
4 2 1
3 1
2 1
− = + −
− = + − −
= + +
− = + −
+ =
x x x
x x x
x x x
x x
x x Z
Expressing the problem in the tableau form:
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
Z 1 2 1 0 0 0 0 0
3
x
0 1 0 1 0 0 0 2
4
x 0 3 4 0 1 0 0 24
5
x
0 4
3
0 0 1 0 12
1
6
x
0 1 2 0 0 0 1 1
Ratios Æ 0.5 1/3   0 
Pivotal Column
Pivotal Element
Pivotal Row
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
9
M3L5
Tableaus for successive iterations are shown below. Pivotal Row, Pivotal Column and Pivotal
Element for each tableau are marked as usual.
Variables
Iteration Basis
Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
Z 1 2/3 0 0 0 1/3 0 4
3
x
0
1
0 1 0 0 0 2
4
x 0 7/3 0 0 1 4/3 0 8
2
x 0 4/3 1 0 0 1/3 0 4
2
6
x
0 11/3 0 0 0 2/3 1 7
Ratios Æ 2/3     
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
Z 1 0 0 2/3 0 1/3 0 16/3
1
x 0 1 0 1 0 0 0 2
4
x 0 0 0 7/3 1 4/3 0 38/3
2
x 0 0 1 4/3 0 1/3 0 4/3
3
6
x
0 0 0 11/3 0
2/3
1 1/3
Ratios Æ     0.5 
Variables
Iteration Basis Z
1
x
2
x
3
x
4
x
5
x
6
x
r
b
Z 1 0 0 2.5 0 0 0.5 5.5
1
x 0 1 0 1 0 0 0 2
4
x 0 0 0 5 1 0 2 12
2
x 0 0 1 0.5 0 0 0.5 1.5
4
5
x
0 0 0 5.5 0 1 1.5 0.5
Ratios Æ
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
10
M3L5
As all the
r
b are positive, optimum solution is reached. Thus, the optimal solution is 5 . 5 = Z
with 2
1
= x and 5 . 1
2
= x .
Solution of Dual from Final Simplex Tableau of Primal
Primal Dual
Final simplex tableau of primal:
As illustrated above solution for the dual can be obtained corresponding to the coefficients of
slack variables of respective constraints in the primal, in the Z row as, 1
1
= y ,
3
1
2
= y and
3
1
3
= y and Z’=Z=22/3.
y
1
y
2
y
3
0 , ,
4 2 2 5
0 2 4
6 2 2 to subject
2 4 Maximize
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
≥
≤ − −
≤ + −
≤ + +
+ − =
x x x
x x x
x x x
x x x
x x x Z
0 , ,
2 2 2 2
1 2 4
4 5 2 to subject
4 0 6 ' Minimize
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
≥
≥ − +
− ≥ − −
≥ + +
+ + =
y y y
y y y
y y y
y y y
y y y Z
Z’
Optimization Methods: Linear Programming Revised Simplex Method
D Nagesh Kumar, IISc, Bangalore
11
M3L5
Sensitivity or post optimality analysis
A dual variable, associated with a constraint, indicates a change in Z value (optimum) for a
small change in RHS of that constraint. Thus,
j i
Z y b ∆ = ∆
where
j
y is the dual variable associated with the
th
i constraint,
i
b ∆ is the small change in the
RHS of
th
i constraint, and Z ∆ is the change in objective function owing to
i
b ∆ .
Let, for a LP problem,
th
i constraint be
1 2
2 50 x x + ≤ and the optimum value of the objective
function be 250. What if the RHS of the
th
i constraint changes to 55, i.e.,
th
i constraint
changes to
1 2
2 55 x x + ≤ ? To answer this question, let, dual variable associated with the
th
i
constraint is
j
y , optimum value of which is 2.5 (say). Thus, 55 50 5
i
b ∆ = − = and 2.5
j
y = .
So, 2.5 5 12.5
j i
Z y b ∆ = ∆ = × = and revised optimum value of the objective function is
( )
250 12.5 262.5 + = .
It may be noted that
i
b ∆ should be so chosen that it will not cause a change in the optimal
basis.
D Nagesh Kumar, IISc Optimization Methods: M3L5
1
Linear Programming
Revised Simplex Method,
Duality of LP problems
and Sensitivity analysis
D Nagesh Kumar, IISc Optimization Methods: M3L5
2
Introduction
Revised simplex method is an improvement over simplex method. It is
computationally more efficient and accurate.
Duality of LP problem is a useful property that makes the problem
easier in some cases
Dual simplex method is computationally similar to simplex method.
However, their approaches are different from each other.
PrimalDual relationship is also helpful in sensitivity or post optimality
analysis of decision variables.
D Nagesh Kumar, IISc Optimization Methods: M3L5
3
Objectives
Objectives
z To explain revised simplex method
z To discuss about duality of LP and PrimalDual relationship
z To illustrate dual simplex method
z To end with sensitivity or post optimality analysis
D Nagesh Kumar, IISc Optimization Methods: M3L5
4
Revised Simplex method: Introduction
z Benefit of revised simplex method is clearly
comprehended in case of large LP problems.
z In simplex method the entire simplex tableau is
updated while a small part of it is used.
z The revised simplex method uses exactly the same
steps as those in simplex method.
z The only difference occurs in the details of computing
the entering variables and departing variable.
D Nagesh Kumar, IISc Optimization Methods: M3L5
5
Revised Simplex method
Consider the following LP problem (with general notations, after
transforming it to its standard form and incorporating all required slack,
surplus and artificial variables)
( )
( )
( )
( )
1 1 2 2 3 3
11 1 12 2 13 3 1 1
21 1 22 2 23 3 2 2
1 1 2 2 3 3
0
n n
i n n
j n n
l m m m mn n m
Z c x c x c x c x Z
x c x c x c x c x b
x c x c x c x c x b
x c x c x c x c x b
+ + + + + =
+ + + + =
+ + + + =
+ + + + =
LLL
LLL
LLL
M M M
M M M
LLL
As the revised simplex method is mostly beneficial for large LP
problems, it will be discussed in the context of matrix notation.
D Nagesh Kumar, IISc Optimization Methods: M3L5
6
Revised Simplex method: Matrix form
Matrix notation
: with
: subject to
z Minimize
T
0 X
B AX
X C
≥
=
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
x
x
x
M
2
1
X
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
c
c
c
M
2
1
C
1
2
m
b
b
b
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ ⎥
=
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎣ ⎦
B
M
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
0
0
0
M
0
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
mn m m
n
n
c c c
c c c
c c c
L
M O M M
L
L
2 1
2 22 21
1 12 11
A
where
D Nagesh Kumar, IISc Optimization Methods: M3L5
7
Revised Simplex method: Notations
Notations for subsequent discussions:
Column vector corresponding to a decision variable is .
is the column vector of basic variables
is the row vector of cost coefficients corresponding to ,
and
is the basis matrix corresponding to
S
X
S
X
S
C
S
S
X
k
x
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
mk
k
k
c
c
c
M
2
1
D Nagesh Kumar, IISc Optimization Methods: M3L5
8
Revised Simplex method:
Iterative steps
1. Selection of entering variable
For each of the nonbasic variables, calculate the coefficient
(WP  c), where, P is the corresponding column vector
associated with the nonbasic variable at hand, c is the cost
coefficient associated with that nonbasic variable and W =
C
S
S
1
.
For maximization (minimization) problem, nonbasic
variable, having the lowest negative (highest positive)
coefficient, as calculated above, is the entering variable.
D Nagesh Kumar, IISc Optimization Methods: M3L5
9
Revised Simplex method:
Iterative steps
2. Selection of departing variable
a) A new column vector U is calculated as U = S
1
B
b) Corresponding to the entering variable, another vector V is
calculated as V = S
1
P, where P is the column vector
corresponding to entering variable.
c) It may be noted that length of both U and V is same (= m). For
i = 1,…, m, the ratios, U(i)/V(i), are calculated provided V(i) > 0.
i = r , for which the ratio is least, is noted. The r
th
basic
variable of the current basis is the departing variable.
If it is found that V(i) < 0 for all i, then further calculation is stopped
concluding that bounded solution does not exist for the LP problem at
hand.
D Nagesh Kumar, IISc Optimization Methods: M3L5
10
Revised Simplex method:
Iterative steps
3. Update to new Basis
Old basis S, is updated to new basis S
new
, as S
new
= [ E S
1
]
1
where
( )
( )
( )
⎪
⎪
⎩
⎪
⎪
⎨
⎧
=
≠
=
r i
r V
r i
r V
i V
i
for
1
for
η
and
r
th
column
1
2
1
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
r
m
m
η
η
η
η
η
−
⎡ ⎤
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
=
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎢ ⎥
⎣ ⎦
E
L L
L L
M M O M L M M
M M L L M M
M M L M O M M
L L
L L
D Nagesh Kumar, IISc Optimization Methods: M3L5
11
Revised Simplex method:
Iterative steps
S is replaced by S
new
and steps1 through 3 are repeated.
If all the coefficients calculated in step 1, i.e., is positive (negative)
in case of maximization (minimization) problem, then optimum
solution is reached
The optimal solution is
X
S
=S
1
B and z = CX
S
D Nagesh Kumar, IISc Optimization Methods: M3L5
12
Duality of LP problems
z Each LP problem (called as Primal in this context) is
associated with its counterpart known as Dual LP problem.
z Instead of primal, solving the dual LP problem is sometimes
easier in following cases
a) The dual has fewer constraints than primal
Time required for solving LP problems is directly affected by the
number of constraints, i.e., number of iterations necessary to
converge to an optimum solution, which in Simplex method
usually ranges from 1.5 to 3 times the number of structural
constraints in the problem
b) The dual involves maximization of an objective function
It may be possible to avoid artificial variables that otherwise would
be used in a primal minimization problem.
D Nagesh Kumar, IISc Optimization Methods: M3L5
13
Finding Dual of a LP problem
Inequality sign of i
th
Constraint:
if dual is maximization
if dual is minimization
x
i
> 0
j
th
variable j
th
constraint
i
th
constraint i
th
variable
Maximization Minimization
Minimization Maximization
Dual Primal
≥
≤
…contd. to next slide
D Nagesh Kumar, IISc Optimization Methods: M3L5
14
Finding Dual of a LP problem…contd.
RHS of i
th
constraint constraints
Cost coefficient associated with
i
th
variable in the objective
function
Cost coefficient associated with j
th
variable in the objective function
RHS of j
th
constraint
j
th
variable unrestricted j
th
constraint with = sign
i
th
constraint with = sign i
th
variable unrestricted
Dual
Primal
Refer class notes for pictorial representation of all the operations
D Nagesh Kumar, IISc Optimization Methods: M3L5
15
Dual from a Primal
D Nagesh Kumar, IISc Optimization Methods: M3L5
16
Finding Dual of a LP problem…contd.
Note:
Before finding its dual, all the constraints should be
transformed to ‘lessthanequalto’ or ‘equalto’ type for
maximization problem and to ‘greaterthanequalto’ or
‘equalto’ type for minimization problem.
It can be done by multiplying with 1 both sides of the
constraints, so that inequality sign gets reversed.
D Nagesh Kumar, IISc Optimization Methods: M3L5
17
Finding Dual of a LP problem:
An example
Primal Dual
Maximize Minimize
Subject to Subject to
6000
3
2
2 1
≤ + x x
2000
2 1
≥ − x x
4000
1
≤ x
3
3
2
2 1
≤ + y y
4
3 2 1
= + − y y y
1
unrestricted x
0
2
≥ x
0
1
≥ y
0
2
≥ y
2 1
3 4 x x Z + =
3 2 1
4000 2000 6000 y y y Z + − =
′
Note: Second constraint in the primal is transformed to
before constructing the dual.
1 2
2000 x x − + ≤ −
0
3
≥ y
D Nagesh Kumar, IISc Optimization Methods: M3L5
18
PrimalDual relationships
z If one problem (either primal or dual) has an optimal
feasible solution, other problem also has an optimal
feasible solution. The optimal objective function
value is same for both primal and dual.
z If one problem has no solution (infeasible), the other
problem is either infeasible or unbounded.
z If one problem is unbounded the other problem is
infeasible.
D Nagesh Kumar, IISc Optimization Methods: M3L5
19
Dual Simplex Method
Simplex Method verses Dual Simplex Method
1. Simplex method starts with a nonoptimal but
feasible solution where as dual simplex method
starts with an optimal but infeasible solution.
2. Simplex method maintains the feasibility during
successive iterations where as dual simplex
method maintains the optimality.
D Nagesh Kumar, IISc Optimization Methods: M3L5
20
Dual Simplex Method: Iterative steps
Steps involved in the dual simplex method are:
1. All the constraints (except those with equality (=) sign) are
modified to ‘lessthanequalto’ sign. Constraints with
greaterthanequalto’ sign are multiplied by 1 through out
so that inequality sign gets reversed. Finally, all these
constraints are transformed to equality sign by introducing
required slack variables.
2. Modified problem, as in step one, is expressed in the form
of a simplex tableau. If all the cost coefficients are positive
(i.e., optimality condition is satisfied) and one or more
basic variables have negative values (i.e., nonfeasible
solution), then dual simplex method is applicable.
D Nagesh Kumar, IISc Optimization Methods: M3L5
21
Dual Simplex Method: Iterative
steps…contd.
3. Selection of exiting variable: The basic variable with the
highest negative value is the exiting variable. If there are two
candidates for exiting variable, any one is selected. The row
of the selected exiting variable is marked as pivotal row.
4. Selection of entering variable: Cost coefficients,
corresponding to all the negative elements of the pivotal row,
are identified. Their ratios are calculated after changing the
sign of the elements of pivotal row, i.e.,
The column corresponding to minimum ratio is identified as
the pivotal column and associated decision variable is the
entering variable.
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
× −
=
row pivotal of Elements
ts Coefficien Cost
ratio
1
D Nagesh Kumar, IISc Optimization Methods: M3L5
22
Dual Simplex Method: Iterative
steps…contd.
5. Pivotal operation: Pivotal operation is exactly
same as in the case of simplex method,
considering the pivotal element as the element at
the intersection of pivotal row and pivotal column.
6. Check for optimality: If all the basic variables
have nonnegative values then the optimum solution
is reached. Otherwise, Steps 3 to 5 are repeated
until the optimum is reached.
D Nagesh Kumar, IISc Optimization Methods: M3L5
23
Dual Simplex Method:
An Example
Consider the following problem:
1 2
12 3 4
24 4 3
2 to subject
2 Minimize
2 1
2 1
2 1
1
2 1
≥ + −
≥ +
≤ +
≥
+ =
x x
x x
x x
x
x x Z
D Nagesh Kumar, IISc Optimization Methods: M3L5
24
Dual Simplex Method:
An Example…contd.
After introducing the surplus variables the problem is reformulated
with equality constraints as follows:
1 2
12 3 4
24 4 3
2 to subject
2 Minimize
6 2 1
5 2 1
4 2 1
3 1
2 1
− = + −
− = + − −
= + +
− = + −
+ =
x x x
x x x
x x x
x x
x x Z
D Nagesh Kumar, IISc Optimization Methods: M3L5
25
Dual Simplex Method:
An Example…contd.
Expressing the problem in the tableau form:
D Nagesh Kumar, IISc Optimization Methods: M3L5
26
Dual Simplex Method:
An Example…contd.
Successive iterations:
D Nagesh Kumar, IISc Optimization Methods: M3L5
27
Dual Simplex Method:
An Example…contd.
Successive iterations:
D Nagesh Kumar, IISc Optimization Methods: M3L5
28
Dual Simplex Method:
An Example…contd.
Successive iterations:
As all the b
r
are positive, optimum solution is reached.
Thus, the optimal solution is Z = 5.5 with x
1
= 2 and x
2
= 1.5
D Nagesh Kumar, IISc Optimization Methods: M3L5
29
Solution of Dual from Primal Simplex
0 , ,
2 2 2 2
1 2 4
4 5 2 to subject
4 0 6 ' Minimize
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
≥
≥ − +
− ≥ − −
≥ + +
+ + =
y y y
y y y
y y y
y y y
y y y Z
Primal
Dual
0 , ,
4 2 2 5
0 2 4
6 2 2 to subject
2 4 Maximize
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
≥
≤ − −
≤ + −
≤ + +
+ − =
x x x
x x x
x x x
x x x
x x x Z y
1
y
2
y
3
Z’
D Nagesh Kumar, IISc Optimization Methods: M3L5
30
Sensitivity or post optimality analysis
• Changes that can affect only Optimality
• Change in coefficients of the objective function, C
1
, C
2
,..
• Resolve the problem to obtain the solution
• Changes that can affect only Feasibility
• Change in right hand side values, b
1
, b
2
,..
• Apply dual simplex method or study the dual variable values
• Changes that can affect both Optimality and Feasibility
• Simultaneous change in C
1
, C
2
,.. and b
1
, b
2
,..
• Use both primal simplex and dual simplex or resolve
D Nagesh Kumar, IISc Optimization Methods: M3L5
31
Sensitivity or post optimality analysis
A dual variable, associated with a constraint, indicates
a change in Z value (optimum) for a small change in
RHS of that constraint.
j i
Z y b Δ = Δ
where y
j
is the dual variable associated with the i
th
constraint,
Δb
i
is the small change in the RHS of i
th
constraint,
ΔZ is the change in objective function owing to Δb
i
.
D Nagesh Kumar, IISc Optimization Methods: M3L5
32
Sensitivity or post optimality analysis:
An Example
Let, for a LP problem, ith constraint be
and the optimum value of the objective function be 250.
RHS of the i
th
constraint changes to 55, i.e., i
th
constraint changes
to
Let, dual variable associated with the i
th
constraint is y
j
, optimum
value of which is 2.5 (say). Thus, Δb
i
= 55 – 50 = 5 and y
j
= 2.5
So, ΔZ = y
j
Δb
i
= 2.5x5 = 12.5 and revised optimum value of the
objective function is 250 + 12.5 = 262.5.
1 2
2 50 x x + ≤
1 2
2 55 x x + ≤
D Nagesh Kumar, IISc Optimization Methods: M3L5
33
Thank You
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
1
Module – 3 Lecture Notes – 6
Other Algorithms for Solving Linear Programming Problems
Introduction
So far, Simplex algorithm, Revised Simplex algorithm, Dual Simplex method are discussed.
There are few other methods for solving LP problems which have an entirely different
algorithmic philosophy. Among these, Khatchian’s ellipsoid method and Karmarkar’s
projective scaling method are well known. In this lecture, a brief discussion about these new
methods in contrast to Simplex method will be presented. However, Karmarkar’s projective
scaling method will be discussed in detail.
Comparative discussion between new methods and Simplex method
Khatchian’s ellipsoid method and Karmarkar’s projective scaling method seek the optimum
solution to an LP problem by moving through the interior of the feasible region. A schematic
diagram illustrating the algorithmic differences between the Simplex and the Karmarkar’s
algorithm is shown in figure 1. Khatchian’s ellipsoid method approximates the optimum
solution of an LP problem by creating a sequence of ellipsoids (an ellipsoid is the
multidimensional analog of an ellipse) that approach the optimal solution.
Simplex Algorithm
Karmarkar’s Algorithm
Optimal solution point
Feasible Region
Figure 1 Difference in optimum search path between Simplex and
Karmarkar’s Algorithm
D Nagesh Kumar, IISc, Bangalore M3L6
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
2
Both Khatchian’s ellipsoid method and Karmarkar’s projective scaling method have been
shown to be polynomial time algorithms. This means that the time required to solve an LP
problem of size n by the two new methods would take at most where a and b are two
positive numbers.
b
an
On the other hand, the Simplex algorithm is an exponential time algorithm in solving LP
problems. This implies that, in solving an LP problem of size n by Simplex algorithm, there
exists a positive number such that for any the Simplex algorithm would find its solution
in a time of at most . For a large enough n (with positive , b and ), . This
means that, in theory, the polynomial time algorithms are computationally superior to
exponential algorithms for large LP problems.
c n
n
c2 a c
b n
an c > 2
Karmarkar’s projective scaling method
Karmarkar’s projective scaling method, also known as Karmarkar’s interior point LP
algorithm, starts with a trial solution and shoots it towards the optimum solution.
To apply Karmarkar’s projective scaling method, LP problem should be expressed in the
following form
: with
1
: subject to
Minimize
T
0 X
1X
0 AX
X C
≥
=
=
= Z
where , , , and . It is
also assumed that
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
x
x
x
M
2
1
X
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
c
c
c
M
2
1
C [ ]
( ) n ×
=
1
1 1 1 L 1
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
mn m m
n
n
c c c
c c c
c c c
L
M O M M
L
L
2 1
2 22 21
1 12 11
A 2 ≥ n
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
n
n
n
1
1
1
0
M
X is a feasible solution and 0
min
= Z . The two other variables are
defined as
( ) 1
1
−
=
n n
r ,
( )
n
n
3
1 −
= α .
D Nagesh Kumar, IISc, Bangalore M3L6
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
3
Iterative steps are involved in Karmarkar’s projective scaling method to find the optimal
solution.
In general, iteration involves following computations:
th
k
a) Compute ( ) [ ]
T
1
T T
C P PP P I C
−
− =
p
where ,
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
1
AD
P
k
k
D C C
T
= and
( )
( )
( )
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
n
k
k
k
k
X
X
X
D
0 0 0
0 0 0
0 0 2 0
0 0 0 1
O
If , any feasible solution becomes an optimal solution. Further iteration is not
required. Otherwise, compute the following
0 C =
p
b)
p
p
new
r
C
C
X Y α − =
0
,
c)
new k
new k
k
Y 1D
Y D
X =
+1
. However, it can be shown that for 0 k = ,
k new
new
k new
=
D Y
Y
1D Y
.
Thus, .
1 new
= X Y
d)
1
T
+
=
k
Z X C
e) Repeat the steps (a) through (d) by changing as k 1 + k .
Consider the following problem:
0 , ,
1
0 2 : subject to
2 Minimize
3 2 1
3 2 1
3 2 1
3 2
≥
= + +
= + −
− =
x x x
x x x
x x x
x x Z
Thus, , , 3 = n
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
=
1
2
0
C [ ] 1 2 1 − = A ,
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
3 1
3 1
3 1
0
M
X ,
( ) ( ) 6
1
1 3 3
1
1
1
=
−
=
−
=
n n
r ,
( ) ( )
9
2
3 3
1 3
3
1
=
×
−
=
−
=
n
n
α .
D Nagesh Kumar, IISc, Bangalore M3L6
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
4
Iteration 0 (k=0):
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
3 / 1 0 0
0 3 / 1 0
0 0 3 / 1
0
D
[ ] [ 3 / 1 3 / 2 0
3 / 1 0 0
0 3 / 1 0
0 0 3 / 1
1 2 0
0
T
− =
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
× − = = D C C ]
]
[ ] [ 3 / 1 3 / 2 3 / 1
3 / 1 0 0
0 3 / 1 0
0 0 3 / 1
1 2 1
0
− =
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
× − = AD
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
−
=
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
1 1 1
3 / 1 3 / 2 3 / 1
0
1
AD
P
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
− ×
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
−
=
3 0
0 3 / 2
1 3 / 1
1 3 / 2
1 3 / 1
1 1 1
3 / 1 3 / 2 3 / 1
T
PP
( )
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
=
−
3 / 1 0
0 5 . 1
1
T
PP
( )
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
−
5 . 0 0 5 . 0
0 1 0
5 . 0 0 5 . 0
1
T T
P PP P
( ) [ ]
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
= − =
−
6 / 1
0
6 / 1
T
1
T T
C P PP P I C
p
6
2
) 6 / 1 ( 0 ) 6 / 1 (
2 2
= + + =
p
C
D Nagesh Kumar, IISc, Bangalore M3L6
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
5
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
×
×
−
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
= − =
3974 . 0
3333 . 0
2692 . 0
6 / 1
0
6 / 1
6
2
6
1
9
2
3 1
3 1
3 1
0
M
p
p
new
r
C
C
X Y α
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
= =
3974 . 0
3333 . 0
2692 . 0
1 new
Y X
[ ] 2692 . 0
3974 . 0
3333 . 0
2692 . 0
1 2 0
1
T
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
× − = = X C Z
Iteration 1 (k=1):
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
3974 . 0 0 0
0 3333 . 0 0
0 0 2692 . 0
1
D
[ ] [
T
1
0.2692 0 0
0 2 1 0 0.3333 0 0 0.6667 0.3974
0 0 0.3974
⎡ ⎤
⎢ ⎥
⎢ ⎥ = = − × = −
⎢ ⎥
⎢ ⎥
⎣ ⎦
C C D
]
]
⎤
⎦
3
⎡ ⎤
= ⎢ ⎥
⎢ ⎥
⎣ ⎦
[ ] [ 3974 . 0 6666 . 0 2692 . 0
3974 . 0 0 0
0 3333 . 0 0
0 0 2692 . 0
1 2 1
1
− =
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎣
⎡
× − = AD
1
0.2692 0.6667 0.3974
1 1 1
−
⎛ ⎞ ⎡
= = ⎜ ⎟ ⎢ ⎥
⎜ ⎟
⎢ ⎥
⎝ ⎠ ⎣
AD
P
1
T
0.2692 1
0.2692 0.6667 0.3974 0.675 0
0.6667 1
1 1 1 0
0.3974 1
⎡ ⎤
− ⎢ ⎥ ⎡ ⎤
⎢ ⎥ = × − ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎣ ⎦
⎢ ⎥
⎣ ⎦
PP
( )
1
T
1.482 0
0 0.333
−
⎡ ⎤
= ⎢ ⎥
⎢ ⎥
⎣ ⎦
PP
D Nagesh Kumar, IISc, Bangalore M3L6
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
6
( )
1
T T
0.441 0.067 0.492
0.067 0.992 0.059
0.492 0.059 0.567
−
⎡ ⎤
⎢ ⎥
⎢ ⎥ = −
⎢ ⎥
⎢ ⎥
−
⎣ ⎦
P PP P
( )
1
T T T
0.151
0.018
0.132
p
−
⎡ ⎤
⎢ ⎥
⎡ ⎤
⎢ ⎥ = − = −
⎢ ⎥
⎣ ⎦
⎢ ⎥
⎢ ⎥
−
⎣ ⎦
C I P PP P C
( )
2
2 2
(0.151) 0.018 ( 0.132) 0.2014
p
= + − + − = C
0
1 3
0.151 0.2653
2 1
1 3
9
6
0.018 0.3414
0.2014
0.132 0.3928
1 3
p
new
p
r α
⎡ ⎤
⎢ ⎥ ⎡ ⎤ ⎡ ⎤
×
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = − = − × − =
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
−
⎣ ⎦ ⎣ ⎦
⎢ ⎥
⎣ ⎦
C
Y X
C
M
1
0.2692 0 0 0.2653 0.0714
0 0.3333 0 0.3414 0.1138
0 0 0.3974 0.3928 0.1561
new
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = × =
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ ⎣ ⎦
D Y
[ ]
1
0.0714
1 1 1 0.1138 0.3413
0.1561
new
⎡ ⎤
⎢ ⎥
⎢ ⎥ = × =
⎢ ⎥
⎢ ⎥
⎣ ⎦
1D Y
1
2
1
0.0714 0.2092
1
0.1138 0.3334
0.3413
0.1561 0.4574
new
new
⎡ ⎤ ⎡ ⎤
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ = = × =
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
D Y
X
1D Y
[ ]
T
2
0.2092
0 2 1 0.3334 0.2094
0.4574
Z
⎡ ⎤
⎢ ⎥
⎢ ⎥ = = − × =
⎢ ⎥
⎢ ⎥
⎣ ⎦
C X
So far, two successive iterations are shown for the above problem. Similar iterations can be
followed to get the final solution upto some predefined tolerance level.
D Nagesh Kumar, IISc, Bangalore M3L6
Optimization Methods: Linear Programming  Other Algorithms for Solving Linear
Programming Problems
7
It may be noted that, the efficacy of Karmarkar’s projective scaling method is more
convincing for ‘large’ LP problems. Rigorous computational effort is not economical for
‘notsolarge’ problems.
References / Further Reading:
1. Rao S.S., Engineering Optimization – Theory and Practice, Third Edition, New Age
International Limited, New Delhi, 2000.
2. Ravindran A., D.T. Phillips and J.J. Solberg, Operations Research – Principles and
Practice, John Wiley & Sons, New York, 2001.
3. Taha H.A., Operations Research – An Introduction, PrenticeHall of India Pvt. Ltd., New
Delhi, 2005.
D Nagesh Kumar, IISc, Bangalore M3L6
D Nagesh Kumar, IISc Optimization Methods: M3L6
1
Linear Programming
Other Algorithms
D Nagesh Kumar, IISc Optimization Methods: M3L6
2
Introduction & Objectives
Few other methods, for solving LP problems, use
an entirely different algorithmic philosophy.
– Khatchian’s ellipsoid method
– Karmarkar’s projective scaling method
Objectives
z To present a comparative discussion between new
methods and Simplex method
z To discuss in detail about Karmarkar’s projective
scaling method
D Nagesh Kumar, IISc Optimization Methods: M3L6
3
Comparative discussion between new
methods and Simplex method
Simplex Algorithm
Karmarkar’s Algorithm
Optimal solution point
Feasible Region
Khatchian’s
ellipsoid method
and Karmarkar’s
projective scaling
method seek the
optimum solution
to an LP problem
by moving through
the interior of the
feasible region.
D Nagesh Kumar, IISc Optimization Methods: M3L6
4
Comparative discussion between new
methods and Simplex method
1. Both Khatchian’s ellipsoid method and Karmarkar’s
projective scaling method have been shown to be
polynomial time algorithms.
Time required for an LP problem of size n is at most an
b
,
where a and b are two positive numbers.
2. Simplex algorithm is an exponential time algorithm
in solving LP problems.
Time required for an LP problem of size n is at most c2
n
,
where c is a positive number
D Nagesh Kumar, IISc Optimization Methods: M3L6
5
Comparative discussion between new
methods and Simplex method
3. For a large enough n (with positive a, b and c), c2
n
>
an
b
.
The polynomial time algorithms are computationally superior to
exponential algorithms for large LP problems.
4. However, the rigorous computational effort of
Karmarkar’s projective scaling method, is not
economical for ‘notsolarge’ problems.
D Nagesh Kumar, IISc Optimization Methods: M3L6
6
Karmarkar’s projective scaling method
z Also known as Karmarkar’s interior point LP algorithm
z Starts with a trial solution and shoots it towards the
optimum solution
z LP problems should be expressed in a particular form
D Nagesh Kumar, IISc Optimization Methods: M3L6
7
Karmarkar’s projective scaling method
LP problems should be expressed in the following form:
: with
1
: subject to
Minimize
T
0 X
1X
0 AX
X C
≥
=
=
= Z
where
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
n
x
x
x
M
2
1
X
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
n
c
c
c
M
2
1
C
[ ]
( ) n ×
=
1
1 1 1 L 1
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
mn m m
n
n
c c c
c c c
c c c
L
M O M M
L
L
2 1
2 22 21
1 12 11
A
2 ≥ n
and
D Nagesh Kumar, IISc Optimization Methods: M3L6
8
Karmarkar’s projective scaling method
It is also assumed that is a feasible solution and
Two other variables are defined as: and .
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
n
n
n
1
1
1
0
M
X 0
min
= Z
( ) 1
1
−
=
n n
r
( )
n
n
3
1 −
= α
Karmarkar’s projective scaling method follows iterative steps to
find the optimal solution
D Nagesh Kumar, IISc Optimization Methods: M3L6
9
Karmarkar’s projective scaling method
In general, k
th
iteration involves following computations
a) Compute
( ) [ ]
T
1
T T
C P PP P I C
−
− =
p
where
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
1
AD
P
k
k
D C C
T
=
( )
( )
( )
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
n
k
k
k
k
X
X
X
D
0 0 0
0 0 0
0 0 2 0
0 0 0 1
O
If , , any feasible solution becomes an optimal solution.
Further iteration is not required. Otherwise, go to next step.
0 C =
p
D Nagesh Kumar, IISc Optimization Methods: M3L6
10
Karmarkar’s projective scaling method
b)
p
p
new
r
C
C
X Y α − =
0
c)
new k
new k
k
Y 1D
Y D
X =
+1
However, it can be shown that for k =0,
k new
new
k new
=
D Y
Y
1D Y
Thus,
1 new
= X Y
1
T
+
=
k
Z X C
d)
Repeat the steps (a) through (d) by changing k as k+1 e)
D Nagesh Kumar, IISc Optimization Methods: M3L6
11
Karmarkar’s projective scaling
method: Example
Consider the LP problem:
0 , ,
1
0 2 : subject to
2 Minimize
3 2 1
3 2 1
3 2 1
3 2
≥
= + +
= + −
− =
x x x
x x x
x x x
x x Z
3 = n
Thus,
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
=
1
2
0
C
[ ] 1 2 1 − = A
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
=
3 1
3 1
3 1
0
M
X
( ) ( ) 6
1
1 3 3
1
1
1
=
−
=
−
=
n n
r
( ) ( )
9
2
3 3
1 3
3
1
=
×
−
=
−
=
n
n
α and also,
D Nagesh Kumar, IISc Optimization Methods: M3L6
12
Karmarkar’s projective scaling
method: Example
Iteration 0 (k=0):
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
3 / 1 0 0
0 3 / 1 0
0 0 3 / 1
0
D
[ ] [ ] 3 / 1 3 / 2 0
3 / 1 0 0
0 3 / 1 0
0 0 3 / 1
1 2 0
0
T
− =
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
× − = = D C C
[ ] [ ] 3 / 1 3 / 2 3 / 1
3 / 1 0 0
0 3 / 1 0
0 0 3 / 1
1 2 1
0
− =
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
× − = AD
D Nagesh Kumar, IISc Optimization Methods: M3L6
13
Karmarkar’s projective scaling
method: Example
Iteration 0 (k=0)…contd.:
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
−
=
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
1 1 1
3 / 1 3 / 2 3 / 1
0
1
AD
P
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
− ×
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
−
=
3 0
0 3 / 2
1 3 / 1
1 3 / 2
1 3 / 1
1 1 1
3 / 1 3 / 2 3 / 1
T
PP
( )
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
=
−
3 / 1 0
0 5 . 1
1
T
PP
D Nagesh Kumar, IISc Optimization Methods: M3L6
14
Karmarkar’s projective scaling
method: Example
( )
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
−
5 . 0 0 5 . 0
0 1 0
5 . 0 0 5 . 0
1
T T
P PP P
Iteration 0 (k=0)…contd.:
( ) [ ]
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
= − =
−
6 / 1
0
6 / 1
T
1
T T
C P PP P I C
p
6
2
) 6 / 1 ( 0 ) 6 / 1 (
2 2
= + + =
p
C
D Nagesh Kumar, IISc Optimization Methods: M3L6
15
Karmarkar’s projective scaling
method: Example
Iteration 0 (k=0)…contd.:
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
−
×
×
−
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
= − =
3974 . 0
3333 . 0
2692 . 0
6 / 1
0
6 / 1
6
2
6
1
9
2
3 1
3 1
3 1
0
M
p
p
new
r
C
C
X Y α
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
= =
3974 . 0
3333 . 0
2692 . 0
1 new
Y X [ ] 2692 . 0
3974 . 0
3333 . 0
2692 . 0
1 2 0
1
T
=
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
× − = = X C Z
D Nagesh Kumar, IISc Optimization Methods: M3L6
16
Karmarkar’s projective scaling
method: Example
Iteration 1 (k=1):
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
=
3974 . 0 0 0
0 3333 . 0 0
0 0 2692 . 0
1
D
[ ] [ ]
T
1
0.2692 0 0
0 2 1 0 0.3333 0 0 0.6667 0.3974
0 0 0.3974
⎡ ⎤
⎢ ⎥
⎢ ⎥ = = − × = −
⎢ ⎥
⎢ ⎥
⎣ ⎦
C C D
[ ] [ ] 3974 . 0 6666 . 0 2692 . 0
3974 . 0 0 0
0 3333 . 0 0
0 0 2692 . 0
1 2 1
1
− =
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎣
⎡
× − = AD
D Nagesh Kumar, IISc Optimization Methods: M3L6
17
Karmarkar’s projective scaling
method: Example
Iteration 1 (k=1)…contd.:
1
0.2692 0.6667 0.3974
1 1 1
−
⎛ ⎞ ⎡ ⎤
= = ⎜ ⎟ ⎢ ⎥
⎜ ⎟
⎢ ⎥
⎝ ⎠ ⎣ ⎦
AD
P
1
T
0.2692 1
0.2692 0.6667 0.3974 0.675 0
0.6667 1
1 1 1 0 3
0.3974 1
⎡ ⎤
− ⎢ ⎥
⎡ ⎤ ⎡ ⎤
⎢ ⎥ = × − = ⎢ ⎥ ⎢ ⎥
⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
⎢ ⎥
⎣ ⎦
PP
( )
1
T T
0.441 0.067 0.492
0.067 0.992 0.059
0.492 0.059 0.567
−
⎡ ⎤
⎢ ⎥
⎢ ⎥ = −
⎢ ⎥
⎢ ⎥
−
⎣ ⎦
P PP P
D Nagesh Kumar, IISc Optimization Methods: M3L6
18
Karmarkar’s projective scaling
method: Example
Iteration 1 (k=1)…contd.:
( )
1
T T T
0.151
0.018
0.132
p
−
⎡ ⎤
⎢ ⎥
⎡ ⎤
⎢ ⎥ = − = −
⎢ ⎥
⎣ ⎦
⎢ ⎥
⎢ ⎥
−
⎣ ⎦
C I P PP P C
( )
2
2 2
(0.151) 0.018 ( 0.132) 0.2014
p
= + − + − = C
0
1 3
0.151 0.2653
2 1
1 3
9
6
0.018 0.3414
0.2014
0.132 0.3928
1 3
p
new
p
r α
⎡ ⎤
⎢ ⎥ ⎡ ⎤ ⎡ ⎤
×
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = − = − × − =
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
−
⎣ ⎦ ⎣ ⎦
⎢ ⎥
⎣ ⎦
C
Y X
C
M
D Nagesh Kumar, IISc Optimization Methods: M3L6
19
Karmarkar’s projective scaling
method: Example
Iteration 1 (k=1)…contd.:
1
0.2692 0 0 0.2653 0.0714
0 0.3333 0 0.3414 0.1138
0 0 0.3974 0.3928 0.1561
new
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥ = × =
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦ ⎣ ⎦
D Y
[ ]
1
0.0714
1 1 1 0.1138 0.3413
0.1561
new
⎡ ⎤
⎢ ⎥
⎢ ⎥ = × =
⎢ ⎥
⎢ ⎥
⎣ ⎦
1D Y
D Nagesh Kumar, IISc Optimization Methods: M3L6
20
Karmarkar’s projective scaling
method: Example
Iteration 1 (k=1)…contd.:
1
2
1
0.0714 0.2092
1
0.1138 0.3334
0.3413
0.1561 0.4574
new
new
⎡ ⎤ ⎡ ⎤
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ = = × =
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎣ ⎦ ⎣ ⎦
D Y
X
1D Y
[ ]
T
2
0.2092
0 2 1 0.3334 0.2094
0.4574
Z
⎡ ⎤
⎢ ⎥
⎢ ⎥ = = − × =
⎢ ⎥
⎢ ⎥
⎣ ⎦
C X
Two successive iterations are shown. Similar iterations can be followed
to get the final solution upto some predefined tolerance level
D Nagesh Kumar, IISc Optimization Methods: M3L6
21
Thank You
Optimization Methods: Linear Programming Applications  Learning Objectives
Module 4: Linear Programming Applications
Learning Objectives
In module 3, we discussed about how to represent a Linear Programming (LP) model in
various forms and also some of the most popular methods like simplex method to solve a LP
problem (LPP). In this module, an introduction to solve a LPP using software will be given.
This will help the reader to solve large LPP more easily avoiding the manual computations in
the form of simplex tables. Using this software, a LPP can be solved using graphical method
or simplex method.
This will be followed by the introduction of some bench mark problems that use LP for
solution. These include the classic transportation problem, assignment problem and some of
the examples from structural and water resources fields.
At the end of the module the reader will be able to
1. Use the software Mathematical Models for Optimization (MMO) and its application to
solve a LPP
2. Overview of MATLAB Optimization toolbox for solving LPP
3. Formulate and solve a classic transportation problem
4. Formulate and solve an assignment problem
5. Formulate and solve various structural and water resources problems
D Nagesh Kumar, IISc, Bangalore M4LO
Optimization Methods: Linear Programming Applications – Software 1
Module – 4 Lecture Notes – 1
Use of software for solving linear programming problems
Introduction
In this class, use of software to solve linear programming problem will be discussed. An MS
Dos based software, known as MMO, will be discussed. Apart from MMO, simplex method
using optimization toolbox of MATLAB will be briefly introduced.
MMO Software
This is an MSDos based software to solve various types of problems. In this lecture notes,
only Graphical method and Simplex method for LP problem using MMO (Dennis and
Dennis, 1993) will be discussed. It may be noted that MMO can also solve optimization
problems related to integer programming, network flow models, PERT among others. For
more details of MMO, refer to ‘INFOFILE.TXT’ in the folder.
Installation
Download the “MMO.ZIP” file (in the ‘Module_4’ folder of the accompanying CDROM)
and unzip it in a folder in the PC. Open this folder and double click on the application file
named as “START”. It will open the MMO software. Opening screen can be seen as shown
in Fig. 1. Press any key to see Main menu screen of MMO as shown in Fig. 2. Use arrow
keys from keyboard to select different models.
Fig. 1. Opening Screen of MMO
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 2
Fig. 2 Main Menu Screen of MMO
Select “Linear Programming” and press enter. Two options will appear as follows:
SOLUTION METHOD: GRAPHIC/ SIMPLEX
Graphical Method using MMO
Select GRAPHIC and press enter. You can choose a particular option using arrow keys from
the keyboard. It may be noted that graphical method can be used only for two decision
variables.
After waiting for a few moments screen for “data entry method” will appear (Fig. 3).
Fig. 3 Screen for “Data Entry Method”
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 3
Data entry may be done by either of two different ways.
1. Free Form Entry: You have to write the equation when prompted for input.
2. Tabular Entry: Data can be input in spreadsheet style. Only the coefficients are to be
entered, not the variables.
Note that all variables must appear in the objective function (even those with a 0 coefficient);
if a variable name is repeated in the objective function, an error message will indicate that it
is a duplicate and allow you to change the entry. Constraints can be entered in any order;
variables with 0 coefficients do not have to be entered; if a constraint contains a variable not
found in the objective function, an error message indicates this and allows you to make the
correction; constraints may not have negative righthandsides (multiply by 1 to convert
them before entering); when entering inequalities using < or >, it is not necessary to add the
equal sign (=); nonnegativity constraints are assumed and do not have to be entered.
However, this information can be made available by selecting “Information Screen”.
Let us take following problem
0 ,
6
, 5 2
, 5
3 2
2 1
2 1
2 1
1
2 1
≥
≤ +
− ≥ −
≤
+ =
x x
x x
x x
x to Subject
x x Z Maximize
Thus, the second constraint is to be multiplied by 1 while entering, i.e., . In
the MMO software, let us select ‘Free Form Entry’ and ‘max’ while it asks about ‘TYPE OF
PROBLEM’ and press enter. After entering the problem the screen will appear as Fig. 4. Note
that at the last line of the constraints you have to write ‘go’ and hit the enter key from the
keyboard.
5 2
2 1
≤ + − x x
Next screen will allow checking the proper entry of the problem. If any mistake is found,
select ‘NO’ and correct the mistake. If everything is ok, select ‘YES’ and press the enter key.
The graphics solution will be displayed on the screen. Different handling options will be
shown on the right corner of the screen as follows:
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 4
F1: Redraw
F2: Rescale
F3: Move Objective Function Line
F4: Shade Feasible Region
F5: Show Feasible Points
F6: Show Optimal Solution Point
F10: Show Graphical LP Menu (GPL)
We can easily make out the commands listed above. For example, F3 function can be used to
move the objective function line. Subsequent function keys of F4 and F5 can be used to get
the diagram as shown in Fig. 5.
Fig. 4 Screen after Entering the Problem.
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 5
Fig. 5 Feasible Region (highlighted in white),
Feasible Points (white) and Optimal Solution Point (cyan)
The function key F10, i.e., Show Graphical LP Menu (GPL)’ will display the four different
options as shown in Fig. 6.
Fig. 6 Graphical LP Menu
‘Display Graphical Solution’ will return to the graphical diagram, ‘List Solution Values’ will
show the solution, which is with 67 . 15 = Z 33 . 2
1
= x and 67 . 3
2
= x . ‘Show Extreme Points’
will show either ‘All’ or ‘Feasible’ extreme points as per the choice (Fig. 7)
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 6
Fig. 7 List of ‘Extreme Points’ and ‘Feasible Extreme Points’
SIMPLEX Method using MMO
As we know, the graphical solution is is limited to two decision variables. However, simplex
method can be used for any number of variables, which is discussed in this section.
Select SIMPLEX in Linear Programming option of MMO software. As before, screen for
“data entry method” will appear (Fig. 3). The data entry is exactly same as discussed before.
Let us consider the earlier problem for discussion and easy comparison. However, we could
have taken a problem with more than two decision variables also.
0 ,
6
, 5 2
, 5
3 2
2 1
2 1
2 1
1
2 1
≥
≤ +
− ≥ −
≤
+ =
x x
x x
x x
x to Subject
x x Z Maximize
Once you run the problem, it will show the list of slack, surplus and artificial variables as
shown in Fig. 8. Note that there are three additional slack variables in the above problem.
Press any key to continue.
Fig. 8 List of slack, surplus and artificial variables
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 7
It will show three different options (Fig. 9):
1. No Tableau: Shows direct solutions
2. All Tableau: Shows all simplex tableau one by one
3. Final Tableau: Shows only the final simplex tableau directly
Fig. 9 Different Options for Simplex Solution
Final simplex tableau for the present problem is shown in Fig. 10 and the final solution is
obtained as: Optimal with 667 . 15 = Z 333 . 2
1
= x and 667 . 3
2
= x .
There is an additional option for ‘Sensitivity Analysis’. However, it is beyond the scope of
this lecture notes.
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 8
Fig. 10 Final Simplex Tableau
MATLAB Toolbox for Linear Programming
Optimization toolbox of MATLAB (2001) is very popular and efficient. It includes different
types of optimization techniques. In this lecture notes, we will briefly introduce the use of
MATLAB toolbox for Simplex Algorithm. However, it is assumed that the users are aware of
basics of MATLAB.
To use the simplex method, you have to set the option as 'LargeScale' to 'off' and 'Simplex' to
'on' in the following way.
options = optimset('LargeScale', 'off', 'Simplex', 'on')
Then a function called ‘linprog’ is to be used. A brief MATLAB documentation is shown in
Fig. 11 for linear programming (linprog).
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 9
Fig. 11 MATLAB Documentation for Linear Programming
Further details may be referred from the toolbox. However, with this basic knowledge, simple
LP problems can be solved. Let us consider the same problem as considered earlier.
0 ,
6
, 5 2
, 5
3 2
2 1
2 1
2 1
1
2 1
≥
≤ +
− ≥ −
≤
+ =
x x
x x
x x
x to Subject
x x Z Maximize
D Nagesh Kumar, IISc, Bangalore
M4L1
Optimization Methods: Linear Programming Applications – Software 10
Following MATLAB code will give the solution using simplex algorithm.
clear all
f=[2 3]; %Converted to minimization problem
A=[1 0;1 2;1 1];
b=[5 5 6];
lb=[0 0];
options = optimset('LargeScale', ff', 'Simplex', 'on'); 'o
[x,fval]=linprog(f,A,b,[],[],lb);
z=fval %Multiplied by 1
x
Note that objective function should be converted to a minimization problem before entering
as done in line 2 of the code. Finally, solution should be multiplied by 1 to the optimized
(maximum) solution as done in last but one line. Solution will be obtained as
with and as in the earlier case.
667 . 15 = Z
333 . 2
1
= x 667 . 3
2
= x
References
Dennis T.L. and L.B. Dennis, Microcomputer Models for Management Decision
Making, West Publishing Company, 1993.
MATLAB – User’s Manual, The Math Works Inc., 2001.
D Nagesh Kumar, IISc, Bangalore
M4L1
D Nagesh Kumar, IISc Optimization Methods: M4L1
1
Linear Programming Applications
Software for Linear
Programming
D Nagesh Kumar, IISc Optimization Methods: M4L1
2
Objectives
z Use of software to solve LP problems
z MMO Software with example
¾ Graphical Method
¾ Simplex Method
z Simplex method using optimization toolbox of
MATLAB
D Nagesh Kumar, IISc Optimization Methods: M4L1
3
MMO Software
Mathematical Models for Optimization
An MSDOS based software
Used to solve different optimization problems
z Graphical method and Simplex method will be
discussed.
Installation
– Download the file “MMO.ZIP” and unzip it in a
folder in the PC
– Open this folder and double click on the application
file named as “START”. It will open the MMO
software
D Nagesh Kumar, IISc Optimization Methods: M4L1
4
Working with MMO
Opening Screen
D Nagesh Kumar, IISc Optimization Methods: M4L1
5
Working with MMO
Starting Screen
SOLUTION METHOD: GRAPHIC/ SIMPLEX
D Nagesh Kumar, IISc Optimization Methods: M4L1
6
Graphical Method
Data Entry
D Nagesh Kumar, IISc Optimization Methods: M4L1
7
Data Entry: Few Notes
z Free Form Entry: Write the equation at the prompted input.
z Tabular Entry: Spreadsheet style. Only the coefficients are to
be entered, not the variables.
z All variables must appear in the objective function (even those
with a 0 coefficient)
z Constraints can be entered in any order; variables with 0
coefficients do not have to be entered
z Constraints may not have negative righthandsides (multiply by
1 to convert them before entering)
z When entering inequalities using < or >, it is not necessary to
add the equal sign (=)
z Nonnegativity constraints are assumed and need not be
entered
D Nagesh Kumar, IISc Optimization Methods: M4L1
8
Example
Let us consider the following problem
Note: The second constraint is to be multiplied by 1 while
entering, i.e.
0 ,
6
, 5 2
, 5
3 2
2 1
2 1
2 1
1
2 1
≥
≤ +
− ≥ −
≤
+ =
x x
x x
x x
x to Subject
x x Z Maximize
5 2
2 1
≤ + − x x
D Nagesh Kumar, IISc Optimization Methods: M4L1
9
Steps in MMO Software
z Select ‘Free Form Entry’ and Select ‘TYPE OF PROBLEM’ as ‘MAX’
z Enter the problem as shown
z Write ‘go’ at the last line of the constraints
z Press enter
z Checking the proper entry of the problem
– If any mistake is found, select ‘NO’ and correct the mistake
– If everything is ok, select ‘YES’ and press the enter key
D Nagesh Kumar, IISc Optimization Methods: M4L1
10
Solution
Z=15.67
x
1
=2.33
x
2
=3.67
F1: Redraw
F2: Rescale
F3: Move Objective
Function Line
F4: Shade Feasible
Region
F5: Show Feasible Points
F6: Show Optimal Solution
Point
F10: Show Graphical LP
Menu (GPL)
D Nagesh Kumar, IISc Optimization Methods: M4L1
11
Graphical LP Menu
D Nagesh Kumar, IISc Optimization Methods: M4L1
12
Extreme points and feasible
extreme points
D Nagesh Kumar, IISc Optimization Methods: M4L1
13
Simplex Method using MMO
z Simplex method can be used for any number of
variables
z Select SIMPLEX and press enter.
z As before, screen for “data entry method” will appear
z The data entry is exactly same as discussed before.
D Nagesh Kumar, IISc Optimization Methods: M4L1
14
Example
Let us consider the same problem.
(However, a problem with more than two decision
variables can also be taken)
0 ,
6
, 5 2
, 5
3 2
2 1
2 1
2 1
1
2 1
≥
≤ +
− ≥ −
≤
+ =
x x
x x
x x
x to Subject
x x Z Maximize
D Nagesh Kumar, IISc Optimization Methods: M4L1
15
Slack, surplus and artificial variables
z There are three additional slack variables
D Nagesh Kumar, IISc Optimization Methods: M4L1
16
Different options for Simplex tableau
z No Tableau: Shows direct solutions
z All Tableau: Shows all simplex tableau one by one
z Final Tableau: Shows only the final simplex tableau
directly
D Nagesh Kumar, IISc Optimization Methods: M4L1
17
Final Simplex tableau and solution
Final Solution
Z=15.67
x
1
=2.33
x
2
=3.67
D Nagesh Kumar, IISc Optimization Methods: M4L1
18
MATLAB Toolbox for
Linear Programming
z Very popular and efficient
z Includes different types of optimization techniques
z To use the simplex method
– set the option as
options = optimset ('LargeScale', 'off', 'Simplex', 'on')
– then a function called ‘linprog’ is to be used
D Nagesh Kumar, IISc Optimization Methods: M4L1
19
MATLAB Toolbox for
Linear Programming
D Nagesh Kumar, IISc Optimization Methods: M4L1
20
MATLAB Toolbox for
Linear Programming
D Nagesh Kumar, IISc Optimization Methods: M4L1
21
Example
Let us consider the same problem as before
Note: The maximization problem should be converted to
minimization problem in MATLAB
0 ,
6
, 5 2
, 5
3 2
2 1
2 1
2 1
1
2 1
≥
≤ +
− ≥ −
≤
+ =
x x
x x
x x
x to Subject
x x Z Maximize
D Nagesh Kumar, IISc Optimization Methods: M4L1
22
Example…contd.
Thus,
[ ] ts coefficien Cost % 3 2 − − = f
s constraint of ts Coefficien %
1
2
0
1
1
1
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎣
⎡
− = A
[ ] s constraint of side hand Right % 6 5 5 = b
[ ] variables decision of s Lowerbound % 0 0 = lb
D Nagesh Kumar, IISc Optimization Methods: M4L1
23
Example…contd.
MATLAB code
clear all
f=[2 3]; %Converted to minimization problem
A=[1 0;1 2;1 1];
b=[5 5 6];
lb=[0 0];
options = optimset ('LargeScale', 'off', 'Simplex', 'on');
[x , fval]=linprog (f , A , b , [ ] , [ ] , lb );
Z = fval %Multiplied by 1
x
Solution
Z = 15.667 with x
1
= 2.333 and x
2
= 3.667
D Nagesh Kumar, IISc Optimization Methods: M4L1
24
Thank You
Optimization Methods: Linear Programming Applications – Transportation Problem 1
Module – 4 Lecture Notes – 2
Transportation Problem
Introduction
In the previous lectures, we discussed about the standard form of a LP and the commonly
used methods of solving LPP. A key problem in many projects is the allocation of scarce
resources among various activities. Transportation problem refers to a planning model that
allocates resources, machines, materials, capital etc. in a best possible way so that the costs
are minimized or profits are maximized. In this lecture, the common structure of a
transportation problem (TP) and its solution using LP are discussed followed by a numerical
example.
Structure of the Problem
The classic transportation problem is concerned with the distribution of any commodity
(resource) from any group of 'sources' to any group of destinations or 'sinks'. While solving
this problem using LP, the amount of resources from source to sink will be the decision
variables. The criterion for selecting the optimal values of the decision variables (like
minimization of costs or maximization of profits) will be the objective function. And the
limitation of resource availability from sources will constitute the constraint set.
Consider a general transportation problem consisting of m origins (sources) O
1
, O
2
,…, O
m
and
n destinations (sinks) D
1
, D
2
, … , D
n
. Let the amount of commodity available in i
th
source be
a
i
(i=1,2,….m) and the demand in j
th
sink be b
j
(j=1,2,….n). Let the cost of transportation of
unit amount of material from i to j be c
ij.
Let the amount of commodity supplied from i to j be
denoted as x
ij
. Thus, the cost of transporting x
ij
units of commodity from i to j is c .
ij ij
x ×
Now the objective of minimizing the total cost of transportation can be given as
Minimize (1)
∑∑
= =
=
m
i
n
j
ij ij
x c f
1 1
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 2
Generally, in transportation problems, the amount of commodity available in a particular
source should be equal to the amount of commodity supplied from that source. Thus, the
constraint can be expressed as
∑
i= 1 ,2, … , m (2)
=
=
n
j
i ij
a x
1
,
Also, the total amount supplied to a particular sink should be equal to the corresponding
demand. Hence,
∑
j = 1 ,2, … , n (3)
=
=
m
i
j ij
b x
1
,
The set of constraints given by eqns (2) and (3) are consistent only if total supply and total
demand are equal.
∑ ∑
= =
=
m
i
n
j
j i
b a
1 1
(4)
But in real problems this condition may not be satisfied. Then, the problem is said to be
unbalanced. However, the problem can be modified by adding a fictitious (dummy) source or
destination which will provide surplus supply or demand respectively. The transportation
costs from this dummy source to all destinations will be zero. Likewise, the transportation
costs from all sources to a dummy destination will be zero.
Thus, this restriction causes one of the constraints to be redundant. Thus the above problem
have m x n decision variables and (m + n  1) equality constraints.
The nonnegativity constraints can be expressed as
, i= 1 ,2, … , m , j = 1 ,2, … , n (5) 0 ≥
ij
x
This problem formulation is elucidated through an example given below.
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 3
Examples
Problem (1)
Consider a transport company which has to supply 4 units of paper materials from each of the
cities Faizabad and Lucknow to three cities. The material is to be supplied to Delhi,
Ghaziabad and Bhopal with demands of four, one and three units respectively. Cost of
transportation per unit of supply (c
ij
) is indicated below in the figure. Decide the pattern of
transportation that minimizes the cost.
Solution:
Let the amount of material supplied from source
i to sink j be x
ij
. Here m =2; n = 3.
Total supply = 8 units and total demand = 4+1+3 = 8 units. Since both are equal, the problem
is balanced. The objective function is to minimize the total cost of transportation from all
combinations i.e.
Minimize
∑∑
= =
=
m
i
n
j
ij ij
x c f
1 1
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 4
Minimize f = 5 x
11
+ 3 x
12
+ 8 x
13
+ 4 x
21
+ x
22
+ 7 x
23
(6)
subject to the constraints as explained below:
(1) The total amount of material supplied from each source city should be equal to 4.
∑
i= 1, 2
=
=
3
1
4
j
ij
x
i.e. x
11
+ x
12
+ x
13
= 4 for i = 1 (7)
x
21
+ x
22
+ x
23
= 4 for i = 2 (8)
(2) The total amount of material received by each destination city should be equal to the
corresponding demand.
∑
=
=
2
1
,
i
j ij
b x j = 1 ,2, 3
i.e. x
11
+ x
21
= 4 for j = 1 (9)
x
12
+ x
22
= 1 for j = 2 (10)
x
13
+ x
23
= 3 for j = 3 (11)
(3) Non – negativity constraints
x
ij 0 ≥
i = 1, 2; j=1, 2, 3 (12)
Thus, the optimization problem has 6 decision variables and 5 constraints.
Since the optimization model consists of equality constraints, Big M method is used to solve.
The steps are shown below.
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 5
Since there are five equality constraints, introduce five artificial variables R
1
, R
2,
R
3,
R
4
and
R
5
. Thus, the objective function and the constraints can be expressed as
Minimize
5 4 3 2 1
23 22 21 13 12 11
7 1 4 8 3 5
R M R M R M R M R M
x x x x x x f
× + × + × + × + × +
× + × + × + × + × + × =
subject to
x
11
+ x
12
+ x
13
+ R
1
= 4
x
21
+ x
22
+ x
23
+ R
2
= 4
x
11
+ x
21
+ R
3
= 4
x
12
+ x
22
+ R
4
= 1
x
13
+ x
23
+ R
5
= 3
Modifying the objective function to make the coefficients of the artificial variable equal to
zero, the final form objective function is
5 4 3 2 1
23 22 21
13 12 11
0 0 0 0 0
) 2 7 ( ) 2 1 ( ) 2 4 (
) 2 8 ( ) 2 3 ( ) 2 5 (
R R R R R
x M x M x M
x M x M x M f
× + × + × + × + × −
× + − + × + − + × + − +
× + − + × + − + × + − +
The solution of the model using simplex method is shown
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 6
Table 1
First iteration
Variables
Basic
variables
x
11
x
12
x
13
x
21
x
22
x
23
R
1
R
2
R
3
R
4
R
5
RHS Ratio
Z
5
+2M
3
+2M
8
+2M
4
+2M
1
+2M
7
+2M
0 0 0 0 0 16M
R
1
1 1 1 0 0 0 1 0 0 0 0 4 
R
2
0 0 0 1 1 1 0 1 0 0 0 4 4
R
3
1 0 0
1 0
0 0 0 1 0 0 4 
R
4
0 1 0 0 1 0 0 0 0 1 0 1 1
R
5
0 0 1 0 0 1 0 0 0 0 1 3 
Table 2
Second iteration
Variables
Basic
variables
x
11
x
12
x
13
x
21
x
22
x
23
R
1
R
2
R
3
R
4
R
5
RHS Ratio
Z 5+2M 1 8+2M 4+2M 0 7+2M 0 0 0
1
2M
0
1+14
M

R
1
1 1 1 0 0 0 1 0 0 0 0 4 
R
2
0 1 0 1 0 0 0 1 0 1 0 3 3
R
3
1 0 0 1 0 0 0 0 1 0 0 4 4
X
22
0 1 0 0 1 1 0 0 0 1 0 1 
R
5
0 0 1 0 0 1 0 0 0 0 1 3 
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 7
Table 3
Third iteration
Variables
Basic
variables
x
11
x
12
x
13
x
21
x
22
x
23
R
1
R
2
R
3
R
4
R
5
RHS Ratio
Z 5+2M 5+2M 8+2M 0 0 7+2M 0
4
2M
0 3 0 13+8M 
R
1
1 1 1 0 0 0 1 0 0 0 0 4 4
X
21
0 1 0 1 0 0 0 1 0 1 0 3 
R
3
1 1 0 0 0 0 0 1 1 1 0 1 1
X
22
0 1 0 0 1 1 0 0 0 1 0 1 
R
5
0 0 1 0 0 1 0 0 0 0 1 3 
Table 4
Fourth iteration
Variables
Basic
variables
x
11
x
12
x
13
x
21
x
22
x
23
R
1
R
2
R
3
R
4
R
5
RHS Ratio
Z 0 0 8+2M 0 0 7+2M 0 1
5
2M
2
2M
0 18+6M 
R
1
0 0 1 0 0 0 1 1 1 1 0 3 
X
21
0 1 0 1 0 0 0 1 0 1 0 3 
X
11
1 1 0 0 0 0 0 1 1 1 0 1 
X
22
0 1 0 0 1 1 0 0 0 1 0 1 1
R
5
0 0 1 0 0 1 0 0 0 0 1 3 3
Repeating the same procedure, we get the final optimal solution f = 42 and the optimum
decision variable values as : x
11
= 2.2430, x
12
= 0.00, x
13
= 1.7570, x
21
= 1.7570, x
22
=
1.00, x
23
= 1.2430.
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 8
Problem (2)
Consider three factories (F) located in three different cities, producing a particular chemical.
The chemical is to be transported to four different warehouses (Wh), from where it is
supplied to the customers. The transportation cost per truck load from each factory to each
warehouse is determined and are given in the table below. Production and demands are also
given in the table below.
Wh1 Wh2 Wh3 Wh4 Production
F1 523 682 458 850 60
F2 420 412 362 729 110
F3 670 558 895 695 150
Demand 65 85 80 70
Solution:
Let the amount of chemical to be transported from factory
i to warehouse j be x
ij
.
Total supply = 60+110+150 = 320 and total demand = 65+85+80+70 = 300. Since the total
demand is less than total supply, add one fictitious ware house, Wh5 with a demand of 20.
Thus, here m =3; n = 5
Wh1 Wh2 Wh3 Wh4 Wh5 Production
F1 523 682 458 850 0 60
F2 420 412 362 729 0 110
F3 670 558 895 695 0 150
Demand 65 85 80 70 20
The objective function is to minimize the total cost of transportation from all combinations.
Minimize f = 523 x
11
+ 682 x
12
+ 458 x
13
+ 850 x
14
+ 0 x
15
+ 420 x
21
+ 412 x
22
+ 362 x
23
+ 729 x
24
+ 0 x
25
+ 670 x
31
+ 558 x
32
+ 895 x
33
+695 x
34
+ 0 x
35
subject to the constraints
D Nagesh Kumar, IISc, Bangalore M4L2
Optimization Methods: Linear Programming Applications – Transportation Problem 9
x
11
+ x
12
+ x
13
+ x
14
+ x
15
= 60 for i = 1
x
21
+ x
22
+ x
23
+ x
24
+ x
25
= 110 for i = 2
x
31
+ x
32
+ x
33
+ x
34
+ x
35
= 150 for i = 3
x
11
+ x
21
+ x
31
= 65 for j = 1
x
12
+ x
22
+ x
32
= 85 for j = 2
x
13
+ x
23
+ x
23
=90 for j = 3
x
14
+ x
24
+ x
24
=80 for j = 4
x
15
+ x
25
+ x
25
=20 for j = 5
x
ij 0 ≥
i = 1, 2,3; j=1, 2, 3,4
This optimization problem can be solved using the same procedure used for the previous
problem.
D Nagesh Kumar, IISc, Bangalore M4L2
D Nagesh Kumar, IISc Optimization Methods: M4L2
1
Linear Programming Applications
Transportation
Problem
D Nagesh Kumar, IISc Optimization Methods: M4L2
2
Introduction
¾ Transportation problem is a special problem of its own
structure.
¾ Planning model that allocates resources, machines,
materials, capital etc. in a best possible way
¾ In these problems main objective generally is to minimize
the cost of transportation or maximize the benefit.
D Nagesh Kumar, IISc Optimization Methods: M4L2
3
Objectives
¾ To structure a basic transportation problem
¾ To demonstrate the formulation and solution with a
numerical example
D Nagesh Kumar, IISc Optimization Methods: M4L2
4
Structure of the Problem
¾ A classic transportation problem is concerned with the distribution of any
commodity (resource) from any group of ‘sources’ to any group of
destinations or ‘sinks’
¾ The amount of resources from source to sink are the decision variables
¾ The criterion for selecting the optimal values of the decision variables (like
minimization of costs or maximization of profits) will be the objective
function
¾ The limitation of resource availability from sources will constitute the
constraint set.
D Nagesh Kumar, IISc Optimization Methods: M4L2
5
Structure of the Problem …contd.
¾ Let there be m origins namely O
1
, O
2
, …, O
m
and n destinations D
1
,
D
2
, …, D
n
¾ Amount of commodity available in i
th
source is a
i
, i=1,2, …, m
¾ Demand in j
th
sink is b
j
, j = 1, 2, …, n.
¾ Cost of transportation of unit amount of material from i to j is c
ij
¾ Amount of commodity supplied from i to j be denoted as x
ij
¾ Thus, the cost of transporting x
ij
units of commodity from i to j is
ij ij
x c ×
D Nagesh Kumar, IISc Optimization Methods: M4L2
6
Structure of the Problem …contd.
¾ The objective of minimizing the total cost of transportation
Minimize (1)
¾ Generally, in transportation problems, the amount of commodity
available in a particular source should be equal to the amount of
commodity supplied from that source. Thus, the constraint can be
expressed as
i= 1, 2, …, m (2)
∑ ∑
= =
=
m
i
n
j
ij ij
x c f
1 1
∑
=
=
n
j
i ij
a x
1
,
D Nagesh Kumar, IISc Optimization Methods: M4L2
7
Structure of the Problem …contd.
¾ Total amount supplied to a particular sink should be equal to the
corresponding demand
j = 1, 2, …, n (3)
¾ The set of constraints given by eqns (2) and (3) are consistent only if total
supply and total demand are equal
i= 1, 2, …, m , j = 1 ,2, …, n (4)
∑
=
=
m
i
j ij
b x
1
,
∑ ∑
= =
=
m
i
n
j
j i
b a
1 1
D Nagesh Kumar, IISc Optimization Methods: M4L2
8
Structure of the Problem …contd.
¾ But in real problems constraint (4) may not be satisfied. Then, the
problem is said to be unbalanced
¾ Unbalanced problems can be modified by adding a fictitious
(dummy) source or destination which will provide surplus supply or
demand respectively
¾ The transportation costs from this dummy source to all destinations
will be zero
¾ Likewise, the transportation costs from all sources to a dummy
destination will be zero
D Nagesh Kumar, IISc Optimization Methods: M4L2
9
Structure of the Problem…contd.
¾ This restriction causes one of the constraints to be redundant
¾ Thus the above problem have m x n decision variables and (m + n  1)
equality constraints.
¾ The nonnegativity constraints can be expressed as
i= 1, 2, …, m , j = 1, 2, …, n (5)
0 ≥
ij
x
D Nagesh Kumar, IISc Optimization Methods: M4L2
10
Example (1)
¾ Consider a transport company which has to supply 4 units of paper
materials from each of the cities Faizabad and Lucknow
¾ The material is to be supplied to Delhi, Ghaziabad and Bhopal with
demands of four, one and three units respectively
¾ Cost of transportation per unit of supply (c
ij
) is indicated in the figure
shown in the next slide
¾ Decide the pattern of transportation that minimizes the cost.
D Nagesh Kumar, IISc Optimization Methods: M4L2
11
Example (1)…contd.
Solution:
¾ Let the amount of
material supplied
from source i to sink j
as x
ij
¾ Here m =2; n = 3.
D Nagesh Kumar, IISc Optimization Methods: M4L2
12
Example (1)…contd.
¾ Total supply = 4+4 = 8 units
¾ Total demand = 4+1+ 3 = 8 units
¾ Since both are equal, the problem is balanced
¾ Objective function is to minimize the total cost of transportation from
all combinations
Minimize
i.e.
Minimize
f = 5 x
11
+ 3 x
12
+ 8 x
13
+ 4 x
21
+ x
22
+ 7 x
23
(6)
∑∑
= =
=
m
i
n
j
ij ij
x c f
1 1
D Nagesh Kumar, IISc Optimization Methods: M4L2
13
Example (1)…contd.
The constraints are explained below:
¾ The total amount of material supplied from each source city should be
equal to 4
; i= 1 ,2
i.e. x
11
+ x
12
+ x
13
= 4 for i = 1 (7)
x
21
+ x
22
+ x
23
= 4 for i = 2 (8)
∑
=
=
3
1
4
j
ij
x
D Nagesh Kumar, IISc Optimization Methods: M4L2
14
Example (1)…contd.
¾ The total amount of material received by each destination city should be
equal to the corresponding demand
; j = 1, 2, 3
i.e. x
11
+ x
21
= 4 for j = 1 (9)
x
12
+ x
22
= 1 for j = 2 (10)
x
13
+ x
23
= 3 for j = 3 (11)
¾ Nonnegativity constraints
x
ij
; i = 1, 2; j =1, 2, 3 (12)
0 ≥
2
1
ij j
i
x b
=
=
∑
D Nagesh Kumar, IISc Optimization Methods: M4L2
15
Example (1)…contd.
¾ Optimization problem has 6 decision variables and 5 constraints
¾ Since the optimization model consists of equality constraints, Big M
method is used to solve
¾ Since there are five equality constraints, introduce five artificial
variables viz., R
1
, R
2
, R
3
, R
4
and R
5
.
D Nagesh Kumar, IISc Optimization Methods: M4L2
16
Example (1)…contd.
The objective function and the constraints can be expressed as
Minimize
subject to x
11
+ x
12
+ x
13
+R
1
= 4
x
21
+ x
22
+ x
23
+ R
2
= 4
x
11
+ x
21
+ R
3
= 4
x
12
+ x
22
+ x
23
+ R
4
= 1
x
13
+ x
23
+ R
5
= 3
5 4 3 2 1
23 22 21 13 12 11
7 1 4 8 3 5
R M R M R M R M R M
x x x x x x f
× + × + × + × + × +
× + × + × + × + × + × =
D Nagesh Kumar, IISc Optimization Methods: M4L2
17
Example (1)…contd.
¾ Modifying the objective function to make the coefficients of the
artificial variable equal to zero, the final form objective function is
The solution of the model using simplex method is shown in the
following slides
5 4 3 2 1
23 22 21
13 12 11
0 0 0 0 0
) 2 7 ( ) 2 1 ( ) 2 4 (
) 2 8 ( ) 2 3 ( ) 2 5 (
R R R R R
x M x M x M
x M x M x M f
× + × + × + × + × −
× + − + × + − + × + − +
× + − + × + − + × + − +
D Nagesh Kumar, IISc Optimization Methods: M4L2
18
Example (1)…contd.
First iteration
D Nagesh Kumar, IISc Optimization Methods: M4L2
19
Example (1)…contd.
Second iteration
D Nagesh Kumar, IISc Optimization Methods: M4L2
20
Example (1)…contd.
Third iteration
D Nagesh Kumar, IISc Optimization Methods: M4L2
21
Example (1)…contd.
Fourth iteration
D Nagesh Kumar, IISc Optimization Methods: M4L2
22
Example (1)…contd.
¾ Repeating the same procedure
Minimum total cost,
f = 42
Optimum decision variable values:
x
11
= 2.2430, x
12
= 0.00, x
13
= 1.7570,
x
21
= 1.7570, x
22
= 1.00, x
23
= 1.2430.
D Nagesh Kumar, IISc Optimization Methods: M4L2
23
Example (2)
¾ Consider three factories (F) located in three different cities, producing a particular
chemical. The chemical is to get transported to four different warehouses (Wh),
from where it is supplied to the customers. The transportation cost per truck load
from each factory to each warehouse is determined and are given in the table
below. Production and demands are also given in the table below.
D Nagesh Kumar, IISc Optimization Methods: M4L2
24
Example (2) …contd.
Solution:
¾ Let the amount of chemical to be transported from factory i to warehouse j be
x
ij
.
¾ Total supply = 60+110+150 = 320
¾ Total demand = 65+85+80+70 = 300
¾ Since the total demand is less than total supply, add one fictitious ware
house, Wh5 with a demand of 20.
¾ Thus, m =3; n = 5
D Nagesh Kumar, IISc Optimization Methods: M4L2
25
Example (2) …contd.
¾ The modified table is shown below
D Nagesh Kumar, IISc Optimization Methods: M4L2
26
Example (2) …contd.
¾ Objective function is to minimize the total cost of transportation from all
combinations
Minimize f = 523 x
11
+ 682 x
12
+ 458 x
13
+ 850 x
14
+ 0 x
15
+ 420 x
21
+ 412 x
22
+ 362 x
23
+ 729 x
24
+ 0 x
25
+ 670 x
31
+ 558 x
32
+ 895 x
33
+695 x
34
+ 0 x
35
subject to the constraints
x
11
+ x
12
+ x
13
+ x
14
+ x
15
= 60 for i = 1
x
21
+ x
22
+ x
23
+ x
24
+ x
25
= 110 for i = 2
x
31
+ x
32
+ x
33
+ x
34
+ x
35
= 150 for i = 3
D Nagesh Kumar, IISc Optimization Methods: M4L2
27
Example (2) …contd.
x
11
+ x
21
+ x
31
= 65 for j = 1
x
12
+ x
22
+ x
32
= 85 for j = 2
x
13
+ x
23
+ x
23
= 90 for j = 3
x
14
+ x
24
+ x
24
= 80 for j = 4
x
15
+ x
25
+ x
25
=20 for j = 5
x
ij
i = 1, 2,3; j=1, 2, 3,4
This optimization problem can be solved using the same procedure used for
the previous problem.
0 ≥
D Nagesh Kumar, IISc Optimization Methods: M4L2
28
Thank You
Optimization Methods: Linear Programming Applications – Assignment Problem 1
Module – 4 Lecture Notes – 3
Assignment Problem
Introduction
In the previous lecture, we discussed about one of the bench mark problems called
transportation problem and its formulation. The assignment problem is a particular class of
transportation linear programming problems with the supplies and demands equal to
integers (often 1). Since all supplies, demands, and bounds on variables are integers, the
assignment problem relies on an interesting property of transportation problems that the
optimal solution will be entirely integers. In this lecture, the structure and formulation of
assignment problem are discussed. Also, traveling salesman problem, which is a special
type of assignment problem, is described.
Structure of assignment problem
As mentioned earlier, assignment problem is a special type of transportation problem in
which
1. Number of supply and demand nodes are equal.
2. Supply from every supply node is one.
3. Every demand node has a demand of one.
4. Solution is required to be all integers.
The goal of a general assignment problem is to find an optimal assignment of machines
(laborers) to jobs without assigning an agent more than once and ensuring that all jobs are
completed. The objective might be to minimize the total time to complete a set of jobs, or
to maximize skill ratings, maximize the total satisfaction of the group or to minimize the
cost of the assignments. This is subjected to the following requirements:
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 2
1. Each machine is assigned not more than one job.
2. Each job is assigned to exactly one machine.
Formulation of assignment problem
Consider m laborers to whom n tasks are assigned. No laborer can either sit idle or do
more than one task. Every pair of person and assigned work has a rating. This rating may
be cost, satisfaction, penalty involved or time taken to finish the job. There will be N
2
such
combinations of persons and jobs assigned. Thus, the optimization problem is to find such
man job combinations that optimize the sum of ratings among all.
The formulation of this problem as a special case of transportation problem can be
represented by treating laborers as sources and the tasks as destinations. The supply
available at each source is 1 and the demand required at each destination is 1.The cost of
assigning (transporting) laborer i to task j is c
ij.
It is necessary to first balance this problem by adding a dummy laborer or task depending
on whether m<n or m>n, respectively. The cost coefficient c
ij
for this
dummy will be zero.
Let
⎪
⎩
⎪
⎨
⎧
=
machine i the to assigned is job j the if
machine i the to assigned not is job j the if
x
th th
th th
ij
, 1
, 0
Thus the above model can be expressed as
∑∑
= =
m
i
n
j
ij ij
x c Minimize
1 1
Since each task is assigned to exactly one laborer and each laborer is assigned only one
job, the constraints are
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 3
1
1
1 1, 2,...
1 1, 2,...
n
ij
i
n
ij
j
x for j n
x for i m
=
=
= =
= =
∑
∑
1 0 or x
ij
=
Due to the special structure of the assignment problem, the solution can be found out using
a more convenient method called Hungarian method which will be illustrated through an
example below.
Example 1: (Taha, 1982)
Consider three jobs to be assigned to three machines. The cost for each combination is
shown in the table below. Determine the minimal job – machine combinations.
Table 1
Machine
Job
1 2 3 a
i
1 5 7 9 1
2 14 10 12 1
3 15 13 16 1
b
j
1 1 1
Solution:
Step 1:
Create zero elements in the cost matrix (zero assignment) by subtracting the smallest
element in each row (column) from the corresponding row (column). After this exercise,
the resulting cost matrix is obtained by subtracting 5 from row 1, 10 from row 2 and 13
from row 3.
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 4
Table 2
1 2 3
1 0 2 4
2 4 0 2
3 2 0 3
Step 2:
Repeating the same with columns, the final cost matrix is
Table 3
1 2 3
1 0 2 2
2 4 0 0
3 2 0 3
The italicized zero elements represent a feasible solution. Thus the optimal assignment is
(1,1), (2,3) and (3,2). The total cost is equal to 60 (5 +12+13).
In the above example, it was possible to obtain the feasible assignment. But in more
complicated problems, additional rules are required which are explained in the next
example.
Example 2 (Taha, 1982)
Consider four jobs to be assigned to four machines. The cost for each combination is
shown in the table below. Determine the minimal job – machine combinations.
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 5
Table 4
Machine
Job
1 2 3 4 a
i
1 1 4 6 3 1
2 8 7 10 9 1
3 4 5 11 7 1
4 6 7 8 5 1
b
j
1 1 1 1
Solution:
Step 1: Create zero elements in the cost matrix by subtracting the smallest element in each
row from the corresponding row.
Table 5
1 2 3 4
1 0 3 5 2
2 1 0 3 2
3 0 1 7 3
4 1 2 3 0
Step 2: Repeating the same with columns, the final cost matrix is
Table 6
1 2 3 4
1 0 3 2 2
2 1 0 0 2
3 0 1 4 3
4 1 2 0 0
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 6
Rows 1 and 3 have only one zero element. Both of these are in column 1, which means
that both jobs 1 and 3 should be assigned to machine 1. As one machine can be assigned
with only one job, a feasible assignment to the zero elements is not possible as in the
previous example.
Step 3: Draw a minimum number of lines through some of the rows and columns so that
all the zeros are crossed out.
Table 7
1 2 3 4
1 0 3 2 2
2 1 0 0 2
3 0 1 4 3
4 1 2 0 0
Step 4: Select the smallest uncrossed element (which is 1 here). Subtract it from every
uncrossed element and also add it to every element at the intersection of the two lines.
This will give the following table.
Table 8
1 2 3 4
1 0 2 1 1
2 2 0 0 2
3 0 0 3 2
4 2 2 0 0
This gives a feasible assignment (1,1), (2,3), (3,2) and (4,4) with a total cost of 1+10+5+5
= 21.
If the optimal solution had not been obtained in the last step, then the procedure of
drawing lines has to be repeated until a feasible solution is achieved.
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 7
Formulation of Traveling Salesman Problem (TSP) as an Assignment Problem
A traveling salesman has to visit n cities and return to the starting point. He has to start
from any one city and visit each city only once. Suppose he starts from the k
th
city and the
last city he visited is m. Let the cost of travel from i
th
city to j
th
city be c
ij
. Then the
objective function is
∑∑
= =
m
i
n
j
ij ij
x c Minimize
1 1
subject to the constraints
1
1
1 1, 2,... , ,
1 1, 2,... , ,
1
0 1
n
ij
i
n
ij
j
mk
ij
x for j n i j i m
x for i m i j i m
x
x or
=
=
= = ≠
= = ≠
=
=
∑
∑
≠
≠
Solution Procedure:
Solve the problem as an assignment problem using the method used to solve the above
examples. If the solutions thus found out are cyclic in nature, then that is the final solution.
If it is not cyclic, then select the lowest entry in the table (other than zero). Delete the row
and column of this lowest entry and again do the zero assignment in the remaining matrix.
Check whether cyclic assignment is available. If not, include the next higher entry in the
table and the procedure is repeated until a cyclic assignment is obtained.
The procedure is explained through an example below.
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 8
Example 3:
Consider a four city TSP for which the cost between the city pairs are as shown in the
figure below. Find the tour of the salesman so that the cost of travel is minimal.
2
6 8
4
5
1 4
9 9
3
Table 9
1 2 3 4
1 ∞ 4 9 5
2 6 ∞ 4 8
3 9 4 ∞ 9
4 5 8 9 ∞
Solution:
Step 1: The optimal solution after using the Hungarian method is shown below.
Table 10
1 2 3 4
1 ∞ 0 5 0
2 2 ∞ 0 3
3 5 0 ∞ 4
4 0 3 4 ∞
D Nagesh Kumar, IISc, Bangalore M4L3
Optimization Methods: Linear Programming Applications – Assignment Problem 9
The optimal assignment is 1→ 4, 2→ 3, 3→ 2, 4→ 1 which is not cyclic.
Step 2: Consider the lowest entry ‘2’ of the cell (2,1). If there is a tie in selecting the
lowest entry, then break the tie arbitrarily. Delete the 2
nd
row and 1
st
column. Do the zero
assignment in the remaining matrix. The resulting table is
Table 11
1 2 3 4
1 ∞ 0 4 0
2 2 ∞ 0 3
3 5 0 ∞ 4
4 0 0 0 ∞
Thus the next optimal assignment is 1→ 4, 2→1, 3→ 2, 4→ 3 which is cyclic. Thus the
required tour is 1→ 4→3→ 2→ 1 and the total travel cost is 5 + 9 + 4 + 6 = 24.
D Nagesh Kumar, IISc, Bangalore M4L3
D Nagesh Kumar, IISc Optimization Methods: M4L3
1
Linear Programming Applications
Assignment Problem
D Nagesh Kumar, IISc Optimization Methods: M4L3
2
Introduction
¾ Assignment problem is a particular class of transportation
linear programming problems
¾ Supplies and demands will be integers (often 1)
¾ Traveling salesman problem is a special type of
assignment problem
D Nagesh Kumar, IISc Optimization Methods: M4L3
3
Objectives
¾ To structure and formulate a basic assignment problem
¾ To demonstrate the formulation and solution with a
numerical example
¾ To formulate and solve traveling salesman problem as an
assignment problem
D Nagesh Kumar, IISc Optimization Methods: M4L3
4
Structure of Assignment Problem
¾ Assignment problem is a special type of transportation problem in
which
¾ Number of supply and demand nodes are equal.
¾ Supply from every supply node is one.
¾ Every demand node has a demand for one.
¾ Solution is required to be all integers.
D Nagesh Kumar, IISc Optimization Methods: M4L3
5
Structure of Assignment Problem …contd.
¾ Goal of an general assignment problem: Find an optimal assignment
of machines (laborers) to jobs without assigning an agent more than
once and ensuring that all jobs are completed
¾ The objective might be to minimize the total time to complete a set of
jobs, or to maximize skill ratings, maximize the total satisfaction of
the group or to minimize the cost of the assignments
¾ This is subjected to the following requirements:
¾ Each machine is assigned no more than one job.
¾ Each job is assigned to exactly one machine.
D Nagesh Kumar, IISc Optimization Methods: M4L3
6
Formulation of Assignment Problem
¾ Consider m laborers to whom n tasks are assigned
¾ No laborer can either sit idle or do more than one task
¾ Every pair of person and assigned work has a rating
¾ Rating may be cost, satisfaction, penalty involved or time taken to
finish the job
¾ N
2
such combinations of persons and jobs assigned
¾ Optimization problem: Find such jobman combinations that optimize
the sum of ratings among all.
D Nagesh Kumar, IISc Optimization Methods: M4L3
7
Formulation of Assignment Problem …contd.
¾ Representation of this problem as a special case of transportation
problem
¾ laborers as sources
¾ tasks as destinations
¾ Supply available at each source is 1
¾ Demand required at each destination is 1
¾ Cost of assigning (transporting) laborer i to task j is c
ij.
¾ It is necessary to first balance this problem by adding a dummy laborer
or task depending on whether m < n or m > n, respectively
¾ Cost coefficient c
ij
for this dummy will be zero.
D Nagesh Kumar, IISc Optimization Methods: M4L3
8
Formulation of Assignment Problem …contd.
¾ Let x
ij
be the decision variable
¾ The objective function is
⎪
⎩
⎪
⎨
⎧
=
machine i the to assigned is job j the if
machine i the to assigned not is job j the if
x
th th
th th
ij
, 1
, 0
∑∑
= =
m
i
n
j
ij ij
x c Minimize
1 1
D Nagesh Kumar, IISc Optimization Methods: M4L3
9
Formulation of Assignment Problem …contd.
¾ Since each task is assigned to exactly one laborer and each laborer is
assigned only one job, the constraints are
¾ Due to the special structure of the assignment problem, the solution can
be found out using a more convenient method called Hungarian method.
1
1
1 1, 2,...
1 1, 2,...
n
ij
i
n
ij
j
x for j n
x for i m
=
=
= =
= =
∑
∑
1 0 or x
ij
=
D Nagesh Kumar, IISc Optimization Methods: M4L3
10
Example (1)
¾ Consider three jobs to be assigned to three machines. The cost for
each combination is shown in the table below. Determine the
minimal job – machine combinations
D Nagesh Kumar, IISc Optimization Methods: M4L3
11
Example (1)…contd.
Solution:
Step 1:
¾ Create zero elements in the cost matrix (zero assignment) by subtracting the
smallest element in each row (column) from the corresponding row (column).
¾ Considering the rows first, the resulting cost matrix is obtained by subtracting 5
from row 1, 10 from row 2 and 13 from row 3
D Nagesh Kumar, IISc Optimization Methods: M4L3
12
Example (1)…contd.
Step 2:
¾ Repeating the same with columns, the final cost matrix is
¾ The italicized zero elements represent a feasible solution
¾ Thus the optimal assignment is (1,1), (2,3) and (3,2)
¾ The total cost is equal to (5 +12+13) = 60
D Nagesh Kumar, IISc Optimization Methods: M4L3
13
Example (2)
¾ In the above example, it was possible to obtain the feasible assignment
¾ But in more complicate problems, additional rules are required which are
explained in the next example.
Example 2 (Taha, 1982)
¾ Consider four jobs to be assigned to four machines. Determine the minimal
job – machine combinations.
D Nagesh Kumar, IISc Optimization Methods: M4L3
14
Example (2) …contd.
¾ The cost for each combination is shown in the table below
D Nagesh Kumar, IISc Optimization Methods: M4L3
15
Example (2) …contd.
Solution:
Step 1: Create zero elements in the cost matrix by subtracting the
smallest element in each row from the corresponding row.
D Nagesh Kumar, IISc Optimization Methods: M4L3
16
Example (2) …contd.
¾ Step 2: Repeating the same with columns, the final cost matrix is
¾ Rows 1 and 3 have only one zero element
¾ Both of these are in column 1, which means that both jobs 1 and 3
should be assigned to machine 1
D Nagesh Kumar, IISc Optimization Methods: M4L3
17
Example (2) …contd.
¾ As one machine can be assigned with only one job, a feasible
assignment to the zero elements is not as in the previous example
¾ Step 3: Draw a minimum number of lines through some of the rows
and columns so that all the zeros are crossed out
D Nagesh Kumar, IISc Optimization Methods: M4L3
18
Example (2) …contd.
¾ Step 4: Select the smallest uncrossed element (which is 1 here).
Subtract it from every uncrossed element and also add it to every
element at the intersection of the two lines.
¾ This will give the following table
D Nagesh Kumar, IISc Optimization Methods: M4L3
19
Example (2) …contd.
¾ This gives a feasible assignment (1,1), (2,3), (3,2) and (4,4)
¾ And the total cost is 1+10+5+5 = 21.
¾ If the optimal solution had not been obtained in the last step, then the
procedure of drawing lines has to be repeated until a feasible solution
is achieved.
D Nagesh Kumar, IISc Optimization Methods: M4L3
20
Formulation of Traveling Salesman
Problem (TSP) as an Assignment Problem
¾ A traveling salesman has to visit n cities and return to the starting
point
¾ He has to start from any one city and visit each city only once.
¾ Suppose he starts from the k
th
city and the last city he visited is m
¾ Let the cost of travel from i
th
city to j
th
city be c
ij
.
¾ Then the objective function is
∑∑
= =
m
i
n
j
ij ij
x c Minimize
1 1
D Nagesh Kumar, IISc Optimization Methods: M4L3
21
Formulation of Traveling Salesman Problem (TSP)
as an Assignment Problem …contd.
¾ subject to the constraints
Solution Procedure:
¾ Solve the problem as an assignment problem using the method used to solve
the above examples
¾ If the solutions thus found out are cyclic in nature, then that is the final
solution
1
1
1 1, 2,... , ,
1 1, 2,... , ,
1
0 1
n
ij
i
n
ij
j
mk
ij
x for j n i j i m
x for i m i j i m
x
x or
=
=
= = ≠ ≠
= = ≠ ≠
=
=
∑
∑
D Nagesh Kumar, IISc Optimization Methods: M4L3
22
Formulation of Traveling Salesman Problem (TSP)
as an Assignment Problem …contd.
Solution Procedure …contd.
¾ If it is not cyclic, then select the lowest entry in the table (other than
zero)
¾ Delete the row and column of this lowest entry and again do the zero
assignment in the remaining matrix
¾ Check whether cyclic assignment is available
¾ If not, include the next higher entry in the table and the procedure is
repeated until a cyclic assignment is obtained.
D Nagesh Kumar, IISc Optimization Methods: M4L3
23
Traveling Salesman Problem (TSP)  Example
¾ Consider a four city TSP for which the cost between the city pairs are
as shown in the figure below. Find the tour of the salesman so that
the cost of travel is minimal.
Cost matrix
D Nagesh Kumar, IISc Optimization Methods: M4L3
24
Traveling Salesman Problem (TSP) – Example
…contd.
Solution:
¾ Step 1: The optimal solution after using the Hungarian method is
shown below.
¾ The optimal assignment is 1→ 4, 2→ 3, 3→ 2, 4→ 1 which is not
cyclic
D Nagesh Kumar, IISc Optimization Methods: M4L3
25
Traveling Salesman Problem (TSP) – Example
…contd.
Step 2:
¾ Consider the lowest entry ‘2’ of the cell (2,1)
¾ If there is a tie in selecting the lowest entry, then break the tie
arbitrarily
¾ Delete the 2
nd
row and 1
st
column
¾ Do the zero assignment in the remaining matrix
D Nagesh Kumar, IISc Optimization Methods: M4L3
26
Traveling Salesman Problem (TSP) – Example
…contd.
¾ The resulting table is
¾ Next optimal assignment is 1→4, 2→1, 3→2, 4→3 which is cyclic
¾ Required tour is 1→4→3→2→1
¾ Optimal total travel cost is 5 + 9 + 4 + 6 = 24
D Nagesh Kumar, IISc Optimization Methods: M4L3
27
Thank You
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
1
Module – 4 Lecture Notes – 4
Structural & Water Resources Problems
Introduction
In the previous lectures, some of the bench mark problems which use LP were discussed. LP
has been applied to formulate and solve several types of problems in engineering field also.
LP finds many applications in the field of water resources and structural design which include
many types like planning of urban water distribution, reservoir operation, crop water
allocation, minimizing the cost and amount of materials in structural design. In this lecture,
applications of LP in the plastic design of frame structures and also in deciding the optimal
irrigation allocation and water quality management are discussed.
Typical Example – Structural Design
(1) A beam column arrangement of a rigid frame is shown below. Moment in beam is
represented by M
b
and moment in column is denoted by M
c
. l = 8 units and h= 6 units and
forces F
1
=2 units and F
2
=1 unit. Assuming that plastic moment capacity of beam and
columns are linear functions of their weights; the objective function is to minimize the sum of
weights of the beam and column materials.
Fig. 1
F
2
=1
F
1
=2
3 4 5
2 6
h=6
1 7
l=8 l=8
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
2
Solution:
In the plastic limit design, it is assumed that at the points of peak moments, plastic hinges
will be developed. The points of development of peak moments are numbered in the above
figure from 1 through 7. The development of sufficient hinges makes the structure unstable
known as a collapse mechanism. Thus, for the design to be safe the energy absorbing
capacity of the frame (U) should be greater than the energy imparted by externally applied
load (E) for the various collapse mechanisms of the structure.
The objective function can be written as
Minimize f = weight of beam + weight of column
i.e.
(
2 2
b
)
c
f w lM hM = + (1)
where w is weight per unit length over unit moment in material. Since w is constant,
optimizing (1) is same as optimizing
( )
2 2
16 12
b
b c
c
f lM hM
M M
= +
= +
(2)
The four possible collapse mechanisms are shown in the figure below with the corresponding
U and E values. Constraints are formulated from the design restriction U for all the
mechanisms.
E ≥
(a) (b)
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
3
(b) (d)
Fig. 2
Hence, the optimization problem can be stated as
16 12
b c
Minimize f M M = +
(2)
subject to
(3) 3 ≥
c
M
(4) 2 ≥
b
M
(5) 10 2 ≥ +
c b
M M
(6) 6 ≥ +
c b
M M
, 0 ≥
b
M 0 ≥
c
M
(7)
Writing problem in standard format
16 12
b c
Minimize f M M = +
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
4
subject to M
c
≤ 3
M
b
≤ 2
2M
b

M
c
≤ 10
M
b
M
c
≤ 6
Introducing slack variables X
1
, X
2
, X
3
, X
4
all , the system of equations can be written in
canonical form as
0 ≥
M
c
+X
1
=  3
M
b
+ X
2
=  2
2M
b
M
c
+X
3
=  10
M
b
M
c
+X
4
=  6
16M
B
+ 12M
C
– f = 0
This model can be solved using Dual Simplex algorithm which is explained below
Starting Solution:
Basic
Variables
Variables
M
B
M
C
X
1
X
2
X
3
X
4
b
r
f 16 12 0 0 0 0 0
X
1
0 1 1 0 0 0 3
X
2
1 0 0 1 0 0 2
X
3
2 1 0 0 1 0 10
X
4
1 1 0 0 0 1 6
Ratio 8 12
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
5
Iteration 1:
Basic
Variables
Variables
M
B
M
C
X
1
X
2
X
3
X
4
b
r
f 0 4 0 0 8 0 80
X
1
0 1 1 0 0 0 3
X
2
0 ½ 0 1 ½ 0 3
M
B
1 ½ 0 0 ½ 0 5
X
4
0 ½ 0 0 ½ 1 1
Ratio 4
Iteration 2:
Basic
Variables
Variables
M
B
M
C
X
1
X
2
X
3
X
4
b
r
f 0 0 4 0 8 0 92
M
C
0 1 1 0 0 0 3
X
2
0 0 ½ 1 ½ 0 3/2
M
B
1 0 ½ 0 ½ 0 7/2
X
4
0 0 ½ 0 ½ 1 1
Ratio
The optimal value of decision variables are
M
B
=7/2; M
C
=3
And the total weight of the material required f = 92w units.
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
6
Typical Example – Water Resources
(2) Consider two crops 1 and 2. One unit of crop 1 produces four units of profit and one
unit of crop 2 brings five units of profit. The demand of production of crop 1 is A units and
that of crop 2 is B units. Let x be the amount of water required for A units of crop 1 and y be
the same for B units of crop 2. The amount of production and the amount of water required
can be expressed as a linear relation as shown below
A = 0.5(x  2) + 2
B = 0.6(y  3) + 3
Minimum amount of water that must be provided to 1 and 2 to meet their demand is two and
three units respectively. Maximum availability of water is ten units. Find out the optimum
pattern of irrigation.
Solution:
The objective is to maximize the profit from crop 1 and 2, which can be represented as
Maximize f = 4A + 5B;
Expressing as a function of the amount of water,
Maximize f = 4[0.5(x  2) + 2] + 5[0.6(y  3) + 3]= 2x + 3y + 10
subject to
; Maximum availability of water 10 ≤ + y x
; Minimum amount of water required for crop 1 2 ≥ x
; Minimum amount of water required for crop 2 3 ≥ y
The above problem is same as maximizing f’ = 2x + 3y subject to same constraints.
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
7
Changing the problem into standard form by introducing slack variables S
1
, S
2
, S
3
Maximize f’ = 2x + 3y
subject to
x + y + S
1
=10
x + S
2
= 2
y + S
3
= 3
This model is solved by forming the simplex table as below
Starting Solution:
Variables
Basic
Variables
x y S
1
S
2
S
3
RHS Ratio
f’ 2 3 0 0 0 0
S
1
1 1 1 0 0 10 10
S
2
1 0 0 1 0 2 
S
3
0 1 0 0 1 3 3
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
8
Iteration 1:
Variables
Basic
Variables
x y S
1
S
2
S
3
RHS Ratio
f’ 2 0 0 0 3 9 
S
1
1 0 1 0 1 7 7
S
2
1 0 0 1 0 2 2
y 0 1 0 0 1 3 
Iteration 2:
Variables
Basic
Variables
x y S
1
S
2
S
3
RHS Ratio
f’ 0 0 0 2 3 13 
S
1
0 0 1 1 1 5 5
x 1 0 0 1 0 2 
y 0 1 0 0 1 3 3
Iteration 3:
Variables
Basic
Variables
x y S
1
S
2
S
3
RHS Ratio
f’ 0 0 3 1 0 28 
S
3
0 0 1 1 1 5 
x 1 0 0 1 0 2 
y 0 1 1 1 0 8 
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
9
Hence the solution is
x = 2; y = 8; f’ = 28
Therefore, f
= 28+10 = 38
Thus, water allocated to crop A is 2 units and to crop B is 8 units and total profit yielded is 38
units.
Typical Example – Water Quality Management
Waste load allocation for water quality management in a river system can be defined as
determination of optimal treatment level of waste, which is discharged to a river; such that
the water quality standards set by Pollution Control Agency (PCA) are maintained through
out the river. Conventional waste load allocation involves minimization of treatment cost
subject to the constraint that the water quality standards are not violated.
Consider a simple problem, where, there are M dischargers, who discharge waste into the
river, and I checkpoints, where the water quality is measured by PCA. Let x
j
is the treatment
level and a
j
is the unit treatment cost for j
th
discharger (j=1,2,…,M). c
i
is the dissolved oxygen
(DO) concentration at checkpoint i (i=1,2,…,I), which is to be controlled. Therefore the
decision variables for the waste load allocation model are x
j
(j=1,2,…,M).
Thus, the objective function can be expressed as
1
M
j j
j
Maximize f a x
=
=
∑
The relationship between the water quality indicator, c
i
(DO) at a checkpoint and the
treatment level upstream to that checkpoint is linear (based on StreeterPhelps Equation)
when all other parameters involved in water quality simulations are constant. Let g(x) denotes
the linear relationship between c
i
and x
j
. Then,
( ) ,
i j
c g x i = ∀ j
D Nagesh Kumar, IISc, Bangalore M4L4
Optimization Methods: Linear Programming Applications – Structural & Water
Resources Problems
10
Let c
P
be the permissible DO level set by PCA, which is to be maintained through out the
river. Therefore,
i P
c c ≥ ∀i
Solution of the optimization model using simplex algorithm gives the optimal fractional
removal levels required to maintain the water quality of the river.
D Nagesh Kumar, IISc, Bangalore M4L4
D Nagesh Kumar, IISc Optimization Methods: M4L4
1
Linear Programming Applications
Structural & Water
Resources Problems
D Nagesh Kumar, IISc Optimization Methods: M4L4
2
Introduction
¾ LP has been applied to formulate and solve several types
of problems in engineering field
¾ LP finds many applications in the field of water resources
and structural design which include
¾ Planning of urban water distribution
¾ Reservoir operation
¾ Crop water allocation
¾ Minimizing the cost and amount of materials in structural design
D Nagesh Kumar, IISc Optimization Methods: M4L4
3
Objectives
¾ To discuss the applications of LP in the plastic design of frame
structures
¾ To discuss the applications of LP in deciding the optimal pattern of
irrigation
D Nagesh Kumar, IISc Optimization Methods: M4L4
4
Example – Structural Design
¾ A beam column arrangement of a
rigid frame is shown
¾ Moment in beam is represented by
M
b
¾ Moment in column is denoted by
M
c
.
¾ l = 8 units and h= 6 units
¾ Forces F
1
=2 units and F
2
=1 unit.
Assuming that plastic moment capacity of beam and columns are linear
functions of their weights; the objective function is to minimize weights of
the materials.
D Nagesh Kumar, IISc Optimization Methods: M4L4
5
Example  Structural Design …contd.
Solution:
¾ In the limit design, it is assumed that at the points of peak moments,
plastic hinges will be developed
¾ Points of development of peak moments are numbered in the above
figure from 1 through 7
¾ Development of sufficient hinges makes the structure unstable known as
a collapse mechanism
¾ For the design to be safe the energy absorbing capacity of the frame (U)
should be greater than the energy imparted by externally applied load
(E) for the various collapse mechanisms of the structure
D Nagesh Kumar, IISc Optimization Methods: M4L4
6
Example  Structural Design …contd.
¾ The objective function can be written as
Minimize f = weight of beam + weight of column
where w is weight per unit length over unit moment in material
¾ Since w is constant, optimizing (1) is same as optimizing
( )
2 2 (1)
b c
f w lM hM = +
( )
2 2
16 12
b c
b c
f lM hM
M M
= +
= +
D Nagesh Kumar, IISc Optimization Methods: M4L4
7
Example  Structural Design …contd.
¾ Four possible collapse mechanisms are shown in the figure below with
the corresponding U and E values
(a) (b)
D Nagesh Kumar, IISc Optimization Methods: M4L4
8
Example  Structural Design …contd.
(c) (d)
D Nagesh Kumar, IISc Optimization Methods: M4L4
9
Example  Structural Design …contd.
¾ The optimization problem can be stated as
subject to
16 12
b c
Minimize f M M = +
3
2
2 10
6
0; 0
c
b
b c
b c
b c
M
M
M M
M M
M M
≥
≥
+ ≥
+ ≥
≥ ≥
D Nagesh Kumar, IISc Optimization Methods: M4L4
10
Example  Structural Design …contd.
¾ Introducing slack variables X
1
, X
2
, X
3
, X
4
all , the system of equations
can be written in canonical form as
16M
B
+ 12M
C
– f = 0
M
c
+X
1
=  3
M
b
+ X
2
=  2
2M
b
M
c
+X
3
=  10
M
b
M
c
+X
4
=  6
16M
B
+ 12M
C
– f = 0
D Nagesh Kumar, IISc Optimization Methods: M4L4
11
Example  Structural Design …contd.
¾ This model can be solved using Dual Simplex algorithm
¾ The final tableau is shown below
The optimal value of
decision variables are
M
B
=7/2; M
C
=3
And the total weight
of the material
required
f = 92w units
D Nagesh Kumar, IISc Optimization Methods: M4L4
12
Example  Irrigation Allocation
¾ Consider two crops 1 and 2. One unit of crop 1 produces four units of
profit and one unit of crop 2 brings five units of profit. The demand of
production of crop 1 is A units and that of crop 2 is B units. Let x be the
amount of water required for A units of crop 1 and y be the same for B
units of crop 2.
¾ The amount of production and the amount of water required can be
expressed as a linear relation as shown below
A = 0.5(x  2) + 2
B = 0.6(y  3) + 3
D Nagesh Kumar, IISc Optimization Methods: M4L4
13
Example  Irrigation Allocation …contd.
¾ Consider two crops 1 and 2. One unit of crop 1 produces four units of
profit and one unit of crop 2 brings five units of profit. The demand of
production of crop 1 is A units and that of crop 2 is B units. Let x be the
amount of water required for A units of crop 1 and y be the same for B
units of crop 2.
¾ The amount of production and the amount of water required can be
expressed as a linear relation as shown below
A = 0.5(x  2) + 2
B = 0.6(y  3) + 3
D Nagesh Kumar, IISc Optimization Methods: M4L4
14
Example  Irrigation Allocation …contd.
Solution:
¾ Objective: Maximize the profit from crop 1 and 2
Maximize f = 4A + 5B;
¾ Expressing as a function of the amount of water,
Maximize f = 4[0.5(x  2) + 2] + 5[0.6(y  3) + 3]
f = 2x + 3y + 10
D Nagesh Kumar, IISc Optimization Methods: M4L4
15
Example  Irrigation Allocation …contd.
subject to
¾ ; Maximum availability of water
¾ ; Minimum amount of water required for crop 1
¾ ; Minimum amount of water required for crop 2
¾ The above problem is same as maximizing
f’ = 2x + 3y
subject to same constraints.
10 ≤ + y x
2 ≥ x
3 ≥ y
D Nagesh Kumar, IISc Optimization Methods: M4L4
16
Example  Irrigation Allocation …contd.
¾ Changing the problem into standard form by introducing slack variables
S
1
, S
2
, S
3
Maximize f’ = 2x + 3y
subject to
x + y + S
1
=10
x + S
2
= 2
y + S
3
= 3
This model is solved using simplex method
D Nagesh Kumar, IISc Optimization Methods: M4L4
17
Example  Irrigation Allocation …contd.
¾ The final tableau
is as shown
¾ The solution is x = 2; y = 8; f’ = 28
Therefore, f = 28+10 = 38
¾ Water allocated to crop A is 2 units and to crop B is 8 units and total
profit yielded is 38 units.
D Nagesh Kumar, IISc Optimization Methods: M4L4
18
Example – Water Quality Management
¾ Waste load allocation for water quality management in a river system
can be defined as
¾ Determination of optimal treatment level of waste, which is discharged
to a river
¾ By maintaining the water quality standards set by Pollution Control
Agency (PCA), through out the river
¾ Conventional waste load allocation involves minimization of treatment
cost subject to the constraint that the water quality standards are not
violated
D Nagesh Kumar, IISc Optimization Methods: M4L4
19
Example  Waster Quality Management …contd.
¾ Consider a simple problem of M dischargers, who discharge waste into
the river, and I checkpoints, where the water quality is measured by
PCA
¾ Let x
j
is the treatment level and a
j
is the unit treatment cost for j
th
discharger (j=1,2,…,M)
¾ c
i
is the dissolved oxygen (DO) concentration at checkpoint i
(i=1,2,…,I), which is to be controlled
¾ Decision variables for the waste load allocation model are x
j
(j=1,2,…,M).
D Nagesh Kumar, IISc Optimization Methods: M4L4
20
Example  Waster Quality Management …contd.
¾ Objective function can be expressed as
¾ Relationship between the water quality indicator, c
i
(DO) at
a checkpoint and the treatment level upstream to that
checkpoint is linear (based on StreeterPhelps Equation)
¾ Let g(x) denotes the linear relationship between c
i
and x
j
.
¾ Then,
1
M
j j
j
Maximize f a x
=
=
∑
( ) ,
i j
c g x i j = ∀
D Nagesh Kumar, IISc Optimization Methods: M4L4
21
Example  Waster Quality Management …contd.
¾ Let c
P
be the permissible DO level set by PCA, which is to
be maintained through out the river
¾ Therefore,
¾ This model can be solved using simplex algorithm which
will give the optimal fractional removal levels required to
maintain the water quality of the river
i P
c c i ≥ ∀
D Nagesh Kumar, IISc Optimization Methods: M4L4
22
Thank You
Optimization Methods: Dynamic Programming  Learning Objectives
Module 5: Dynamic Programming
Learning Objectives
It was discussed in modules 3 and 4 that most widely used optimization method is linear
programming technique. But this technique is not flexible in some complex problems and is
only restricted to linear optimization problems. Problems having a sequential optimization
nature can be solved easily using dynamic programming (DP), which is the main objective of
this module.
This module gives a brief description of sequential optimization and multistage decision
processes. The representation of multistage decision processes is given for a general problem
having N decision variables. This will enable the reader to formulate any multistage decision
problems. This will be followed by an explanation about the basic concepts on which a
problem is solved using dynamic programming. Formulation of recursive equations will be
discussed for a general problem. This will help the reader to develop recursive equations
using both backward and forward approach for any type of sequential optimization problem.
The computational procedure for DP will be discussed for the same general problem. At the
end, continuous DP, multiple state variable and curse of dimensionality will be described.
At the end of the module the reader will be able to
1. Represent a multistage decision process
2. Conceptualize the principle of optimality and suboptimization
3. Formulate recursive equations for a DP
4. Acquire an idea about the computational procedure of DP
5. Differentiate between discrete DP and continuous DP
6. Deal with multiple state variables in DP
D Nagesh Kumar, IISc, Bangalore M5LO
Optimization Methods: Dynamic Programming  Introduction 1
Module – 5 Lecture Notes – 1
Introduction
Introduction
In some complex problems, it will be advisable to approach the problem in a sequential
manner in order to find the solution quickly. The solution is found out in multi stages. This is
the basic approach behind dynamic programming. It works in a “divide and conquer”
manner. The word "programming" in "dynamic programming" has no particular connection
to computer programming at all. A program is, instead, the plan for action that is produced. In
this lecture, the multistage decision process, its representation, various types and the concept
of suboptimization and principle of optimality are discussed.
Sequential optimization
In sequential optimization, a problem is approached by dividing it into smaller subproblems
and optimization is done for these subproblems without losing the integrity of the original
problem. Sequential decision problems are those in which decisions are made in multiple
stages. These are also called multistage decision problems since decisions are made at a
number of stages.
In multistage decision problems, an N variable problem is represented by N single variable
problems. These problems are solved successively such that the optimal value of the original
problem can be obtained from the optimal solutions of these N single variable problems. The
N single variable problems are connected in series so that the output of one stage will be the
input to the succeeding stage. This type of problem is called serial multistage decision
process.
For example, consider a water allocation problem to N users. The objective function is to
maximize the total net benefit from all users. This problem can be solved by considering each
user separately and optimizing the individual net benefits, subject to constraints and then
adding up the benefits from all users to get the total optimal benefit.
D Nagesh Kumar, IISc, Bangalore M5L1
Optimization Methods: Dynamic Programming  Introduction 2
Representation of multistage decision process
Consider a single stage decision process as shown in the figure below.
Net Benefits, NB
1
Stage 1
Input S
1
Output S
2
Decision variable, X
1
Fig 1.
Let S
1
be the input state variable, S
2
be the output state variable, X
1
be the decision variable
and NB
1
be the net benefits. The input and output are related by a transformation function
expressed as,
S
2
= g(X
1
, S
1
)
Also since the net benefits are influenced by the decision variables and also the input
variable, the benefit function can be expressed as
NB
1
= h(X
1
, S
1
)
Now, consider a serial multistage decision process consisting of T stages as shown in the
figure below.
Stage 1 Stage t Stage T
S
t
NB
t
X
t
S
t+1
S
1
S
2
NB
1
NB
T
X
1
X
T
S
T
S
T+1
Fig 2.
D Nagesh Kumar, IISc, Bangalore M5L1
Optimization Methods: Dynamic Programming  Introduction 3
Here, for the t
th
stage the, state transformation and the benefit functions are written as,
S
t+1
= g(X
t
, S
t
)
NB
t
= h(X
t
, S
t
)
The objective of this multistage problem is to find the optimum values of all decision
variables X
1
, X
2
,…, X
T
such that the individual net benefits of each stage that is expressed by
some objective function, f(NB
t
) and the total net benefit which is expressed by f(NB
1
,
NB
2
,…, NB
T
) should be maximized. The application of dynamic programming to a multistage
problem depends on the nature of this objective function i.e., the objective function should be
separable and monotonic. An objective function is separable, if it can be decomposed and
expressed as a sum or product of individual net benefits of each stage, i.e.,
either ( )
∑ ∑
= =
= =
T
t
T
t
t t t
S X h NB f
1 1
,
or ( )
∏ ∏
= =
= =
T
t
t t
T
t
t
S X h NB f
1 1
,
An objective function is monotonic if for all values of a and b for which the value of the
benefit function is ( ) ( )
t t t t
S b x h S a x h , , = ≥ = , then
( ) ( )
1 , 2 1 1 , 2 1
, ,..., ..., , , ,..., ..., ,
+ +
= ≥ =
t T t t T t
S x b x x x f S x a x x x f
should be satisfied.
D Nagesh Kumar, IISc, Bangalore M5L1
Optimization Methods: Dynamic Programming  Introduction 4
Types of multistage decision problems
A serial multistage problem such as shown, can be classified into three categories as initial
value problem, final value problem and boundary value problem.
1. Initial value problem: In this type, the value of the initial state variable, S
1
is given.
2. Final value problem: In this, the value of the final state variable, S
T
is given. A final
value problem can be transformed into an initial value problem by reversing the
procedure of computation of the state variable, S
t
.
3. Boundary value problem: In this, the values of both the initial and final state
variables, S
1
and S
T
are given.
Concept of suboptimization and principle of optimality
Bellman (1957) stated the principle of optimality which explains the process of suboptimality
as:
“An optimal policy (or a set of decisions) has the property that whatever the initial state and
initial decision are, the remaining decisions must constitute an optimal policy with regard to
the state resulting from the first decision.”
Consider the objective function consisting of T decision variables x
1
, x
2
, …, x
T
,
( )
∑ ∑
= =
= =
T
t
T
t
t t t
S X h NB f
1 1
,
and satisfying the equations,
S
t+1
= g(X
t
, S
t
)
NB
t
= h(X
t
, S
t
) for t = 1,2,…,T
The concepts of suboptimization and principle of optimality are used to solve this problem
through dynamic programming. To explain these concepts, consider the design of a water
tank in which the cost of construction is to be minimized. The capacity of the tank to be
designed is given as K.
D Nagesh Kumar, IISc, Bangalore M5L1
Optimization Methods: Dynamic Programming  Introduction 5
The main components of a water tank include (i) tank (ii) columns to support the tank and
(iii) the foundation. While optimizing this problem to minimize the cost, it would be
advisable to break this system into individual parts and optimizing each part separately
instead of considering the system as a whole together. However, while breaking and doing
suboptimization, a logical procedure should be used; otherwise this approach can lead to a
poor solution. For example, consider the suboptimization of columns without considering the
other two components. In order to reduce the construction cost of columns, one may use
heavy concrete columns with less reinforcement, since the cost of steel is high. But while
considering the suboptimization of foundation component, the cost becomes higher as the
foundation should be strong enough to carry these heavy columns. Thus, the suboptimization
of columns before considering the suboptimization of foundation will adversely affect the
overall design.
In most of the serial systems as discussed above, since the suboptimization of last component
does not influence the other components, it can be suboptimized independently. For the
above problem, foundation can thus be suboptimized independently. Then the last two
components (columns and foundation) are considered as a single component and
suboptimization is done without affecting other components. This process can be repeated for
any number of end components. The process of suboptimization for the above problem is
shown in the next page.
D Nagesh Kumar, IISc, Bangalore M5L1
Optimization Methods: Dynamic Programming  Introduction 6
Tank Columns Foundation
Original System
Tank Columns Foundation
Suboptimize design of
Foundation component
Fig 3.
Tank Columns Foundation
Tank Columns Foundation
Suboptimize design of
Foundation & Columns together
Optimize complete system
D Nagesh Kumar, IISc, Bangalore M5L1
D Nagesh Kumar, IISc Optimization Methods: M5L1
1
Dynamic Programming
Introduction
D Nagesh Kumar, IISc Optimization Methods: M5L1
2
Introduction and Objectives
Introduction
¾ Complex problems are sometimes solved quickly if approached in a
sequential manner
¾ Dynamic Programming : Sequential or multistage decision making
process
¾ Basic approach behind dynamic programming: Solution is found out in
multi stages
¾ Works in a “divide and conquer” manner
Objectives
To discuss the Sequential Optimization an Multistage Decision
Process
To represent a Multistage Decision Process
To describe the concept of suboptimization and principle of optimality
D Nagesh Kumar, IISc Optimization Methods: M5L1
3
Sequential Optimization
¾ Problem is divided into smaller subproblems
¾ Optimize these subproblems without losing the integrity of the
original problem
¾ Decisions are made sequentially
¾ Also called multistage decision problems since decisions are
made at a number of stages
¾ A N variable problem is represented by N single variable
problems
¾ These problems are solved successively to get the optimal
value of the original problem
D Nagesh Kumar, IISc Optimization Methods: M5L1
4
Sequential Optimization …contd.
¾ Serial multistage decision process: Single variable problems
are connected in series so that the output of one stage will be
the input to the succeeding stage
¾ For example, consider a water allocation problem to N users
¾ The objective function is to maximize the total net benefit from
all users
¾ The problem can be solved by considering each user
separately and optimizing the individual net benefits, subject to
constraints and then adding up the benefits from all users to get
the total optimal benefit
D Nagesh Kumar, IISc Optimization Methods: M5L1
5
Representation of Multistage Decision
Process
¾ Consider a single stage decision process
¾ Here
¾ S
1
is the input state variable
¾ S
2
is the output state variable
¾ X
1
is the decision variables and
¾ NB
1
is the net benefit
¾ The transformation function for the input and output is
S
2
= g(X
1
, S
1
)
¾ Net benefits are expressed as a function of decision variables and
input variable
NB
1
= h(X
1
, S
1
)
Stage 1
Input S
1
Net Benefit, NB
1
Decision variable, X
1
Output S
2
D Nagesh Kumar, IISc Optimization Methods: M5L1
6
Representation of Multistage Decision Process
…contd.
¾ Now, consider a serial multistage decision process consisting of T
stages
¾ For the t
th
stage the stage transformation and the benefit functions are
S
t+1
= g(X
t
, S
t
)
NB
t
= h(X
t
, S
t
)
Stage 1 Stage t Stage T
S
t
NB
t
X
t
S
t+1
S
1
S
2
NB
1
NB
T
X
1
X
T
S
T
S
T+1
D Nagesh Kumar, IISc Optimization Methods: M5L1
7
Representation of Multistage Decision Process
…contd.
¾ Objective of this multistage problem is to find the optimum values of all
decision variables X
1
, X
2
,…, X
T
such that the individual net benefits of
each stage that is expressed by some objective function, f(NB
t
) and
the total net benefit which is expressed by f(NB
1
, NB
2
,…, NB
T
) should
be maximized
¾ Dynamic programming can be applied to this multistage problem if the
objective function is separable and monotonic
¾ An objective function is separable, if it can be decomposed and
expressed as a sum or product of individual net benefits of each stage
or
( )
∑ ∑
= =
= =
T
t
T
t
t t t
S X h NB f
1 1
,
( )
∏ ∏
= =
= =
T
t
t t
T
t
t
S X h NB f
1 1
,
D Nagesh Kumar, IISc Optimization Methods: M5L1
8
Representation of Multistage Decision Process
…contd.
¾ An objective function is monotonic if for all values of a and b for which
the value of the benefit function is ,
then,
is satisfied
( ) ( )
t t t t
S b x h S a x h , , = ≥ =
( ) ( )
1 , 2 1 1 , 2 1
, ,..., ..., , , ,..., ..., ,
+ +
= ≥ =
t T t t T t
S x b x x x f S x a x x x f
D Nagesh Kumar, IISc Optimization Methods: M5L1
9
Types of Multistage Decision Process
¾ A serial multistage problem can be divided into three categories
¾ Initial value problem
¾ Value of the initial state variable, S
1
is given
¾ Final value problem
¾ Value of the final state variable, S
T
is given
¾ Final value problem can be transformed into an initial value
problem by reversing the direction of the state variable, S
t
¾ Boundary value problem.
¾ Values of both the initial and final state variables, S
1
and S
T
are given
D Nagesh Kumar, IISc Optimization Methods: M5L1
10
Concept of SubOptimization
Consider the objective function consisting of T decision variables x
1
, x
2
,
…, x
T
satisfying the equations,
S
t+1
= g(X
t
, S
t
)
NB
t
= h(X
t
, S
t
) for t = 1,2,…,T
To solve this problem through dynamic programming, the concepts of
suboptimization and principle of optimality are used
( )
∑ ∑
= =
= =
T
t
T
t
t t t
S X h NB f
1 1
,
D Nagesh Kumar, IISc Optimization Methods: M5L1
11
Concept of SubOptimization …contd.
¾ Consider the design of a water tank in which the cost of construction is
to be minimized
¾ Capacity of the tank to be designed is K
¾ Main components of a water tank include (i) tank (ii) columns to
support the tank and (iii) the foundation
¾ Optimization can be done by breaking the system into individual parts
and optimizing each part separately
¾ While breaking and suboptimizing, a logical procedure should be
used; otherwise this approach can lead to a poor solution
D Nagesh Kumar, IISc Optimization Methods: M5L1
12
Concept of SubOptimization …contd.
¾ For example, suboptimization of columns without considering
the other two components may cause the use of heavy
concrete columns with less reinforcement, since the cost of
steel is high
¾ But while considering the suboptimization of foundation
component, the cost becomes higher as the foundation should
be strong enough to carry these heavy columns
¾ Thus, the suboptimization of columns before considering the
suboptimization of foundation will adversely affect the overall
design
D Nagesh Kumar, IISc Optimization Methods: M5L1
13
Concept of SubOptimization …contd.
¾ In most of the serial systems suboptimization can start from the last
component (or first component) since it does not influence the other
components
¾ Thus, for the above problem, foundation can be suboptimized
independently
¾ Then, the last two components (columns and foundation) are
considered as a single component and suboptimization is done
without affecting other components
¾ This process can be repeated for any number of end components
D Nagesh Kumar, IISc Optimization Methods: M5L1
14
Process of suboptimization
Tank Columns Foundation
Original System
Tank Columns Foundation
Suboptimize design of
Foundation component
Tank Columns Foundation
Optimize complete system
Suboptimize design of
Foundation & Columns together
Tank Columns Foundation
D Nagesh Kumar, IISc Optimization Methods: M5L1
15
Principle of Optimality
¾ Belman stated the principle of optimality which
explains the process of multi stage optimization as:
¾ “An optimal policy (or a set of decisions) has the property that
whatever the initial state and initial decision are, the remaining
decisions must constitute an optimal policy with regard to the state
resulting from the first decision.”
D Nagesh Kumar, IISc Optimization Methods: M5L1
16
Thank You
Optimization Methods: Dynamic Programming – Recursive Equations 1
Module – 5 Lecture Notes – 2
Recursive Equations
Introduction
In the previous lecture, we have seen how to represent a multistage decision process and also
the concept of suboptimization. In order to solve this problem in sequence, we make use of
recursive equations. These equations are fundamental to the dynamic programming. In this
lecture, we will learn how to formulate recursive equations for a multistage decision process
in a backward manner and also in a forward manner.
Recursive equations
Recursive equations are used to structure a multistage decision problem as a sequential
process. Each recursive equation represents a stage at which a decision is required. In this, a
series of equations are successively solved, each equation depending on the output values of
the previous equations. Thus, through recursion, a multistage problem is solved by breaking it
into a number of single stage problems. A multistage problem can be approached in a
backward manner or in a forward manner.
Backward recursion
In this, the problem is solved by writing equations first for the final stage and then proceeding
backwards to the first stages. Consider the serial multistage problem discussed in the previous
lecture.
Stage 1 Stage t Stage T
S
t
NB
t
X
t
S
1
S
2
NB
1
NB
T
X
1
X
T
S
T
S
T+1
S
t+1
D Nagesh Kumar, IISc, Bangalore M5L2
Optimization Methods: Dynamic Programming – Recursive Equations 2
Suppose the objective function for this problem is
( )
( ) ( ) ( ) ( ) ( ) ) 1 ...( , , ... , ... , ,
,
1 1 1 2 2 2 1 1 1
1 1
T T T T T T t t t
T
t
T
t
t t t t
S X h S X h S X h S X h S X h
S X h NB f
+ + + + + + =
= =
− − −
= =
∑ ∑
and the relation between the stage variables and decision variables are gives as
S
t+1
= g(X
t
, S
t
), t = 1,2,…, T. …(2)
Consider the final stage as the first subproblem. The input variable to this stage is S
T
.
According to the principle of optimality, no matter what happens in other stages, the decision
variable X
T
should be selected such that ( )
T T T
S X h ,
∗
T
f
is optimum for the input S
T
. Let the
optimum value be denoted as . Then,
( ) [ ] ) 3 ...( , ) (
T T T
X
T T
S X h opt S f
T
=
∗
Next, group the last two stages together as the second subproblem. Let be the optimum
objective value of this subproblem. Then, we have
∗
−1 T
f
( ) ( ) [ ] ) 4 ...( , , ) (
1 1 1
,
1 1
1
T T T T T T
X X
T T
S X h S X h opt S f
T T
+ =
− − − −
∗
−
−
From the principle of optimality, the value of should be to optimize for a given .
For obtaining , we need and . Thus, can be written as,
T
X
T
h
T
S
T
S
1 − T
S
1 − T
X ) (
1 1 −
∗
− T T
S f
( ) [ ] ) 5 ...( ) ( , ) (
1 1 1 1 1
1
T T T T T
X
T T
S f S X h opt S f
T
∗
− − − −
∗
−
+ =
−
By using the stage transformation equation, can be rewritten as, ) (
1 1 −
∗
− T T
S f
( ) ( ) ( ) [ ] ) 6 ...( , , ) (
1 1 1 1 1 1 1 1
1
− − −
∗
− − − −
∗
−
+ =
−
T T T T T T T
X
T T
S X g f S X h opt S f
T
D Nagesh Kumar, IISc, Bangalore M5L2
Optimization Methods: Dynamic Programming – Recursive Equations 3
Thus, here the optimum is determined by choosing the decision variable for a given
input . Eqn (4) which is a multivariate problem (second sub problem) is divided into two
single variable problems as shown in eqns (3) and (6). In general, the i+1
1 − T
X
1 − T
S
th
subproblem (Ti
th
stage) can be expressed as,
( ) ( ) ( ) [ ] ) 7 ...( , , ... , ) (
1 1 1
, ,...,
1
T T T T T T i T i T i T
X X X
i T i T
S X h S X h S X h opt S f
T T i T
+ + + =
− − − − − − −
∗
−
− −
Converting this to a single variable problem,
( ) ( ) ( ) [ ] ) 8 ...( , , ) (
) 1 ( i T i T i T i T i T i T i T
X
i T i T
S X g f S X h opt S f
i T
− − −
∗
− − − − − −
∗
−
+ =
−
where denotes the optimal value of the objective function for the last i stages. Thus
for backward recursion, the principle of optimality can be stated as, no matter in what state of
stage one may be, in order for a policy to be optimal, one must proceed from that state and
stage in an optimal manner.
∗
− − ) 1 (i T
f
Forward recursion
In this approach, the problem is solved by starting from the stage 1 and proceeding towards
the last stage. Consider the serial multistage problem with the objective function as given
below
( )
T T
( ) ( ) ( ) ( ) ( ) ) 9 ...( , , ... , ... , ,
,
1 1 1 2 2 2 1 1 1
1 1
T T T T T T t t t
t t
t t t t
S X h S X h S X h S X h S X h
S X h NB f
+ + + + + + =
= =
− − −
= =
∑ ∑
and the relation between the stage variables and decision variables are gives as
( ) T t S X g S
t t t
,...., 2 , 1 ,
1 1
= ′ =
+ +
…(10)
where S
t
is the input available to the stages 1 to t.
Consider stage 1 as the first subproblem. The input variable to this stage is S
1
. The decision
variable X
1
should be selected such that ( ) S X h
1 1 1
, is optimum for the input S
1
.
D Nagesh Kumar, IISc, Bangalore M5L2
Optimization Methods: Dynamic Programming – Recursive Equations 4
The optimum value can be written as
∗
1
f
( ) [ ] ) 11 ...( , ) (
1 1 1 1 1
1
S X h opt S f
X
=
∗
Now, group the first and second stages together as the second subproblem. The objective
function for this subproblem can be expressed as,
∗
2
f
( ) ( ) [ ] ) 12 ...( , , ) (
1 1 1 2 2 2
,
2 2
1 2
S X h S X h opt S f
X X
+ =
∗
But for calculating the value of , we need and . Thus,
2
S
1
S
1
X
( ) [ ] ) 13 ...( ) ( , ) (
1 1 2 2 2 2 2
2
S f S X h opt S f
X
∗ ∗
+ =
By using the stage transformation equation, can be rewritten as, ) (
2 2
S f
∗
( ) ( ) ( ) [ ] ) 14 ...( , , ) (
2 2 2 1 2 2 2 2 2
2
S X g f S X h opt S f
X
′ + =
∗ ∗
Thus, here through the principle of optimality the dimensionality of the problem is reduced
from two to one. In general, the i
th
subproblem can be expressed as,
( ) ( ) ( ) [ ]
1 1 1 2 2 2
,..., ,
, , ... , ) (
2 1
S X h S X h S X h opt S f
i i i
X X X
i i
i
+ + + =
∗
…(15)
Converting this to a single variable problem,
( ) ( ) ( ) [ ]
i i i i i i i
X
i i
S X g f S X h opt S f
i
, , ) (
) 1 (
′ + =
∗
−
∗
…(16)
where denotes the optimal value of the objective function for the first i stages. The
principle of optimality for forward recursion is that no matter in what state of stage one may
be, in order for a policy to be optimal, one had to get to that state and stage in an optimal
manner.
∗
i
f
D Nagesh Kumar, IISc, Bangalore M5L2
D Nagesh Kumar, IISc Optimization Methods: M5L2
1
Dynamic Programming
Recursive Equations
D Nagesh Kumar, IISc Optimization Methods: M5L2
2
Introduction and Objectives
Introduction
¾ Recursive equations are used to solve a problem in sequence
¾ These equations are fundamental to the dynamic programming
Objectives
To formulate recursive equations for a multistage decision
process
In a backward manner and
In a forward manner
D Nagesh Kumar, IISc Optimization Methods: M5L2
3
Recursive Equations
¾ Recursive equations are used to structure a multistage decision
problem as a sequential process
¾ Each recursive equation represents a stage at which a decision
is required
¾ A series of equations are successively solved, each equation
depending on the output values of the previous equations
¾ A multistage problem is solved by breaking into a number of
single stage problems through recursion
¾ Approached can be done in a backward manner or in a forward
manner
D Nagesh Kumar, IISc Optimization Methods: M5L2
4
Backward Recursion
¾ A problem is solved by writing equations first for the final stage and
then proceeding backwards to the first stage
¾ Consider a serial multistage problem
¾ Let the objective function for this problem is
Stage 1 Stage t Stage T
S
t
NB
t
X
t
S
1
S
2
NB
1
NB
T
X
1
X
T
S
T
S
T+1
S
t+1
( )
( ) ( ) ( ) ( ) ( ) 1 ...( , , ... , ... , ,
,
1 1 1 2 2 2 1 1 1
1 1
T T T T T T t t t
T
t
T
t
t t t t
S X h S X h S X h S X h S X h
S X h NB f
+ + + + + + =
= =
− − −
= =
∑ ∑
D Nagesh Kumar, IISc Optimization Methods: M5L2
5
Backward Recursion …contd.
¾ The relation between the stage variables and decision variables are
S
t+1
= g(X
t
, S
t
), t = 1,2,…, T.
¾ Consider the final stage as the first subproblem. The input variable to
this stage is S
T
.
¾ Principle of optimality: X
T
should be selected such that is
optimum for the input S
T
¾ The objective function for this stage is
¾ Next, group the last two stages together as the second subproblem.
The objective function is
( )
T T T
S X h ,
∗
T
f
( ) [ ]
T T T
X
T T
S X h opt S f
T
, ) ( =
∗
( ) ( ) [ ]
T T T T T T
X X
T T
S X h S X h opt S f
T T
, , ) (
1 1 1
,
1 1
1
+ =
− − − −
∗
−
−
D Nagesh Kumar, IISc Optimization Methods: M5L2
6
Backward Recursion …contd.
¾ By using the stage transformation equation, can be rewritten
as
¾ Thus, a multivariate problem is divided into two single variable
problems as shown
¾ In general, the i+1
th
subproblem can be expressed as
¾ Converting this to a single variable problem
) (
1 1 −
∗
− T T
S f
( ) ( ) ( ) [ ]
1 1 1 1 1 1 1 1
, , ) (
1
− − −
∗
− − − −
∗
−
+ =
−
T T T T T T T
X
T T
S X g f S X h opt S f
T
( ) ( ) ( ) [ ]
T T T T T T i T i T i T
X X X
i T i T
S X h S X h S X h opt S f
T T i T
, , ... , ) (
1 1 1
, ,...,
1
+ + + =
− − − − − − −
∗
−
− −
( ) ( ) ( ) [ ]
i T i T i T i T i T i T i T
X
i T i T
S X g f S X h opt S f
i T
− − −
∗
− − − − − −
∗
−
+ =
−
, , ) (
) 1 (
D Nagesh Kumar, IISc Optimization Methods: M5L2
7
Backward Recursion …contd.
¾ denotes the optimal value of the objective function for
the last i stages
¾ Principle of optimality for backward recursion can be stated as,
¾ No matter in what state of stage one may be, in order
for a policy to be optimal, one must proceed from that
state and stage in an optimal manner sing the stage
transformation equation
∗
− − ) 1 (i T
f
D Nagesh Kumar, IISc Optimization Methods: M5L2
8
Forward Recursion
¾ The problem is solved by starting from the stage 1 and proceeding
towards the last stage
¾ Consider a serial multistage problem
¾ Let the objective function for this problem is
Stage 1 Stage t Stage T
S
t
NB
t
X
t
S
1
S
2
NB
1
NB
T
X
1
X
T
S
T
S
T+1
S
t+1
( )
( ) ( ) ( ) ( ) ( ) 1 ...( , , ... , ... , ,
,
1 1 1 2 2 2 1 1 1
1 1
T T T T T T t t t
T
t
T
t
t t t t
S X h S X h S X h S X h S X h
S X h NB f
+ + + + + + =
= =
− − −
= =
∑ ∑
D Nagesh Kumar, IISc Optimization Methods: M5L2
9
Forward Recursion …contd.
¾ The relation between the stage variables and decision variables are
where S
t
is the input available to the stages 1 to t
¾ Consider the stage 1 as the first subproblem. The input variable to
this stage is S
1
¾ Principle of optimality: X
1
should be selected such that is
optimum for the input S
1
¾ The objective function for this stage is
( ) T t S X g S
t t t
,...., 2 , 1 ,
1 1
=
′
=
+ +
( )
1 1 1
, S X h
∗
1
f
( ) [ ]
1 1 1 1 1
, ) (
1
S X h opt S f
X
=
∗
D Nagesh Kumar, IISc Optimization Methods: M5L2
10
Backward Recursion …contd.
¾ Group the first and second stages together as the second sub
problem. The objective function is
¾ By using the stage transformation equation, can be rewritten
as
¾ In general, the i
th
subproblem can be expressed as
( ) ( ) [ ]
1 1 1 2 2 2
,
2 2
, , ) (
1 2
S X h S X h opt S f
X X
+ =
∗
) (
2 2
S f
∗
( ) ( ) ( ) [ ]
2 2 2 1 2 2 2 2 2
, , ) (
2
S X g f S X h opt S f
X
′
+ =
∗ ∗
( ) ( ) ( ) [ ]
1 1 1 2 2 2
,..., ,
, , ... , ) (
2 1
S X h S X h S X h opt S f
i i i
X X X
i i
i
+ + + =
∗
D Nagesh Kumar, IISc Optimization Methods: M5L2
11
Backward Recursion …contd.
¾ Converting this to a single variable problem
¾ denotes the optimal value of the objective function for the
last i stages
¾ Principle of optimality for forward recursion can be stated as,
¾ No matter in what state of stage one may be, in order
for a policy to be optimal, one had to get to that state
and stage in an optimal manner
( ) ( ) ( ) [ ]
i i i i i i i
X
i i
S X g f S X h opt S f
i
, , ) (
) 1 (
′
+ =
∗
−
∗
∗
i
f
D Nagesh Kumar, IISc Optimization Methods: M5L2
12
Thank You
Optimization Methods: Dynamic Programming – Computational Procedure 1
Module – 5 Lecture Notes – 3
Computational Procedure in Dynamic Programming
Introduction
The construction of recursive equations for a multistage program was discussed in the
previous lecture. In this lecture, the procedure to solve those recursive equations for
backward recursion is discussed. The procedure for forward recursion is similar to that of
backward recursion.
Computational procedure
Consider the serial multistage problem and the recursive equations developed for backward
recursion discussed in the previous lecture.
The objective function for this problem is
( )
( ) ( ) ( ) ( ) ( ) ) 1 ...( , , ... , ... , ,
,
1 1 1 2 2 2 1 1 1
1 1
T T T T T T t t t
T
t
T
t
t t t t
S X h S X h S X h S X h S X h
S X h NB f
+ + + + + + =
= =
− − −
= =
∑ ∑
Considering first subproblem i.e., the last stage, the objective function is
( ) [ ] ) 2 ...( , ) (
T T T
X
T T
S X h opt S f
T
=
∗
NB
T
S
T
S
T+1
Stage T
X
T
The input variable to this stage is S
T
. The decision variable X
T
and the optimal value of the
objective function depend on the input S
∗
T
f
T
. At this stage, the value of S
T
is not known. S
T
can take a range of values depending upon the value taken by the upstream components. To
D Nagesh Kumar, IISc, Bangalore M5L3
Optimization Methods: Dynamic Programming – Computational Procedure 2
get a clear picture of the suboptimization at this stage, S
T
is solved for all possible range of
values and the results are entered in a graph or table. This table also contains the calculated
optimal values of , S
∗
T
X
∗
T
f
T+1
and also . A typical table showing the results from the
suboptimization of stage 1 is shown below.
Table 1
Sl no S
T
∗
T
X
∗
T
f
S
T+1
1    
    
    
Now, consider the second subproblem by grouping the last two components.
NB
T1
NB
T
S
T
S
T+1
Stage T Stage T1
S
T1
The objective function can be written as
X
T1
X
T
( ) ( ) [ ] ) 4 ...( , , ) (
1 T
S
− 1 1 1
,
1
1
T T T T T T
X X
T
S X h S X h opt f
T T
+ =
− − −
∗
−
−
As shown in the earlier lecture, can also be written as, ) (
1 1 −
∗
− T T
S f
( ) [ ] ) 5 ...( ) ( , ) (
1 1 1 1 1
1
T T T T T
X
T T
S f S X h opt S f
T
∗
− − − −
∗
−
+ =
−
Here also, a range of values are considered for S . All the information of first subproblem
can be obtained from Table 1. Thus, the optimal values of and are found for these
range of values. The results thus calculated can be shown in Table 2.
1 − T
∗
−1 T
X
∗
−1 T
f
D Nagesh Kumar, IISc, Bangalore M5L3
Optimization Methods: Dynamic Programming – Computational Procedure 3
Table 2
Sl no S
T1
∗
−1 T
X
S
T ) (
T T
S f
∗
∗
−1 T
f
1    
    
    
In general, if suboptimization of i+1
th
subproblem (Ti
th
stage) is to be done, then the
objective function can be written as
( ) ( ) ( ) [ ]
( ) [ ] ) 7 ...( ,
, , ... , ) (
) 1 (
1 1 1
, ,...,
1
∗
− − − − −
− − − − − − −
∗
−
+ =
+ + + =
−
− −
i T i T i T i T
X
T T T T T T i T i T i T
X X X
i T i T
f S X h opt
S X h S X h S X h opt S f
i T
T T i T
At this stage, the suboptimizaiton has been carried out for all last i components. The
information regarding the optimal values of i
th
subproblem will be available in the form of a
table. Substituting this information in the objective function and considering a range of
values, the optimal values of and can be calculated. The table showing the
suboptimization of i+1
i T
S
−
∗
−i T
f
∗
−i T
X
th
subproblem can be shown below.
Table 3
Sl no S
Ti
∗
−i T
X
S
T(i1) ) (
) 1 ( ) 1 ( − −
∗
− − i T i T
S f
∗
−i T
f
1    
    
    
D Nagesh Kumar, IISc, Bangalore M5L3
Optimization Methods: Dynamic Programming – Computational Procedure 4
This procedure is repeated until stage 1 is reached, i.e., T
th
subproblem.
Stage 1 Stage t Stage T
S
t
NB
t
X
t
S
1
S
2
NB
1
NB
T
X
1
X
T
S
T
S
T+1
S
t+1
Here, for initial value problems, only one value S
1
need to be analyzed.
After completing the suboptimization of all the stages, we need to retrace the steps through
the tables generated to find the optimal values of X. In order to do this, the T
th
subproblem
gives the values of and for a given value of S
∗
1
X
∗
1
f
∗
2
S
∗
2
X
∗
2
f
∗
2
S
∗
3
S
∗ ∗
T
X X ...., ,
2
1
(since the value of S
1
is known for an
initial value problem). Use the transformation equation S
2
= g(X
1
, S
1
), to calculate the value
of , which is the input to the 2
nd
stage ( T1
th
subproblem). Then, from the tabulated results
for the 2
nd
stage, the values of and are found out for the calculated value of .
Again use the transformation equation to find out and the process is repeated until the 1
st
subproblem or T
th
stage is reached. Finally, the optimum solution vector is given by
.
∗
X ,
1
D Nagesh Kumar, IISc, Bangalore M5L3
D Nagesh Kumar, IISc Optimization Methods: M5L3
1
Dynamic Programming
Computational
Procedure in Dynamic
Programming
D Nagesh Kumar, IISc Optimization Methods: M5L3
2
Objectives
To explain the computational procedure of solving
the multistage decision process using recursive
equations for backward approach
D Nagesh Kumar, IISc Optimization Methods: M5L3
3
Computational Procedure
Consider a serial multistage problem and the recursive
equations developed for backward recursion
The objective function is
Considering first subproblem (last stage),
the objective function is
( )
∑ ∑
= =
= =
T
t
T
t
t t t t
S X h NB f
1 1
,
( ) [ ]
T T T
X
T T
S X h opt S f
T
, ) ( =
∗
S
T
Stage T
NB
T
X
T
S
T+1
D Nagesh Kumar, IISc Optimization Methods: M5L3
4
Computational Procedure …contd.
The input variable is S
T
and the decision variable is X
T
Optimal value of the objective function depend on the input
S
T
But at this stage, the value of S
T
is not known
Value of S
T
depends upon the values taken by the upstream
components
Therefore, S
T
is solved for all possible range of values
The results are entered in a graph or table which contains the
calculated optimal values of , S
T+1
and also .
∗
T
f
∗
T
X
∗
T
f
D Nagesh Kumar, IISc Optimization Methods: M5L3
5
Computational Procedure …contd.
The results are entered in a graph or table which contains the
calculated optimal values of , S
T+1
and also
Typical table showing the results from the suboptimization of
stage 1
TABLE  1
∗
T
X
∗
T
f
D Nagesh Kumar, IISc Optimization Methods: M5L3
6
Computational Procedure …contd.
Consider the second subproblem by grouping the last two
components
The objective function is
( ) ( ) [ ]
T T T T T T
X X
T T
S X h S X h opt S f
T T
, , ) (
1 1 1
,
1 1
1
+ =
− − − −
∗
−
−
D Nagesh Kumar, IISc Optimization Methods: M5L3
7
Computational Procedure …contd.
From the earlier lecture,
The information of first subproblem is obtained from the previous
table
A range of values are considered for S
T1
The optimal values of and are found for these range of
values
( ) [ ] ) ( , ) (
1 1 1 1 1
1
T T T T T
X
T T
S f S X h opt S f
T
∗
− − − −
∗
−
+ =
−
∗
−1 T
X
∗
−1 T
f
D Nagesh Kumar, IISc Optimization Methods: M5L3
8
Computational Procedure …contd.
In general, consider the suboptimization of i+1
th
subproblem (Ti
th
stage)
The objective function can be written as
( ) ( ) ( ) [ ]
( ) [ ] ) 7 ...( ,
, , ... , ) (
) 1 (
1 1 1
, ,...,
1
∗
− − − − −
− − − − − − −
∗
−
+ =
+ + + =
−
− −
i T i T i T i T
X
T T T T T T i T i T i T
X X X
i T i T
f S X h opt
S X h S X h S X h opt S f
i T
T T i T
D Nagesh Kumar, IISc Optimization Methods: M5L3
9
Computational Procedure …contd.
At this stage, the suboptimization has been carried out for all
last i components
The information regarding the optimal values of i
th
subproblem
will be available in the form of a table
Substituting this information in the objective function and
considering a range of values, the optimal values of and
can be calculated
∗
−i T
f
∗
−i T
X
D Nagesh Kumar, IISc Optimization Methods: M5L3
10
Computational Procedure …contd.
The table showing the suboptimization of i+1
th
subproblem is shown
TABLE  2
This procedure is repeated until stage 1 is reached
For initial value problems, only one value S
1
need to be analyzed for
stage 1
D Nagesh Kumar, IISc Optimization Methods: M5L3
11
Computational Procedure …contd.
After completing the suboptimization of all the stages, retrace the
steps through the tables generated to find the optimal values of X
The T
th
subproblem gives the values of X
1
*
and f
1
*
for a given value of
S
1
(since the value of S
1
is known for an initial value problem)
Calculate the value of S
2
*
using the transformation equation
S
2
= g(X
1
, S
1
), which is the input to the 2
nd
stage ( T1
th
subproblem)
From the tabulated results for the 2
nd
stage, the values of X
2
*
and f
2
*
are
found out
Again use the transformation equation to find out S
3
*
and the process is
repeated until the 1
st
subproblem or T
th
stage is reached
The final optimum solution vector is given by
∗ ∗ ∗
T
X X X ...., , ,
2 1
D Nagesh Kumar, IISc Optimization Methods: M5L3
12
Thank You
Optimization Methods: Dynamic Programming – Other Topics 1
Module – 5 Lecture Notes – 4
Other Topics
Introduction
In the previous lectures we discussed about problems with a single state variable or input
variable S
t
which takes only some range of values. In this lecture, we will be discussing about
problems with state variable taking continuous values and also problems with multiple state
variables.
Discrete versus Continuous Dynamic Programming
In a dynamic programming problem, when the number of stages tends to infinity then it is
called a continuous dynamic programming problem. It is also called an infinitestage
problem. Continuous dynamic programming model is used to solve continuous decision
problems. The classical method of solving continuous decision problems is by the calculus of
variations. However, the analytical solutions, using calculus of variations, cannot be
generally obtained, except for very simple problems. The infinitestage dynamic
programming approach, on the other hand provides a very efficient numerical approximation
procedure for solving continuous decision problems.
The objective function of a conventional discrete dynamic programming model is the sum of
individual stage outputs. If the number of stages tends to infinity, then summation of the
outputs from individual stages can be replaced by integrals. Such models are useful when
infinite number of decisions have to be made in finite time interval.
Multiple State Variables
In the problems previously discussed, there was only one state variable S
t
. However there will
be problems in which one need to handle more than one state variable. For example, consider
a water allocation problem to n irrigated crops. Let S
i
be the units of water available to the
remaining ni crops. If we are concerned only about the allocation of water, then this problem
can be solved as a single state problem, with S
i
as the state variable. Now, assume that L units
of land are available for all these n crops. We want to allocate the land also to each crop after
D Nagesh Kumar, IISc, Bangalore M5L4
Optimization Methods: Dynamic Programming – Other Topics 2
considering the units of water required for each unit of irrigated land containing each crop.
Let R
i
be the amount of land available for ni crops. Here, an additional state variable R
i
is to
be included while suboptimizing different stages. Thus, in this problem two allocations need
to be made: water and land.
The figure below shows a single stage problem consisting of two state variables, S
1
& R
1
.
Net Benefit, NB
1
Input
S
1
& R
1
Output
S
2
& R
2
Stage 1
Decision variable, X
1
In general, for a multistage decision problem of T stages containing two state variables S
t
and
R
t
, the objective function can be written as
( )
∑ ∑
= =
= =
T
t
T
t
t t t t
R S X h NB f
1 1
, ,
where the transformation equations are given as
S
t+1
= g(X
t
, S
t
) for t =1,2,…, T
& R
t+1
= g’(X
t
, R
t
) for t =1,2,…, T
Curse of Dimensionality
Dynamic programming has a serious limitation due to dimensionality restriction. As the
number of variables and stages increase, the number of calculations needed increases rapidly
thereby increasing the computational effort. If the number of stage variables is increased,
then more combinations of discrete states should be examined at each stage. For a problem
D Nagesh Kumar, IISc, Bangalore M5L4
Optimization Methods: Dynamic Programming – Other Topics 3
consisting of 100 state variables and each variable having 100 discrete values, the
suboptimization table will contain 100
100
entries. The computation of this one table may take
100
96
seconds (about 100
92
years) even on a high speed computer. Like this 100 tables have
to be prepared, which explains the difficulty in analyzing such a big problem using dynamic
programming. This phenomenon is known as “curse of dimensionality” or “Problem of
dimensionality” of multiple state variable dynamic programming problems as termed by
Bellman.
References/ Further Reading:
1. Bellman, R., Dynamic Programming, Princeton University Press, Princeton, N.J, 1957.
2. Hillier F.S. and G.J. Lieberman, Operations Research, CBS Publishers & Distributors,
New Delhi, 1987.
3. Loucks, D.P., J.R. Stedinger, and D.A. Haith, Water Resources Systems Planning and
Analysis, PrenticeHall, N.J., 1981.
4. Rao S.S., Engineering Optimization – Theory and Practice, Third Edition, New Age
International Limited, New Delhi, 2000
5. Taha H.A., Operations Research – An Introduction, PrenticeHall of India Pvt. Ltd., New
Delhi, 2005.
6. Vedula S., and P.P. Mujumdar, Water Resources Systems: Modelling Techniques and
Analysis, Tata McGraw Hill, New Delhi, 2005.
D Nagesh Kumar, IISc, Bangalore M5L4
D Nagesh Kumar, IISc Optimization Methods: M5L4
1
Dynamic Programming
Other Topics
D Nagesh Kumar, IISc Optimization Methods: M5L4
2
Objectives
To explain the difference between discrete and
continuous dynamic programming
To discuss about multiple state variables
To discuss the curse of dimensionality in dynamic
programming
D Nagesh Kumar, IISc Optimization Methods: M5L4
3
Discrete versus Continuous Dynamic
Programming
Discrete dynamic programming problems: Number of
stages is finite
When the number of stages tends to infinity then it is
called a continuous dynamic programming problem
Also called as infinitestage problem
Continuous dynamic problems are used to solve
continuous decision problem
The classical method of solving continuous decision
problems is by the calculus of variations
D Nagesh Kumar, IISc Optimization Methods: M5L4
4
Discrete versus Continuous Dynamic Programming
…contd.
However, the analytical solutions, using calculus of variations is
applicable only for very simple problems
The infinitestage dynamic programming approach provides a
very efficient numerical approximation procedure for solving
continuous decision problems
For discrete dynamic programming model, the objective
function value is the sum of individual stage outputs
For a continuous dynamic programming model, summation is
replaced by integrals of the returns from individual stages
Such models are useful when infinite number of decisions have
to be made in finite time interval
D Nagesh Kumar, IISc Optimization Methods: M5L4
5
Multiple State Problems
Problems in which there are more than one state variable
For example, consider a water allocation problem to n irrigated
crops
Let S
i
be the units of water available to the remaining ni crops
Considering only the allocation of water, the problem can be
solved as a single state problem, with S
i
as the state variable
Now, assume that L units of land are available for all these n
crops
Allocation of land also to be done to each crop after considering
the units of water required for each unit of irrigated land
containing each crop
D Nagesh Kumar, IISc Optimization Methods: M5L4
6
Multiple State Problems …contd.
Let R
i
be the amount of land available for ni crops
An additional state variable R
i
is included while suboptimizing different
stages
Thus, in this problem two allocations need to be made: water and land.
A single stage problem consisting of two state variables, S
1
& R
1
is
shown below
Stage 1
Input
S
1
& R
1
Net Benefit, NB
1
Decision variable, X
1
Output
S
2
& R
2
D Nagesh Kumar, IISc Optimization Methods: M5L4
7
Multiple State Problems …contd.
In general, for a multistage decision problem of T stages,
containing two state variables S
t
and R
t
, the objective function
can be written as
where the transformation equations are given as
S
t+1
= g(X
t
, S
t
) for t =1,2,…, T &
R
t+1
= g’(X
t
, R
t
) for t =1,2,…, T
( )
∑ ∑
= =
= =
T
t
T
t
t t t t
R S X h NB f
1 1
, ,
D Nagesh Kumar, IISc Optimization Methods: M5L4
8
Curse of Dimensionality
Limitation of dynamic programming: Dimensionality restriction
The number of calculations needed increases rapidly as the
number of variables and stages increase
Increases the computational effort
Increase in the number of stage variables causes an increase
in the number of combinations of discrete states to be
examined at each stage
For a problem consisting of 100 state variables and each
variable having 100 discrete values, the suboptimization table
will contain 100
100
entries
D Nagesh Kumar, IISc Optimization Methods: M5L4
9
Curse of Dimensionality …contd.
The computation of one table may take 100
96
seconds (about
100
92
years) even on a high speed computer
Like this 100 tables have to be prepared for which computation
is almost impossible
This phenomenon as termed by Bellman, is known as “curse of
dimensionality” or “Problem of dimensionality” of multiple state
variable dynamic programming problems
D Nagesh Kumar, IISc Optimization Methods: M5L4
10
Thank You
Optimization Methods: Dynamic Programming Applications  Learning Objectives
Module 6: Dynamic Programming Applications
Learning Objectives
The basic concepts of dynamic programming like concept of suboptimization and principle
of optimality were discussed in module 5. The formulation of recursive equations for a
general problem and computational procedure was also discussed. In this module, the
application of these concepts in some common fields are discussed.
The module demonstrates the applications of dynamic programming in the fields of structural
engineering and water resources engineering. The problems discussed are design of
continuous beams, geometric layout of truss, water allocation, capacity expansion and
reservoir operation.
At the end of the module the reader will be able to
1. Formulate the dynamic programming problem.
2. Formulate the optimal design of continuous beams.
3. Formulate the optimal geometric layout of a truss.
4. Formulate and solve water allocation problem as a sequential process.
5. Formulate and solve capacity expansion problem.
6. Formulate and find steady state operating policies for a reservoir.
D Nagesh Kumar, IISc, Bangalore M6LO
Optimization Methods: Dynamic Programming Applications – Design of Continuous
Beam
1
Module – 6 Lecture Notes – 1
Design of Continuous Beam
Introduction
In the previous lectures, the development of recursive equations and computational procedure
were discussed. The application of this theory in practical situations is discussed here. In this
lecture, the design of continuous beam and its formulation to apply dynamic programming is
discussed.
Design of continuous beam
Consider a continuous beam having n spans with a set of loadings W
1
, W
2
,…, W
n
at the center
of each span as shown in the figure.
W
1
0
L
1
W
2
1
L
2
2
W
i
i1
L
i
W
i+1
i
L
i+1
i+1
W
n
n1
L
n
n
The beam rests on n+1 rigid supports. The locations of the supports are assumed to be
known. The objective function of the problem is to minimize the sum of the cost of
construction of all spans.
It is assumed that simple plastic theory of beams is applicable. Let the reactant support
moments be represented as m
1
, m
2
, …, m
n
. Once these support moments are known, the
complete bending moment distribution can be determined. The plastic limit moment for each
span and also the cross section of the span can be designed using these support moments.
The bending moment at the center of the i
th
span is W
i
L
i
/4. Therefore, the largest bending
moment in the i
th
span can be computed as
D Nagesh Kumar, IISc, Bangalore M6L1
Optimization Methods: Dynamic Programming Applications – Design of Continuous
Beam
2
n i for
L W m m
m m M
i i i i
i i i
,... 2 , 1
4 2
, , max
1
1
=
⎭
⎬
⎫
⎩
⎨
⎧
−
+
=
−
−
For a beam of uniform cross section in each span, the limit moment m_lim
i
for the i
th
span
should be greater than or equal to M
i
. The cross section of the beam should be selected in
such a way that it has the required limit moment. Since the cost of the beam depends on the
cross section, which in turn depends on the limit moment, cost of the beam can be expressed
as a function of the limit moments.
If represents the sum of the cost of construction of all spans of the beam where X
represents the vector of limit moments
∑
=
n
i
i
X C
1
) (
⎪
⎪
⎭
⎪
⎪
⎬
⎫
⎪
⎪
⎩
⎪
⎪
⎨
⎧
=
n
m
m
m
X
lim _
lim _
lim _
2
1
M
then, the optimization problem is to find X so that
∑
is minimized while satisfying
the constraints
=
n
i
i
X C
1
) (
n i for M m
i i
..., , 2 , 1 lim _ = ≥ .
This problem has a serial structure and can be solved using dynamic programming.
D Nagesh Kumar, IISc, Bangalore M6L1
D Nagesh Kumar, IISc Optimization Methods: M6L1
1
Dynamic Programming
Applications
Design of
Continuous Beam
D Nagesh Kumar, IISc Optimization Methods: M6L1
2
Objectives
¾ To discuss the design of continuous beams
¾ To formulate the optimization problem as a dynamic
programming model
D Nagesh Kumar, IISc Optimization Methods: M6L1
3
Design of Continuous Beam
¾ Consider a continuous beam having n spans with a set of
loadings W
1
, W
2
,…, W
n
¾ Beam rests on n+1 rigid supports
¾ Locations of the supports are assumed to be known
W
1
0
L
1
W
2
1
L
2
2
W
i
i1
L
i
W
i+1
i
L
i+1
i+1
W
n
n1
L
n
n
D Nagesh Kumar, IISc Optimization Methods: M6L1
4
Design of Continuous Beam …contd.
¾ Objective function: To minimize the sum of the cost of
construction of all spans
¾ Assumption: Simple plastic theory of beams is applicable
¾ Let the reactant support moments be represented as m
1
, m
2
,
…, m
n
¾ Complete bending moment distribution can be determined once
these support moments are known
¾ Plastic limit moment for each span and also the cross section of
the span can be designed using these support moments
D Nagesh Kumar, IISc Optimization Methods: M6L1
5
Design of Continuous Beam …contd.
¾ Bending moment at the center of the i
th
span is W
i
L
i
/4
¾ Thus, the largest bending moment in the i
th
span can be
computed as
¾ Limit moment for the i
th
span, m_lim
i
should be greater than or
equal to M
i
for a beam of uniform cross section
¾ Thus, the cross section of the beam should be selected such
that it has the required limit moment
n i for
L W m m
m m M
i i i i
i i i
,... 2 , 1
4 2
, , max
1
1
=
⎭
⎬
⎫
⎩
⎨
⎧
−
+
=
−
−
D Nagesh Kumar, IISc Optimization Methods: M6L1
6
Design of Continuous Beam …contd.
¾ The cost of the beam depends on the cross section
¾ And cross section in turn depends on the limit moment
¾ Thus, cost of the beam can be expressed as a function of the
limit moments
¾ Let X represents the vector of limit moments
⎪
⎪
⎭
⎪
⎪
⎬
⎫
⎪
⎪
⎩
⎪
⎪
⎨
⎧
=
n
m
m
m
X
lim _
lim _
lim _
2
1
Μ
D Nagesh Kumar, IISc Optimization Methods: M6L1
7
Design of Continuous Beam …contd.
¾ The sum of the cost of construction of all spans of the beam is
¾ Then, the optimization problem is to find X to
Minimize
satisfying the constraints .
¾ This problem has a serial structure and can be solved using dynamic
programming
∑
=
n
i
i
X C
1
) (
∑
=
n
i
i
X C
1
) (
n i for M m
i i
..., , 2 , 1 lim _ = ≥
D Nagesh Kumar, IISc Optimization Methods: M6L1
8
Thank You
Optimization Methods: Dynamic Programming Applications – Optimum Geometric
Layout of Truss
1
Module – 6 Lecture Notes – 2
Optimum Geometric Layout of Truss
Introduction
In this lecture, the optimal design of elastic trusses is discussed from a dynamic programming
point of view. Emphasis is given on minimizing the cost of statically determinate trusses
when the crosssectional areas of the bars are available.
Optimum geometric layout of truss
Consider a planar, pin jointed cantilever multi bayed truss. Assume the length of the bays to
be unity. The truss is symmetric to the x axis. The geometry or layout of the truss is defined
by the y coordinates (y
1
, y
2
, …, y
n
). The truss is subjected to a unit load W
1
. The details are
shown in the figure below.
h
1
h
2
h
3
W
1
=1
y
1
y
2
y
3
y
4
x
1
1
1
Consider a particular bay i. Assume the truss is statically determinate. Thus, the forces in the
bars of bay i depend only on the coordinates y
i1
and y
i
and not on any other coordinates. The
D Nagesh Kumar, IISc, Bangalore M6L2
Optimization Methods: Dynamic Programming Applications – Optimum Geometric
Layout of Truss
2
cross sectional area of a bar can be determined, once the length and force in it are known.
Thus, the cost of the bar can in turn be determined.
The optimization problem is to find the geometry of the truss which will minimize the total
cost from all the bars. For the three bay truss shown above, the relation between y coordinates
can be expressed as
y
i+1
= y
i
+ d
i
for i = 1,2,3
This is an initial value problem since the value y
1
is already known. Let the y coordinate of
each node is limited to a finite number of values say 0.25, 0.5, 0.75 and 1. Then, as shown in
the figure below, there will be 64 different possible ways to reach y
4
from y
1.
y
1
y
4
y
3
y
2
0.25
0.50
0.75
1.00
This can be represented as a serial multistage initial value decision problem and can be
solved using dynamic programming.
D Nagesh Kumar, IISc, Bangalore M6L2
D Nagesh Kumar, IISc Optimization Methods: M6L2
1
Dynamic Programming
Applications
Optimum Geometric
Layout of Truss
D Nagesh Kumar, IISc Optimization Methods: M6L2
2
Objectives
¾ To discuss the design of elastic trusses
¾ To formulate the optimization problem as a
dynamic programming model
D Nagesh Kumar, IISc Optimization Methods: M6L2
3
Optimum Geometric Layout of Truss
¾ Consider a planar, pin jointed cantilever multi bayed truss
¾ Assume the length of the bays to be unity
¾ The truss is symmetric to the x axis
¾ Geometry or layout of the truss is defined by the y coordinates
(y
1
, y
2
, …, y
n
)
¾ Truss is subjected to a unit load W
1
D Nagesh Kumar, IISc Optimization Methods: M6L2
4
Optimum Geometric Layout of Truss
…contd.
h
1
h
2
h
3
W
1
=1
y
1
y
2
y
3
y
4
x
1 1 1
D Nagesh Kumar, IISc Optimization Methods: M6L2
5
Optimum Geometric Layout of Truss
…contd.
¾ Consider a particular bay I
¾ Assume the truss is statically determinate
¾ Forces in the bars of bay i depend only the coordinates y
i1
and
y
i
¾ Cross sectional area of a bar can be determined, once the
length and force in it are known
¾ Cost of the bar can thus be determined.
D Nagesh Kumar, IISc Optimization Methods: M6L2
6
Optimum Geometric Layout of Truss
…contd.
¾ The optimization problem is to find the geometry of the truss
which will minimize the total cost from all the bars
¾ For the three bay truss, the relation between y coordinates can
be expressed as
y
i+1
= y
i
+ d
i
for i = 1,2,3
¾ This is an initial value problem since the value y
1
is known
D Nagesh Kumar, IISc Optimization Methods: M6L2
7
Optimum Geometric Layout of Truss
…contd.
¾ Let the y
coordinate of each
node is limited to a
finite number of
values say 0.25,
0.5, 0.75 and 1
y
1
y
4
y
3
y
2
0.25
0.50
0.75
1.00
D Nagesh Kumar, IISc Optimization Methods: M6L2
8
Optimum Geometric Layout of Truss
…contd.
¾ As shown in the figure, there will be 64 different possible ways
to reach y
4
from y
1
¾ This can be represented as a serial multistage initial value
decision problem and can be solved using dynamic
programming
D Nagesh Kumar, IISc Optimization Methods: M6L2
9
Thank You
Optimization Methods: Dynamic Programming Applications – Water Allocation 1
Module – 6 Lecture Notes – 3
Water Allocation as a Sequential Process – Recursive Equations
Introduction
As discussed in previous lecture notes, in dynamic programming, a problem is handled as a
sequential process or a multistage decision making process. In this lecture, we will explain
how a water allocation problem can be represented as sequential process and can be solved
using backward recursion method of dynamic programming.
Water allocation problem
Consider a canal supplying water to three fields in which three different crops are being
cultivated. The maximum capacity of the canal is given as Q units of water. The three fields
can be denoted as i=1,2,3 and the amount of water allocated to each field as x
i
.
Field 1
Field 2
Field 3
x
1
x
3
x
2
The net benefits from producing the crops in each field are given by the functions below.
2
3 3 3 3
2
2 2 2 2
2
1 1 1 1
7 ) (
5 . 1 8 ) (
5 . 0 5 ) (
x x x NB
x x x NB
x x x NB
− =
− =
− =
D Nagesh Kumar, IISc, Bangalore M6L3
Optimization Methods: Dynamic Programming Applications – Water Allocation 2
The problem is to determine the optimal allocations x
i
to each field that maximizes the total
net benefits from all the three crops. This type of problem is readily solvable using dynamic
programming.
The first step in the dynamic programming is to structure this problem as a sequential
allocation process or a multistage decision making procedure. The allocation to each crop is
considered as a decision stage in a sequence of decisions. If the amount of water allocated
from the total available water Q, to crop i is x
i
, then the net benefit from this allocation is
NB
i
(x
i
). Let the state variable S
i
defines the amount of water available to the remaining (3i)
crops. The state transformation equation can be written as
i i i
x S S = −
+1
3
defines the state in
the next stage. The figure below shows the allocation problem as a sequential process.
Available
Quantity,
S
1
= Q
Crop 1 Crop 2 Crop 3
x
1
x
2
x
3
S
2
= S
1
 x
1
S
3
= S
2
 x
2
Net Benefits,
NB
1
(x
1
)
Net Benefits,
NB
2
(x
2
)
Net Benefits,
NB
3
(x
3
)
Remaining
Quantity,
S
4
= S
3
 x
3
The objective function for this allocation problem is defined to maximize the net benefits,
i.e., . The constraints can be written as
∑
=1
) ( max
i
i i
x NB
3 , 2 , 1 0
3 2 1
= ≤ ≤
≤ + +
i for Q x
Q x x x
i
D Nagesh Kumar, IISc, Bangalore M6L3
Optimization Methods: Dynamic Programming Applications – Water Allocation 3
Let be the maximum net benefits that can be obtained from allocating water to crops
1,2 and 3. Thus,
) (
1
Q f
⎥
⎦
⎤
⎢
⎣
⎡
=
∑
=
≥
≤ + +
3
1
0 , ,
1
) ( max ) (
3 2 1
3 2 1
i
i i
x x x
Q x x x
x NB Q f
Transforming this into three problems each having only one decision variable,
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
⎪
⎭
⎪
⎬
⎫
⎪
⎩
⎪
⎨
⎧
+ + =
= − ≤ ≤ = − ≤ ≤ ≤ ≤
) ( max ) ( max ) ( max ) (
3 3
0
2 2
0
1 1
0
1
3 2 2 3
3
2 1 2
2
1
1
x NB x NB x NB Q f
S x S x
x
S x Q x
x
Q x
x
Backward recursive equations
Considering the last term of this equation, let be the maximum net benefits from crop
3. The state variable for this stage is which can vary from 0 to Q. Therefore,
) (
3 3
S f
3
S
) (
2 2
S f
) ( max ) (
3 3
0
3 3
3 3
3
x NB S f
S x
x
≤ ≤
=
Since , . Thus can be rewritten as
2 2 3
x S S − = ) ( ) (
2 2 3 3 3
x S f S f − = ) (
1
Q f
{ }
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
− + + =
= − ≤ ≤ ≤ ≤
) ( ) ( max ) ( max ) (
2 2 3 2 2
0
1 1
0
1
2 1 2
2
1
1
x S f x NB x NB Q f
S x Q x
x
Q x
x
Now, let be the maximum benefits derived from crops 2 and 3 for a given quantity
which can vary between 0 and Q. Therefore can be written as,
) (
2 2
S f
2
S
{ } ) ( ) ( max ) (
2 2 3 2 2
0
2 2
2 1 2
2
x S f x NB S f
S x Q x
x
− + =
= − ≤ ≤
Again, since , which is the maximum total net benefit from the allocation to
the crops 1, 2 and 3, can be rewritten as
1 2
x Q S − = ) (
1
Q f
D Nagesh Kumar, IISc, Bangalore M6L3
Optimization Methods: Dynamic Programming Applications – Water Allocation 4
[ ] ) ( ) ( max ) (
1 2 1 1
0
1
1
1
x Q f x NB Q f
Q x
x
− + =
≤ ≤
Now, once the value of is calculated, the value of can be determined, from
which can be determined.
) (
3 3
S f ) (
2 2
S f
) (
1
Q f
Forward recursive equations
The procedure explained above can also be solved using a forward proceeding manner. Let
the function be the total net benefit from crops 1 to i for a given input of which is
allocated to those crops. Considering the first stage alone,
) (
i i
S f
i
S
2
S ) (
2 2
S f
) ( max ) (
1 1 1 1
1 1
1
x NB S f
S x
x
≤
=
Since, the value of is not known (excepting that should not exceed Q), the equation
above has to be solved for a range of values from 0 to Q. Now, considering the first two crops
together, with units of water available to these crops, can be written as,
1
S
1
S
[ ] ) ( ) ( max ) (
2 2 1 2 2 2 2
2 2
2
x S f x NB S f
S x
x
− + =
≤
This equation also should be solved for a range of values for from 0 to Q. Finally,
considering the whole system i.e., crops 1, 2 and 3, can be expressed as,
2
S
) (
3 3
S f
) (
3 3
S f
[ ] ) ( ) ( max ) (
3 3 2 3 3 3 3
3 3
3
x S f x NB S f
Q S x
x
− + =
= ≤
Here, if it is given that the whole Q units of water should be allocated, then the value of
can be taken as equal to Q. Otherwise, should be solved for a range of values from 0 to
Q.
3
S
D Nagesh Kumar, IISc, Bangalore M6L3
Optimization Methods: Dynamic Programming Applications – Water Allocation 5
The basic equations for the water allocation problem using both the approaches are discussed.
A numerical problem and its solution will be described in the next lecture.
D Nagesh Kumar, IISc, Bangalore M6L3
D Nagesh Kumar, IISc Optimization Methods: M6L3
1
Dynamic Programming
Applications
Water Allocation
D Nagesh Kumar, IISc Optimization Methods: M6L3
2
Introduction and Objectives
¾ Dynamic Programming : Sequential or multistage
decision making process
¾ Water Allocation problem is solved as a sequential
process using dynamic programming
Objectives
To discuss the Water Allocation Problem
To explain and develop recursive equations for
backward approach
To explain and develop recursive equations for
forward approach
D Nagesh Kumar, IISc Optimization Methods: M6L3
3
Water Allocation Problem
z Consider a canal supplying water for three different
crops
z Maximum capacity of the canal is Q units of water.
z Amount of water allocated to each field as x
i
Field 1
Field 2
Field 3
x
1
x
3
x
2
D Nagesh Kumar, IISc Optimization Methods: M6L3
4
Water Allocation Problem …contd.
z Net benefits from producing the crops can be expressed as a
function of the water allotted.
z Optimization Problem: Determine the optimal allocations x
i
to
each crop that maximizes the total net benefits from all the
three crops
2
3 3 3 3
2
2 2 2 2
2
1 1 1 1
7 ) (
5 . 1 8 ) (
5 . 0 5 ) (
x x x NB
x x x NB
x x x NB
− =
− =
− =
D Nagesh Kumar, IISc Optimization Methods: M6L3
5
Solution using Dynamic Programming
¾ Structure the problem as a sequential allocation process or a
multistage decision making procedure.
¾ Allocation to each crop is considered as a decision stage in a
sequence of decisions.
¾ Amount of water allocated to crop i is x
i
¾ Net benefit from this allocation is NB
i
(x
i
)
¾ Introduce one state variable S
i
: Amount of water available to the
remaining (3i) crops
¾ State transformation equation can be written as
defines the state in the next stage
i i i
x S S − =
+1
D Nagesh Kumar, IISc Optimization Methods: M6L3
6
Sequential Allocation Process
The allocation problem is shown as a sequential process
D Nagesh Kumar, IISc Optimization Methods: M6L3
7
Backward Recursive Equations
Objective function: To maximize the net benefits
Subjected to the constraints
Let be the maximum net benefits that can be obtained
from allocating water to crops 1,2 and 3
∑
=
3
1
) ( max
i
i i
x NB
3 , 2 , 1 0
3 2 1
= ≤ ≤
≤ + +
i for Q x
Q x x x
i
) (
1
Q f
⎥
⎦
⎤
⎢
⎣
⎡
=
∑
=
≥
≤ + +
3
1
0 , ,
1
) ( max ) (
3 2 1
3 2 1
i
i i
x x x
Q x x x
x NB Q f
D Nagesh Kumar, IISc Optimization Methods: M6L3
8
Backward Recursive Equations …contd.
Transforming this into three problems each having only one
decision variable
Now starting from the last stage, let be the maximum
net benefits from crop 3.
State variable for this stage can vary from 0 to Q
Thus,
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
⎪
⎭
⎪
⎬
⎫
⎪
⎩
⎪
⎨
⎧
+ + =
= − ≤ ≤ = − ≤ ≤ ≤ ≤
) ( max ) ( max ) ( max ) (
3 3
0
2 2
0
1 1
0
1
3 2 2 3
3
2 1 2
2
1
1
x NB x NB x NB Q f
S x S x
x
S x Q x
x
Q x
x
) (
3 3
S f
3
S
) ( max ) (
3 3
0
3 3
3 3
3
x NB S f
S x
x
≤ ≤
=
D Nagesh Kumar, IISc Optimization Methods: M6L3
9
Backward Recursive Equations …contd.
But . Therefore
Hence,
Now, let be the maximum benefits derived from crops 2 and
3 for a given quantity which can vary between 0 and Q
Therefore,
2 2 3
x S S − =
) ( ) (
2 2 3 3 3
x S f S f − =
{ }
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
− + + =
= − ≤ ≤ ≤ ≤
) ( ) ( max ) ( max ) (
2 2 3 2 2
0
1 1
0
1
2 1 2
2
1
1
x S f x NB x NB Q f
S x Q x
x
Q x
x
) (
2 2
S f
2
S
{ } ) ( ) ( max ) (
2 2 3 2 2
0
2 2
2 1 2
2
x S f x NB S f
S x Q x
x
− + =
= − ≤ ≤
D Nagesh Kumar, IISc Optimization Methods: M6L3
10
Backward Recursive Equations …contd.
Now since , can be rewritten as
Once the value of is calculated, the value of can
be determined, from which can be determined.
1 2
x Q S − = ) (
1
Q f
[ ] ) ( ) ( max ) (
1 2 1 1
0
1
1
1
x Q f x NB Q f
Q x
x
− + =
≤ ≤
) (
3 3
S f
) (
2 2
S f
) (
1
Q f
D Nagesh Kumar, IISc Optimization Methods: M6L3
11
Forward Recursive Equations
Let the function be the total net benefit from crops 1 to i for
a given input of which is allocated to those crops.
Considering the first stage,
Solve this equation for a range of values from 0 to Q
Considering the first two crops, for an available quantity of ,
can be written as
) (
i i
S f
i
S
) ( max ) (
1 1 1 1
1 1
1
x NB S f
S x
x
≤
=
1
S
2
S
) (
2 2
S f
[ ] ) ( ) ( max ) (
2 2 1 2 2 2 2
2 2
2
x S f x NB S f
S x
x
− + =
≤
D Nagesh Kumar, IISc Optimization Methods: M6L3
12
Forward Recursive Equations …contd.
ranges from 0 to Q
Considering the whole system, can be expressed as,
If the whole Q units of water should be allocated then the
value of can be taken as equal to Q
Otherwise, will take a range of values from 0 to Q
) (
3 3
S f
[ ] ) ( ) ( max ) (
3 3 2 3 3 3 3
3 3
3
x S f x NB S f
Q S x
x
− + =
= ≤
2
S
3
S
3
S
D Nagesh Kumar, IISc Optimization Methods: M6L3
13
Conclusion
The basic equations for the water allocation problem using both the
approaches are discussed
A numerical problem and its solution will be described in the next
lecture
D Nagesh Kumar, IISc Optimization Methods: M6L3
14
Thank You
Optimization Methods: Dynamic Programming Applications – Water Allocation 1
Module  6 Lecture Notes – 4
Water Allocation as a Sequential Process – Numerical Example
Introduction
In the previous lecture, recursive equations for a basic water allocation problem were
developed for both backward recursion and forward recursion. This lecture will further
explain the water allocation problem by a numerical example.
Numerical problem and solution
Consider the example previously discussed with the maximum capacity of the canal as 4
units. The net benefits from producing the crops for each field are given by the functions
below.
2
3 3 3 3
2
2 2 2 2
2
1 1 1 1
7 ) (
5 . 1 8 ) (
5 . 0 5 ) (
x x x NB
x x x NB
x x x NB
− =
− =
− =
The possible net benefits from each crop are calculated according to the functions given and
are given below.
Table 1
i
x ) (
1 1
x NB ) (
2 2
x NB ) (
3 3
x NB
0 0.0 0.0 0.0
1 4.5 6.5 6.0
2 8.0 10.0 10.0
3 10.5 10.5 12.0
4 12.0 8.0 12.0
The problem can be represented as a set of nodes and links as shown in the figure below. The
nodes represent the state variables and the links represent the decision variables.
D Nagesh Kumar, IISc, Bangalore M6L4
Optimization Methods: Dynamic Programming Applications – Water Allocation 2
4
x
1
x
2
x
3
4
3
2
1
0
4
3
2
1
0
0
1
2
3
4
0
1
0
1
2
4
3
2
1
0
0
1
0
1
2
Crop 1
Crop 2
Crop 3
The values inside the nodes show the value of possible state variables at each stage. Number
of nodes for any stage corresponds to the number of discrete states possible for each stage.
The values over the links show the different values taken by decision variables corresponding
to the value taken by state variables. It may be noted that link values for all links are not
shown in the above figure.
Solution using Backward Recursion:
Starting from the last stage, the suboptimization function for the 3
rd
crop is given as,
) ( max ) (
3 3
0
3 3
3 3
3
x NB S f
S x
x
≤ ≤
= with the range of from 0 to 4.
3
S
D Nagesh Kumar, IISc, Bangalore M6L4
Optimization Methods: Dynamic Programming Applications – Water Allocation 3
The calculations for this stage are shown in the table below.
Table 2
) (
3 3
x NB
State
3
S
3
x :
0 1 2 3 4
) (
3 3
S f
∗
3
x
0 0 0 0
1 0 6 6 1
2 0 6 10 10 2
3 0 6 10 12 12 3
4 0 6 10 12 12 12 3,4
Next, by considering last two stages together, the suboptimization function is
[ ) ( ) ( max ) (
2 2 1 2 2 2 2
2 2
2
x S f x NB S f
S x
x
− ] + =
≤
. This is solved for a range of values from 0 to 4.
The value of is noted from the previous table. The calculations are shown below.
2
S
) (
2 2 3
x S f −
Table 3
State
2
S
2
x ) (
2 2
x NB ) (
2 2
x S − ) (
2 2 3
x S f −
) (
) (
) (
2 2 3
2 2
2 2
x S f
x NB
S f
−
+
=
) (
2 2
S f
∗
∗
2
x
0 0 0 0 0 0 0 0
0 0 1 6 6
1
1 6.5 0 0 6.5
6.5 1
0 0 2 10 10
1 6.5 1 6 12.5 2
2 10 0 0 10
12.5 1
0 0 3 12 12
1 6.5 2 10 16.5
3
2 10 1 6 16
16.5 1
D Nagesh Kumar, IISc, Bangalore M6L4
Optimization Methods: Dynamic Programming Applications – Water Allocation 4
3 10.5 0 0 10.5
Table contd. on next page
0 0 4 12 12
1 6.5 3 12 18.5
2 10 2 10 20
3 10.5 1 6 16.5
4
4 8 0 0 8
20 2
Finally, by considering all the three stages together, the suboptimization function is
[ ] ) ( ) ( max ) (
1 2 1 1
0
1
1
1
x Q f x NB Q f
Q x
x
− + =
≤ ≤
. The value of 4
1
= = Q S . The calculations are shown in
the table below.
Table 4
State
Q S =
1
1
x ) (
1 1
x NB ) (
1
x Q− ) (
1 2
x Q f −
) (
) (
) (
1 2
1 1
1 1
x Q f
x NB
S f
−
+
=
) (
1 1
S f
∗
∗
1
x
0 0 4 20 20
1 4.5 3 16.5 21
2 8 2 12.5 20.5
3 10.5 1 6.5 17
4
4 12 0 0 12
21 1
Now, backtracking through each table to find the optimal values of decision variables, the
optimal allocation for crop 1, = 1 for a value of 4. This will give the value of
as S . From Table 3, the optimal allocation for crop 2, for is 1. Again,
. Thus, from Table 2 is 2. The maximum total net benefit from all the
crops is 21. The optimal solution is given below
∗
x S S
3
1 1 2
= − = x S
2
x 3
2
= S
S *
3
x
1 1 2
2
2 2 3
= − = x S
D Nagesh Kumar, IISc, Bangalore M6L4
Optimization Methods: Dynamic Programming Applications – Water Allocation 5
2
1
1
21
3
2
1
=
=
=
=
∗
∗
∗
∗
x
x
x
f
Solution using Forward Recursion:
While starting to solve from the first stage and proceeding towards the final stage, the
suboptimization function for the first stage is given as,
) ( max ) (
1 1 1 1
1 1
1
x NB S f
S x
x
≤
= . The range of values for is from 0 to 4.
1
S
Table 5
State
1
S
1
x ) (
1 1
x NB
) (
2 2
S f
∗
∗
1
x
0 0 0 0 0
0 0
1
1 4.5
4.5 1
0 0
1 4.5 2
2 8
8 2
0 0
1 4.5
2 8
3
3 10.5
10.5 3
0 0
1 4.5
2 8
3 10.5
4
4 12
12 4
D Nagesh Kumar, IISc, Bangalore M6L4
Optimization Methods: Dynamic Programming Applications – Water Allocation 6
Now, considering the first two crops together, can be written as, ) (
2 2
S f
[ ) ( ) ( max ) (
2 2 1 2 2 2 2
2 2
2
x S f x NB S f
S x
x
− ] + =
≤
with ranging from 0 to 4. The calculations for this
stage are shown below.
2
S
Table 6
State
2
S
2
x ) (
2 2
x NB ) (
2 2
x S − ) (
2 2 1
x S f −
) (
) (
) (
2 2 2
2 2
2 2
x S f
x NB
S f
−
+
=
) (
2 2
S f
∗
∗
2
x
0 0 0 0 0 0 0 0
0 0 1 4.5 4.5
1
1 6.5 0 0 6.5
6.5 1
0 0 2 8 8
1 6.5 1 4.5 11 2
2 10 0 0 10
11 1
0 0 3 10.5 10.5
1 6.5 2 8 14.5
2 10 1 4.5 14.5
3
3 10.5 0 0 10.5
14.5 1,2
0 0 4 12 12
1 6.5 3 10.5 17
2 10 2 8 18
3 10.5 1 4.5 15
4
4 8 0 0 8
18 2
Now, considering the whole system i.e., crops 1, 2 and 3, can be expressed as, ) (
3 3
S f
[ ] ) ( ) ( max ) (
3 3 2 3 3 3 3
3 3
3
x S f x NB S f
Q S x
x
− + =
= ≤
with the value of 4
3
= S .
D Nagesh Kumar, IISc, Bangalore M6L4
Optimization Methods: Dynamic Programming Applications – Water Allocation 7
The calculations are shown below.
Table 7
State
3
S
3
x ) (
3 3
x NB
3 3
x S − ) (
3 3 2
x S f −
) (
) (
) (
3 3 2
3 3
3 3
x S f
x NB
S f
−
+
=
) (
3 3
S f
∗
∗
3
x
0 0 4 18 18
1 6 3 14.5 20.5
2 10 2 11 21
3 12 1 6.5 18.5
4
4 12 0 0 12
21 2
In order to find the optimal solution, a backtracking is done. From Table 7, the optimal value
of is given as 2 for the value of 4. Therefore, *
3
x
3
S 2
3 3 2
= − = x S S
1 =
∗
x 1
. Now, from Table 6,
the value of . Then,
2 2 2 1
= − x S = S and from Table 5, for 1
1
= S , the value of .
Thus, the optimal values determined are shown below.
1 =
∗
x
1
2
1
1
21
3
2
1
=
=
=
=
∗
∗
∗
∗
x
x
x
f
These optimal values are same as those we got by solving using backward recursion method.
D Nagesh Kumar, IISc, Bangalore M6L4
D Nagesh Kumar, IISc Optimization Methods: M6L4
1
Dynamic Programming
Applications
Water Allocation –
Numerical Example
D Nagesh Kumar, IISc Optimization Methods: M6L4
2
Objectives
To demonstrate the water allocation problem
through a numerical example using
Backward approach
Forward approach
D Nagesh Kumar, IISc Optimization Methods: M6L4
3
Numerical Problem
Field 1
Field 2
Field 3
x
1
x
3
x
2
z Consider a canal supplying water for three different crops
z Maximum capacity of the canal is 4 units of water.
z Optimization Problem: Determine the optimal allocations x
i
to each
crop that maximizes the total net benefits from all the three crops
D Nagesh Kumar, IISc Optimization Methods: M6L4
4
Numerical Problem …contd.
Net benefits from producing the crops can be expressed as a function of
the water allotted.
2
3 3 3 3
2
2 2 2 2
2
1 1 1 1
7 ) (
5 . 1 8 ) (
5 . 0 5 ) (
x x x NB
x x x NB
x x x NB
− =
− =
− =
The net benefit values
are calculated for each
crop and are as shown
D Nagesh Kumar, IISc Optimization Methods: M6L4
5
Numerical Problem …contd.
¾ Representation of the problem as a set of nodes and links
4
x
1
x
2
x
3
4
3
2
1
0
4
3
2
1
0
0
1
2
3
4
0
1
0
1
2
4
3
2
1
0
0
1
0
1
2
Crop 1 Crop 2 Crop 3
D Nagesh Kumar, IISc Optimization Methods: M6L4
6
Numerical Problem …contd.
¾ The values inside the node show the value of state variable at
each stage
¾ Number of nodes for any stage corresponds to the number of
discrete states possible for each stage.
¾ The values over the links show the different values taken by
decision variables corresponding to the value taken by state
variables
D Nagesh Kumar, IISc Optimization Methods: M6L4
7
Numerical Problem: Solution by Backward
recursion
Suboptimization function for the 3
rd
crop:
with the range of from 0 to 4. ) ( max ) (
3 3
0
3 3
3 3
3
x NB S f
S x
x
≤ ≤
=
3
S
D Nagesh Kumar, IISc Optimization Methods: M6L4
8
Solution by Backward recursion …contd.
Next, by considering last two stages together, the suboptimization
function is
The calculations are shown below
Table 3
[ ] ) ( ) ( max ) (
2 2 1 2 2 2 2
2 2
2
x S f x NB S f
S x
x
− + =
≤
D Nagesh Kumar, IISc Optimization Methods: M6L4
9
Solution by Backward recursion …contd.
D Nagesh Kumar, IISc Optimization Methods: M6L4
10
Solution by Backward recursion …contd.
Considering all the three stages together
with [ ] ) ( ) ( max ) (
1 2 1 1
0
1
1
1
x Q f x NB Q f
Q x
x
− + =
≤ ≤
4
1
= = Q S
D Nagesh Kumar, IISc Optimization Methods: M6L4
11
Solution by Backward recursion …contd.
Backtrack through each table,
Optimal allocation for crop 1, = 1 and = 4
Thus,
From 2
nd
stage, the optimal allocation for crop 2, = 1.
Now,
From 3
rd
stage calculations, = 2
Maximum total net benefit from all the crops = 21
∗
1
x
1
S
3
1 1 2
= − = x S S
2
x
2
2 2 3
= − = x S S
*
3
x
D Nagesh Kumar, IISc Optimization Methods: M6L4
12
Numerical Problem: Solution by Forward
recursion
Start from the first stage and proceed towards the final stage
Suboptimization function for the first stage
Range of values for is from 0 to 4
The calculations are shown in the table
) ( max ) (
1 1 1 1
1 1
1
x NB S f
S x
x
≤
=
1
S
D Nagesh Kumar, IISc Optimization Methods: M6L4
13
Solution by Forward recursion …contd.
D Nagesh Kumar, IISc Optimization Methods: M6L4
14
Solution by Forward recursion …
contd.
⎥
⎦
⎤
⎢
⎣
⎡
−
+
=
≤
) (
) (
max
) (
2 2 1
2 2
2 2
2 2
2 x S f
x NB
S f
S x
x
D Nagesh Kumar, IISc Optimization Methods: M6L4
15
Solution by Forward recursion …
contd.
with
[ ] ) ( ) ( max ) (
3 3 2 3 3 3 3
3 3
3
x S f x NB S f
Q S x
x
− + =
= ≤
4
3
= S
D Nagesh Kumar, IISc Optimization Methods: M6L4
16
Solution by Forward recursion …
contd.
Backtrack through each table,
Optimal allocation for crop 3, = 2 and = 4
Then,
The optimal allocation for crop 2,
Now,
From 1
st
stage calculations,
Maximum total net benefit from all the crops = 21
These solutions are the same as those we got from backward recursion
method.
*
3
x
3
S
2
3 3 2
= − = x S S
1
2
=
∗
x
1
2 2 1
= − = x S S
1
1
=
∗
x
D Nagesh Kumar, IISc Optimization Methods: M6L4
17
Thank You
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 1
Module – 6 Lecture Notes – 5
Capacity Expansion
Introduction
The most common applications of dynamic programming in water resources include water
allocation, capacity expansion of infrastructure and reservoir operation. In this lecture,
dynamic programming formulation for capacity expansion and a numerical example are
discussed.
Capacity expansion
Consider a municipality planning to increase the capacity of its infrastructure (ex: water
treatment plant, water supply system etc) in future. The increments are to be made
sequentially in specified time intervals. Let the capacity at the beginning of time period t be S
t
(existing capacity) and the required capacity at the end of that time period be K
t
. Let be
the added capacity in each time period. The cost of expansion at each time period can be
expressed as a function of and , i.e. C . The problem is to plan the time sequence
of capacity expansions which minimizes the present value of the total future costs subjected
to meet the capacity demand requirements at each time period. Hence, the objective function
of the optimization model can be written as,
t
x
t
S
t
x ) , (
t t t
x S
t
S
Minimize
∑
=
T
t
t t t
x S C
1
) , (
where is the present value of the cost of adding an additional capacity in the
time period t with an initial capacity . Each period’s final capacity or next period’s initial
capacity should be equal to the sum of initial capacity and the added capacity. Also at the end
of each time period, the required capacity is fixed. Thus, for a time period t, the constraints
can be expressed as
) , (
t t t
x S C
t
x
T t for K S
T t for x S S
t t
t t t
,..., 2 , 1
,..., 2 , 1
1
1
= ≥
= + =
+
+
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 2
In some problems, there may be constraints to the amount of capacity added in each time
period i.e. can take only some feasible values. Thus,
t
x
t
x
t t
x Ω ∈ .
The capacity expansion problem defined above can be solved in a sequential manner using
dynamic programming. The solution procedure using forward recursion and backward
recursion are explained below.
Forward Recursion
Consider the stages of the model to be the time periods in which capacity expansion is to be
made and the state to be the capacity at the end of each time period t, . Let be the
present capacity before expansion and be the minimum present value of total cost of
capacity expansion from present to the time t.
1 + t
S
1
S
) (
1 + t t
S f
T
K ) (
2 1
S f
S
1
K
T
K
Stage 1
Stage t
Stage T
S
t
C
t
x
t
S
t+1
S
1
S
2
C
1
C
T
x
1
x
T
S
T
S
T+1
Considering the first stage, the objective function can be written as,
) , ( min
) , ( min ) (
1 2 1 1
1 1 1 2 1
S S S C
x S C S f
− =
=
The values of can be between and where is the required capacity at the end of
time period 1 and is the final capacity required. In other words, should be solved
for a range of values between and . Then considering first two stages, the
suboptimization function is
2
S
1
K
T
K
1
K
2
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 3
( ) [ ]
( ) [ ] ) ( , min
) ( , min ) (
2 3 1 2 2 3 2
2 1 2 2 2 3 2
2 2
2
2 2
2
x S f x x S C
S f x S C S f
x
x
x
x
− + − =
+ =
Ω ∈
Ω ∈
which should be solved for all values of ranging from to . Hence, in general for a
time period t, the suboptimization function can be represented as
3
S
2
K
T
K
( ) [ ] ) ( , min ) (
1 1 1 1 t t t t t t t
x
x
t t
x S f x x S C S f
t t
t
− + − =
+ − +
Ω ∈
+
with constraint as
T t t
K S K ≤ ≤
+1
. For the last stage, i.e. t=T, the function need to
be solved only for
) (
1 + T T
S f
T T
K S =
+1
.
Backward Recursion
The expansion problem can also be solved using a backward recursion approach with some
modifications. Consider the state be the capacity at the beginning of each time period t.
Let be the minimum present value of total cost of capacity expansion in periods t
through T.
t
S
) (
T T
S f
]
1 − t
K
T
K
For the last period T, the final capacity should reach after doing the capacity expansions.
Thus, the objective function can be written as,
T
K
( ) [ ]
T T T
x
x
T T
x S C S f
T T
T
, min ) (
Ω ∈
=
This is solved for all values ranging from to .
T
S
1 − T
K
T
K
In general, for a time period t, the function can be expressed as ) (
t t
S f
( ) [ ) ( , min ) (
1 t t t t t t
x
x
t t
x S f x S C S f
t t
t
+ + =
+
Ω ∈
which should be solved for all discrete values of
ranging from to .
t
S
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 4
For period 1, the above equation must be solved only for the actual value of given.
1
S
Numerical example (Loucks et al., 1981)
Consider a five stage capacity expansion problem. The minimum capacity to be achieved at
the end of each time period is given below.
Table 1
t K
t
1 5
2 10
3 20
4 20
5 25
The expansion costs for each combination of expansion for each stage are shown in the
corresponding links in the form of a figure below.
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 5
Solution Using Forward Recursion
The capacity at the initial stage is given as S
1
= 0.
Consider the first stage, t =1. The final capacity for stage 1, S
2
can take values between K
1
to
K
5
. Let the state variable can take discrete values of 5, 10, 15, 20 and 25. The objective
function for 1
st
subproblem with state variable as S
2
can be expressed as
) , ( min
) , ( min ) (
1 2 1 1
1 1 1 2 1
S S S C
x S C S f
− =
=
The computations for stage 1 are given in the table below.
Table 2
Stage 1
State Variable, S
2
Added Capacity,
x
1 =
S
2
– S
1
C
1
(S
2
) f
1
*
(S
2
)
5 5 9 9
10 10 11 11
15 15 15 15
20 20 21 21
25 25 27 27
Considering the 1
st
and 2
nd
stages together, the state variable S
3
can take values from K
2
to
K
5
. Thus, the objective function for 2
nd
subproblem is
( ) [ ]
( ) [ ] ) ( , min
) ( , min ) (
2 3 1 2 2 3 2
2 1 2 2 2 3 2
2 2
2
2 2
2
x S f x x S C
S f x S C S f
x
x
x
x
− + + − =
+ =
Ω ∈
Ω ∈
The value of x
2
should be taken in such a way that the minimum capacity at the end of stage 2
should be 10, i.e. S . 10
3
≥
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 6
The computations for stage 2 are given in the table below.
Table 3
Stage 2
State
Variable,
S
3
Added
Capacity, x
2
C
2
(S
3
)
S
2
= S
3

x
2
f
1
*
(S
2
) f
2
(S
3
)=C
2
(S
3
)+f
1
*
(S
2
) f
2
*
(S
3
)
0 0 10 11 11
10
5 8 5 9 17
11
0 0 15 15 15
5 8 10 11 19 15
10 10 5 9 19
15
0 0 20 21 21
5 7 15 15 22
10 10 10 11 21
20
15 13 5 9 22
21
0 0 25 27 27
5 7 20 21 28
10 9 15 15 24
15 14 10 11 25
25
20 20 5 9 29
24
Like this, repeat this steps till t = 5. For the 5
th
subproblem, state variable S
6
= K
5
.
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 7
The computations for stages 3 to 5 are shown in tables below.
Table 4
Stage 3
State
Variable,
S
4
Added
Capacity, x
3
C
3
(S
4
)
S
3
= S
4
–
x
3
f
2
*
(S
3
) f
3
(S
4
)=C
3
(S
4
)+f
2
*
(S
3
) f
3
*
(S
4
)
0 0 20 21 21
5 6 15 15 21 20
10 9 10 11 20
20
0 0 25 24 24
5 6 20 21 27
10 9 15 15 34
25
15 12 10 11 23
23
Table 5
Stage 4
State
Variable,
S
5
Added
Capacity, x
4
C
4
(S
5
)
S
4
= S
5
–
x
4
f
3
*
(S
4
) f
4
(S
5
)=C
4
(S
5
)+f
3
*
(S
4
) f
4
*
(S
5
)
20 0 0 20 20 20 20
0 0 25 23 23
25
5 5 20 20 25
23
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 8
Table 6
Stage 5
State
Variable,
S
6
Added
Capacity, x
5
C
5
(S
6
)
S
5
= S
6
–
x
5
f
4
*
(S
5
) f
5
(S
6
)=C
5
(S
6
)+f
4
*
(S
5
) f
5
*
(S
6
)
0 0 25 23 23
25
5 4 20 20 24
23
The figure below shows the solutions with the cost of each addition along the links and the
minimum total cost at each node.
From the figure, the optimal cost of expansion is 23 units. By doing backtracking from the
last stage (farthest right node) to the initial stage, the optimal expansion to be done at 1
st
stage
= 10 units, 3
rd
stage = 15 units and rest all stages = 0 units.
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 9
Solution Using Backward Recursion
The capacity at the final stage is given as S
6
= 25. Consider the last stage, t =5. The initial
capacity for stage 5, S
5
can take values between K
4
to K
5
. The objective function for 1
st
subproblem with state variable as S
5
can be expressed as
( ) [ ]
5 5 5 5 5
, min ) ( x S f S f
T T
T
x
x
Ω ∈
=
The computations for stage 5 are given in the table below
Table 7
Stage 5
State
Variable,
S
5
Added
Capacity, x
5
C
5
(S
5
) f
5
*
(S
5
)
20 5 4 4
25 0 0 0
Following the same procedure for all the remaining stages, the optimal cost of expansion is
achieved. The computations for all stages 4 to 1 are given below.
Table 8
Stage 4
State
Variable,
S
4
Added
Capacity, x
4
C
4
(S
4
) S
5
= S
4
+ x
4
f
5
*
(S
5
) f
4
(S
4
)=C
4
(S
4
)+f
5
*
(S
5
) f
4
*
(S
4
)
0 0 20 4 4
20
5 5 25 0 5
4
25 0 0 25 0 0 0
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 10
Table 9
Stage 3
State
Variable, S
3
Added
Capacity, x
3
C
3
(S
3
)
S
4
= S
3
+
x
3
f
4
*
(S
4
)
f
3
(S
3
)=C
3
(S
3
)+
f
4
*
(S
4
)
f
3
*
(S
3
)
10 9 20 4 13
10
15 12 25 0 12
12
5 6 20 4 10
15
10 9 25 0 10
10
0 0 20 4 4
20
5 6 25 0 5
4
25 0 0 25 0 0 0
Table 10
Stage 2
State
Variable, S
2
Added
Capacity, x
2
C
2
(S
2
)
S
3
= S
2
+
x
2
f
3
*
(S
3
)
f
2
(S
2
)=C
2
(S
2
)+
f
3
*
(S
3
)
f
2
*
(S
2
)
5 8 10 12 20
10 10 15 10 20
15 13 20 4 17
5
20 20 25 0 20
17
0 0 10 12 12
5 8 15 10 18
10 10 20 4 14
10
15 14 25 0 14
12
0 0 15 10 10
5 7 20 4 11 15
10 9 25 0 9
9
0 0 20 4 4
20
5 7 25 0 7
4
25 0 0 25 0 0 0
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 11
Table 11
Stage 2
State
Variable, S
1
Added
Capacity, x
1
C
1
(S
1
)
S
2
= S
1
+
x
1
f
2
*
(S
2
)
f
1
(S
1
)=C
1
(S
1
)+
f
2
*
(S
2
)
f
1
*
(S
2
)
5 9 5 17 26
10 11 10 12 23
15 15 15 9 24
20 21 20 4 25
0
25 27 25 0 27
23
The solution is given by the figure below with the minimum total cost of expansion at the
nodes.
D Nagesh Kumar, IISc, Bangalore M6L5
Optimization Methods: Dynamic Programming Applications – Capacity Expansion 12
The optimal cost of expansion is obtained from the node value at the first node i.e. 23 units
which is the same as obtained from forward recursion. The optimal expansions at each time
period can be obtained by moving forward from the first node to the last node. Thus, the
optimal expansions to be made are 10 units at the first stage and 15 units at the last stage.
Hence the final requirement of 25 units is achieved.
Although this type of expansion problem can be solved, the future demand and the future cost
of expansion are highly uncertain. Hence, the solution obtained cannot be used for making
expansions till the end period, T. It can be very well used to make decisions about the
expansion to be done in the current period. For this to be done, the final period T should be
selected far away from the current period, so that the uncertainty on current period decisions
is much less.
It may be note that, generally water supply projects are planned for a period of 2530 years to
avoid undue burden to the present generation. In addition, change of value of money in time
(due to inflation and other aspects) is not considered in the examples above.
D Nagesh Kumar, IISc, Bangalore M6L5
D Nagesh Kumar, IISc Optimization Methods: M6L5
1
Dynamic Programming
Applications
Capacity Expansion
D Nagesh Kumar, IISc Optimization Methods: M6L5
2
Objectives
¾ To discuss the Capacity Expansion Problem
¾ To explain and develop recursive equations
for both backward approach and forward
approach
¾ To demonstrate the method using a
numerical example
D Nagesh Kumar, IISc Optimization Methods: M6L5
3
Capacity Expansion Problem
Consider a municipality planning to increase the capacity of its
infrastructure (ex: water treatment plant, water supply system etc)
in future
Sequential increments are to be made in specified time intervals
The capacity at the beginning of time period t be S
t
Required capacity at the end of that time period be K
t
Thus, be the added capacity in each time period
Cost of expansion at each time period can be expressed as a
function of and , i.e.
t
x
t
S
t
x
) , (
t t t
x S C
D Nagesh Kumar, IISc Optimization Methods: M6L5
4
Capacity Expansion Problem …contd.
Optimization problem: To find the time sequence of capacity
expansions which minimizes the present value of the total future
costs
Objective function:
Minimize
: Present value of the cost of adding an additional
capacity in the time period t
Constraints: Capacity demand requirements at each time period
: Initial capacity
∑
=
T
t
t t t
x S C
1
) , (
) , (
t t t
x S C
t
x
t
S
D Nagesh Kumar, IISc Optimization Methods: M6L5
5
Capacity Expansion Problem …contd.
Each period’s final capacity or next period’s initial capacity should be
equal to the sum of initial capacity and the added capacity
At the end of each time period, the required capacity is fixed
Constraints to the amount of capacity added in each time period i.e.
can take only some feasible values.
T t for x S S
t t t
,..., 2 , 1
1
= + =
+
T t for K S
t t
,..., 2 , 1
1
= ≥
+
t
x
t t
x Ω ∈
D Nagesh Kumar, IISc Optimization Methods: M6L5
6
Capacity Expansion Problem:
Forward Recursion
Stages of the model: Time periods in which capacity
expansion to be made
State: Capacity at the end of each time period t,
: Present capacity before expansion
: Minimum present value of total cost of capacity
expansion from present to the time t
1 + t
S
1
S
) (
1 + t t
S f
Stage 1
Stage t
Stage T
S
t
C
t
x
t
S
t+1
S
1
S
2
C
1
C
T
x
1
x
T
S
T
S
T+1
D Nagesh Kumar, IISc Optimization Methods: M6L5
7
Capacity Expansion Problem:
Forward Recursion …contd.
For the first stage, objective function
Value of S
2
can be between K
1
and K
T
where K
1
is the required capacity at the end of time period 1 and
K
T
is the final capacity required
Now, for the first two stages together,
Value of S
3
can be between K
2
and K
T
) , ( min
) , ( min ) (
1 2 1 1
1 1 1 2 1
S S S C
x S C S f
− =
=
( ) [ ]
( ) [ ] ) ( , min
) ( , min ) (
2 3 1 2 2 3 2
2 1 2 2 2 3 2
2 2
2
2 2
2
x S f x x S C
S f x S C S f
x
x
x
x
− + − =
+ =
Ω ∈
Ω ∈
D Nagesh Kumar, IISc Optimization Methods: M6L5
8
Capacity Expansion Problem:
Forward Recursion …contd.
In general, for a time period t,
Subjected to
For the last stage, i.e. t =T, need to be solved only for
( ) [ ] ) ( , min ) (
1 1 1 1 t t t t t t t
x
x
t t
x S f x x S C S f
t t
t
− + − =
+ − +
Ω ∈
+
T t t
K S K ≤ ≤
+1
) (
1 + T T
S f
T T
K S =
+1
D Nagesh Kumar, IISc Optimization Methods: M6L5
9
Capacity Expansion Problem:
Backward Recursion
Stages of the model: Time periods in which capacity
expansion to be made
State: Capacity at the beginning of each time period t,
: Minimum present value of total cost of capacity
expansion in periods t through T
For the last period T, the final capacity should reach K
T
after
doing the capacity expansions
Value of S
T
can be between K
T1
and K
T
t
S
) (
t t
S f
( ) [ ]
T T T
x
x
T T
x S C S f
T T
T
, min ) (
Ω ∈
=
D Nagesh Kumar, IISc Optimization Methods: M6L5
10
Capacity Expansion Problem:
Backward Recursion …contd.
In general, for a time period t,
Solved for all values of S
t
ranging from K
t1
and K
t
For period 1, the above equation must be solved only for
S
t
= S
1
( ) [ ] ) ( , min ) (
1 t t t t t t
x
x
t t
x S f x S C S f
t t
t
+ + =
+
Ω ∈
D Nagesh Kumar, IISc Optimization Methods: M6L5
11
Capacity Expansion: Numerical
Example
Consider a five stage capacity expansion problem
The minimum capacity to be achieved at the end of each time period is
given in the table below
25 5
20 4
20 3
10 2
5 1
D
t
t
D Nagesh Kumar, IISc Optimization Methods: M6L5
12
Capacity Expansion: Numerical Example
…contd.
Expansion costs for
each combination of
expansion
D Nagesh Kumar, IISc Optimization Methods: M6L5
13
Numerical Example: Forward Recursion
¾ Consider the first stage, t =1
¾ The final capacity for stage 1, S
2
can take values between D
1
to
D
5
¾ Let the state variable can take discrete values of 5, 10, 15, 20
and 25
¾ Objective function for 1
st
subproblem with state variable as S
2
can
be expressed as
) , ( min
) , ( min ) (
1 2 1 1
1 1 1 2 1
S S S C
x S C S f
− =
=
D Nagesh Kumar, IISc Optimization Methods: M6L5
14
Numerical Example: Forward Recursion …contd.
Computations for stage 1 are given in the table below
D Nagesh Kumar, IISc Optimization Methods: M6L5
15
Numerical Example: Forward Recursion …contd.
¾ Now considering the 1
st
and 2
nd
stages together
¾ State variable S
3
can take values from D
2
to D
5
¾ Objective function for 2
nd
subproblem is
¾ The value of x
2
should be taken in such a way that the minimum
capacity at the end of stage 2 should be 10, i.e.
( ) [ ]
( ) [ ] ) ( , min
) ( , min ) (
2 3 1 2 2 3 2
2 1 2 2 2 3 2
2 2
2
2 2
2
x S f x x S C
S f x S C S f
x
x
x
x
− + + − =
+ =
Ω ∈
Ω ∈
10
3
≥ S
D Nagesh Kumar, IISc Optimization Methods: M6L5
16
Numerical Example: Forward Recursion …contd.
Computations for stage 2 are given in the table below
D Nagesh Kumar, IISc Optimization Methods: M6L5
17
Numerical Example: Forward Recursion …contd.
¾ Like this, repeat this steps till t = 5
¾ The computation tables are shown
D Nagesh Kumar, IISc Optimization Methods: M6L5
18
Numerical Example: Forward Recursion …contd.
For the 5
th
subproblem, state variable S
6
= D
5
D Nagesh Kumar, IISc Optimization Methods: M6L5
19
Numerical Example: Forward Recursion …contd.
Figure showing the solutions
with the cost of each addition
along the links and the
minimum total cost at each
node
¾ Optimal cost of
expansion is 23 units
¾ By doing backtracking
from the last stage
(farthest right node) to
the initial stage, the
optimal expansion to be
done at 1st stage = 10
units, 3rd stage = 15
units and rest all stages
= 0 units
D Nagesh Kumar, IISc Optimization Methods: M6L5
20
Numerical Example: Backward Recursion
¾ Capacity at the final stage is given as S
6
= 25
¾ Consider the last stage, t =5
¾ Initial capacity for stage 5, S
5
can take values between D
4
to D
5
¾ Objective function for 1
st
subproblem with state variable as S
5
can be expressed as
¾ The optimal cost of expansion can be achieved by following the
same procedure to all stages
( ) [ ]
5 5 5 5 5
, min ) ( x S f S f
T T
T
x
x
Ω ∈
=
D Nagesh Kumar, IISc Optimization Methods: M6L5
21
Numerical Example: Backward Recursion …contd.
Computations for all stages
D Nagesh Kumar, IISc Optimization Methods: M6L5
22
Numerical Example: Backward Recursion …contd.
D Nagesh Kumar, IISc Optimization Methods: M6L5
23
Numerical Example: Backward Recursion …contd.
D Nagesh Kumar, IISc Optimization Methods: M6L5
24
Numerical Example: Backward Recursion …contd.
D Nagesh Kumar, IISc Optimization Methods: M6L5
25
Numerical Example: Backward Recursion …contd.
¾ Optimal cost of
expansion is obtained
from the node value at
the first node i.e. 23
units
¾ Optimal expansions
to be made are 10
units at the first stage
and 15 units at the last
stage
D Nagesh Kumar, IISc Optimization Methods: M6L5
26
Capacity Expansion Problem:
Uncertainty
The future demand and the future cost of expansion in this
problem are highly uncertain
Hence, the solution obtained cannot be used for making
expansions till the end period, T
But, decisions about the expansion to be done in the current
period can be very well done through this
For the uncertainty on current period decisions to be less , the
final period T should be selected far away from the current
period
D Nagesh Kumar, IISc Optimization Methods: M6L5
27
Thank You
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 1
Module – 6 Lecture Notes – 6
Reservoir Operation
Introduction
In the previous lectures, we discussed about the application of dynamic programming in
water allocation and capacity expansion of infrastructure. Another major application is in the
field of reservoir operation, which will be discussed in this lecture.
Reservoir operation – Steady state optimal policy
Consider a single reservoir receiving inflow and making releases for each time period t.
The maximum capacity of the reservoir is K. The optimization problem is to find the
sequence of releases to be made from the reservoir that maximizes the total net benefits.
These benefits may be from hydropower generation, irrigation, recreation etc. Let and
be the initial and final storages for time period t. Expressing net benefits as a function of ,
and , the net benefit for period t is
t
i
t
r
t
S
1 + t
S
1 + t
S
t
r
t
S
( )
t t t t
r S S NB , ,
1 +
.
If there are T periods in a year, then the objective function is to maximize the total net
benefits from all periods.
Maximize ( )
∑
=
+
T
t
t t t t
r S S NB
1
1
, ,
This is subject to continuity and also capacity constraints. Neglecting all minor losses like
evaporation, seepage etc and assuming that there is no overflow, the continuity relation can
be written as,
T t for r i S S
t t t t
,... 2 , 1
1
= − + =
+
The capacity constraint can be expressed as,
T t for K S
t
,... 2 , 1 = ≤
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 2
The above formulated problem can be solved as a sequential process either using forward or
backward approach. Here the stages are the time periods and the states are the storage
volumes.
Assume that there are T periods in a year. In order to find the steady state policy, select a
period in a particular year in the near future (to get steady solution). Usually in almost all
problems, the last period T is taken as the terminal period. At this stage, the optimal release
will be independent of the inflow and also the net benefit .
t
r
t
i
t
NB
Now, consider the terminal period as T of a particular year after which reservoir is no longer
useful. Solving this problem in a backward recursion method, let t represents the period in a
year from T to 1 and n represents the periods remaining from t till end. Thus, t will take
values starting from T, decreasing to 1 (which will complete one year) and then again taking
a value of T and repeating the values. The value of n starts from 1 (while considering the T
th
period of last year) and while moving backwards its value keeps on increasing i.e. at the
beginning of the last year, the value of n = T and at the beginning of second last year its
value will be equal to 2T and so on.
Starting from T of last year, which is at the far right, there is only one period remaining.
Thus, in this case t=T and n=1. Let ( )
T T
S f
1
( )
T T
S f
1
be the maximum net benefit in the last period of
the year considered. can be expressed as
( ) ( ) { } [ ]
T T T T T T
K i S r
i S r
r
T T
r r i S S NB S f
T T T
T T T
T
, , max
0
1
− + =
− + ≥
+ ≤
≥
which should be solved for all S values from 0 to K.
T
Considering the last two stages together for which t=T1 and n=2, the objective function can
be written as
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 3
( ) ( ) { } ( ) [ ]
1 1 1
1
1 1 1 1 1 1
0
1
2
1
, , max
1 1 1
1 1 1
1
− − − − − − − − −
− + ≥
+ ≤
≥
− −
− + + − + =
− − −
− − −
−
T T T T T T T T T T
K i S r
i S r
r
T T
r i S f r r i S S NB S f
T T T
T T T
T
This also is solved for all values from 0 to K.
1 − T
S
In general, for a period t of a particular year with n periods remaining, the function can be
written as
( ) ( ) { } ( ) [ ]
t t t
n
t t t t t t t
K i S r
i S r
r
t
n
t
r i S f r r i S S NB S f
t t t
t t t
t
− + + − + =
−
+
− + ≥
+ ≤
≥
1
1
0
, , max
where the index t decreases from T to 1 and then takes the value T again for the previous year
and the cycle repeats while the index n starts from 1 and increases at each successive stage.
This cycle can be repeated till the optimum values of for an initial storage will be the
same as the corresponding and of previous year. Such a solution is called stationary
solution. The maximum net benefit can be obtained as the difference of and
t
r
t
S
t
r
t
S
( )
t
T n
t
S f
+
( )
t
n
t
S f
t
S
for any and t.
Numerical example (Loucks et al., 1981)
Consider a reservoir for which the desirable constant storage is 20 units and the constant
release is 25 units. The capacity of the reservoir is 30 units and the inflows for three seasons
are given as 10, 50 and 20 units. The problem is to find the optimum and that
minimizes the total squared deviation from the release and storage targets given. Hence, the
objective function is
t
S
t
r
( ) ( ) [ ]
2 2
25 20 r S − + − S
t
r
t t
. Let take the discrete values of 0, 10, 20, 30
and take the values of 10, 20, 30, 40.
t
Solution:
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 4
Consider a year after which the reservoir is no longer useful. The problem can be expressed
as a sequential process as shown in the figure below
Here no. of seasons (periods), T = 3. Considering the last period for which t = 3 and n = 1,
the optimization function is
Minimize ( ) ( ) ( ) [ ]
2
3
2
3 3
1
3
25 20 r S S f − + − =
Inflow for 3
rd
season, I
3
= 20 units and capacity of the reservoir, K = 30 units.
The release constraints can be expressed as
20
3
3 3 3
+ ≤
+ ≤
S
I S r
and
30 20
3
3 3 3
− + ≥
− + ≥
S
K I S r
The computation for the first subproblem (n = 1) is shown in the table below.
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 5
Table 1
State variable,
S
3
Release, r
3
( ) ( )
3
2
3
25 20 r S − + − ( )
3
1
3
S f
Optimal
release, r
3
*
10 625
0
20 425
425 20
10 325
20 125 10
30 125
125 20, 30
10 225
20 25
30 25
20
40 225
25 20, 30
10 325
20 125
30 125
30
40 325
125 20, 30
Now considering the last two periods (n =2), the optimization function is
Minimize ( ) ( ) ( ) [ ] ( )
2 2 2
1
3
2
2
2
2 2
2
2
25 20 r I S f r S S f − + + − + − =
Inflow for 2
nd
season, I
2
= 50 units. The release constraints can be expressed as
50
2 2
+ ≤ S r and
30 50
2 2
− + ≥ S r
The computation for the second subproblem (n = 2) is shown in the table below.
For S
2
=30, i.e. . Since r 50 . . 30 50
2 2 2
≥ − + ≥ r e i S r 50
2
≥ r
2
can take values only of 10,
20, 30 and 40 only, the release cannot be made for S
2
=30.
Table 2
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 6
State
variable,
S
2
Release,
r
2
( )
( )
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
− +
−
2
2
2
2
25
20
r
S
S
2
+
I
2

r
2
( )
2 2 2
1
3
r I S
f
− +
(5)+(3) ( )
2
2
2
S f
Optimal
release,
r
2
*
20 425 30 125 550
30 425 20 25 450 0
40 625 10 125 750
450 30
30 125 30 125 250
10
40 325 20 25 350
250 30
20 40 225 30 125 350 350 40
30 na na na na na na na
The same procedure is repeated for all stages till n = 7. The summarized solution for this
problem is given in the table below.
Table 3
n = 1 n = 2 n =3
Initial Storage,
t
S ( )
3
1
3
S f
∗
3
r ( )
2
2
2
S f
∗
2
r ( )
1
3
1
S f
∗
1
r
0 425 20 450 30 1075 10
10 125 20, 30 250 30 575 10, 20
20 25 20, 30 350 40 275 20
30 125 20, 30  na 375 30
Table 4
n = 4 n =5 n =6
Initial Storage,
t
S
( )
3
4
3
S f
∗
3
r ( )
2
5
2
S f
∗
2
r ( )
1
6
1
S f
∗
1
r
0 1200 10 725 30 1350 10
10 600 10 525 30 850 10, 20
20 300 20 625 40 550 20
30 400 30  na 650 30
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 7
Table 5
n = 7
Initial Storage,
t
S
( )
3
7
3
S f
∗
3
r
0 1475 10
10 875 10
20 575 20
30 675 30
At this stage, the value of at n = 7 and n = 4 are exactly the same. Also the difference
 = 275 is same for all . This value is the minimum total squared deviations
from the target release and storage. Thus, the stationary policy obtained is given below.
∗
3
r
( )
3
7
3
S f ( )
3
4
3
S f
t
S
Table 6
Optimal Releases
t
S
∗
1
r
∗
2
r
∗
3
r
0 10 30 10
10 10, 20 30 10
20 20 40 20
30 30  30
A main assumption made in dynamic programming is that the decisions made at one stage is
dependent only on the state variable and is independent of the decisions taken in other stages.
In cases where decisions made at one stage are dependent on the earlier decisions, then
dynamic programming will not be an appropriate optimization technique.
D Nagesh Kumar, IISc, Bangalore M6L6
Optimization Methods: Dynamic Programming Applications – Reservoir Operation 8
References / Further Reading:
1. Bellman, R., Dynamic Programming, Princeton University Press, Princeton, N.J, 1957.
2. Loucks, D.P., J.R. Stedinger, and D.A. Haith, Water Resources Systems Planning and
Analysis, Prentice – Hall, N.J., 1981.
3. Mays, L.W. and K. Tung, Hydrosystems Engineering and Management, McGrawHill
Inc., New York, 1992.
4. Vedula, S., and P.P. Mujumdar, Water Resources Systems: Modelling Techniques and
Analysis, Tata McGraw Hill, New Delhi, 2005.
D Nagesh Kumar, IISc, Bangalore M6L6
D Nagesh Kumar, IISc Optimization Methods: M6L6
1
Dynamic Programming
Applications
Reservoir Operation
D Nagesh Kumar, IISc Optimization Methods: M6L6
2
Objectives
¾ To develop the steady state operational
policy of a single reservoir
¾ To develop backward recursive equations for
this operational policy
¾ To demonstrate the method using a
numerical example
D Nagesh Kumar, IISc Optimization Methods: M6L6
3
Reservoir Operation – Steady State
Policy
Consider a single reservoir receiving inflow i
t
and making
releases r
t
for each time period t
Maximum capacity of the reservoir is K
Reservoir receives benefits from hydropower generation,
irrigation, recreation etc
Optimization problem: Find the sequence of releases to be made
from the reservoir that maximizes the total net benefits
S
t
: initial storage for time period t
S
t+1
: final storage for time period t
Net benefits can be expressed as a function of r
t
, S
t
and S
t+1
as
( )
t t t t
r S S NB , ,
1 +
D Nagesh Kumar, IISc Optimization Methods: M6L6
4
Reservoir Operation – Steady State Policy
…contd.
Let there be T periods in a year, then the objective function is to
maximize the total net benefits from all periods
Maximize
The constraints are
Continuity Equation after neglecting all the minor losses and
assuming no overflow
Capacity constraint
( )
∑
=
+
T
t
t t t t
r S S NB
1
1
, ,
T t for r i S S
t t t t
,... 2 , 1
1
= − + =
+
T t for K S
t
,... 2 , 1 = ≤
D Nagesh Kumar, IISc Optimization Methods: M6L6
5
Steady State Policy : Backward Recursion
Take stages as the time periods and the states as the storage
volumes
Assume that there are T periods in a year
To find the steady state policy, select a period in a particular
year, after which it is assumed that the reservoir is no longer
useful (maximum lifetime of the reservoir)
Usually in almost all problems, the last period T is taken as the
terminal period
At this stage, the optimal release will be independent of the
inflow and also the net benefit.
D Nagesh Kumar, IISc Optimization Methods: M6L6
6
Steady State Policy : Backward Recursion
Consider the terminal period as T of a particular year after which
reservoir is no longer useful
Solving this problem in a backward recursion method, let t represents
the period in a year from T to 1 and n represents the periods
remaining from t till end
t will take values starting from T, decreasing to 1 (which will complete
one year) and then again taking a value of T and repeating the values
Value of n starts from 1 (while considering the T
th
period of last year)
and while moving backwards its value keeps on increasing i.e. at the
beginning of the last year, the value of n = T and at the beginning of
second last year its value will be equal to 2T and so on.
D Nagesh Kumar, IISc Optimization Methods: M6L6
7
Steady State Policy : Backward Recursion
…contd.
Starting from the last period T of a particular year, there is only one
period remaining
The maximum net benefit for this last period is
This is solved for all S
T
values from 0 to K
( ) ( ) { } [ ]
T T T T T T
K i S r
i S r
r
T T
r r i S S NB S f
T T T
T T T
T
, , max
0
1
− + =
− + ≥
+ ≤
≥
D Nagesh Kumar, IISc Optimization Methods: M6L6
8
Steady State Policy : Backward Recursion
…contd.
Considering the last two stages together, the objective function is
S
T1
also ranges from 0 to K
In general, for a period t with n periods remaining, the function can be
written as
where
the index t decreases from T to 1 and then takes the value T again and
the cycle repeats for another year
the index n starts from 1 and increases at each successive stage
( ) ( ) ( ) [ ]
t t t
n
t t t t t t t
K i S r
i S r
r
t
n
t
r i S f r r i S S NB S f
t t t
t t t
t
− + + − + =
−
+
− + ≥
+ ≤
≥
1
1
0
, , max
( ) ( ) { } ( ) [ ]
1 1 1
1
1 1 1 1 1 1
0
1
2
1
, , max
1 1 1
1 1 1
1
− − − − − − − − −
− + ≥
+ ≤
≥
− −
− + + − + =
− − −
− − −
−
T T T T T T T T T T
K i S r
i S r
r
T T
r i S f r r i S S NB S f
T T T
T T T
T
D Nagesh Kumar, IISc Optimization Methods: M6L6
9
Steady State Policy : Backward Recursion
…contd.
The cycle is repeated till the optimum values of r
t
for an initial
storage S
t
will be the same as the corresponding r
t
and S
t
of
previous year
Such a solution is called stationary solution
Maximum net benefit is the difference of and
for any S
t
and t.
( )
t
T n
t
S f
+
( )
t
n
t
S f
D Nagesh Kumar, IISc Optimization Methods: M6L6
10
Steady State Policy : Numerical Example
Consider a reservoir for which the desirable constant storage is 20
units and the constant release is 25 units.
Capacity of the reservoir is 30 units.
Inflows for three seasons are 10, 50 and 20 units.
Optimization problem: To find the optimum r
t
and S
t
that minimizes
the total squared deviation from the release and storage targets
given.
Thus, the objective function is
Minimize
( ) ( ) [ ]
2 2
25 20
t t
r S − + −
D Nagesh Kumar, IISc Optimization Methods: M6L6
11
Steady State Policy : Numerical Example
…contd.
S
t
take the discrete values of 0, 10, 20, 30 and r
t
take the values of
10, 20, 30, 40
Solution:
Backward recursion is used to solve the problem
Consider a year after which the reservoir is no longer useful.
Expressing the problem as a sequential process as shown in the
figure below
D Nagesh Kumar, IISc Optimization Methods: M6L6
12
Steady State Policy : Numerical Example
…contd.
¾ Considering the last period for which t = 3 and n = 1, the
optimization function is
¾ Minimize
¾ Inflow for 3
rd
season, I
3
= 20 units and capacity of the reservoir,
K = 30 units
¾ The release constraints can be expressed as
and
( ) ( ) ( ) [ ]
2
3
2
3 3
1
3
25 20 r S S f − + − =
20
3
3 3 3
+ ≤
+ ≤
S
I S r
30 20
3
3 3 3
− + ≥
− + ≥
S
K I S r
D Nagesh Kumar, IISc Optimization Methods: M6L6
13
Steady State Policy : Numerical Example
…contd.
Computation for the first subproblem (n = 1)
D Nagesh Kumar, IISc Optimization Methods: M6L6
14
Steady State Policy : Numerical Example
…contd.
¾ Considering the last two periods (n =2), the optimization function is
¾ Inflow for 2
nd
season, I
2
= 50 units
¾ Release constraints can be expressed as
and
¾ While computing the optimal releases for S
2
=30,
¾ Since r
2
can take values only of 10, 20, 30 and 40 only, the release
cannot be made for S
2
=30.
50 . . 30 50
2 2 2
≥ − + ≥ r e i S r
( ) ( ) ( ) [ ] ( )
2 2 2
1
3
2
2
2
2 2
2
2
25 20 r I S f r S S f − + + − + − =
50
2 2
+ ≤ S r
30 50
2 2
− + ≥ S r
D Nagesh Kumar, IISc Optimization Methods: M6L6
15
Steady State Policy : Numerical Example
…contd.
Computation for the second subproblem (n = 2)
D Nagesh Kumar, IISc Optimization Methods: M6L6
16
Steady State Policy : Numerical Example
…contd.
The same procedure is repeated for all stages till n = 7. The summarized
solution for this problem is given in the table below
Solution for the last year
D Nagesh Kumar, IISc Optimization Methods: M6L6
17
Steady State Policy : Numerical Example
…contd.
Solution for the second last year
D Nagesh Kumar, IISc Optimization Methods: M6L6
18
Steady State Policy : Numerical Example
…contd.
Solution for the last period of third last year
D Nagesh Kumar, IISc Optimization Methods: M6L6
19
Steady State Policy : Numerical Example
…contd.
At this stage, the value of r
3
*
at n = 7 and n = 4 are exactly the same.
Also the difference is same for all S
t
This value is the minimum total squared deviations from the target
release and storage
Stationary optimal policy
obtained is shown
( ) ( ) 275
3
4
3 3
7
3
= − S f S f
D Nagesh Kumar, IISc Optimization Methods: M6L6
20
Steady State Policy: Limitations
Assumption in dynamic programming: Decisions made at one
stage is dependent only on the state variable and is
independent of the decisions taken in other stages
Therefore dynamic programming will not be an appropriate
technique where decisions are dependent on the earlier
decisions.
D Nagesh Kumar, IISc Optimization Methods: M6L6
21
Thank You
Optimization Methods: Integer Programming  Learning Objectives
Module 7: Integer Programming
Learning Objectives
The previous modules discussed about the optimization methods using linear programming
and dynamic programming techniques with almost no limit in the values taken by decision
variables. But many practical problems require the constraint of integrality in decision
variable values. This can be solved using Integer programming which is the main objective of
this module.
The module gives a description of Integer programming, with emphasis on Integer Linear
Programming (ILP), its relation with linear programming and the various types of integer
programming,. Among the various techniques for solving ILP, a well known method
Gomory’s cutting plane method is explained. The concept of this method is explained
graphically to give the reader a better understanding. The generation of Gomory constraints
are also well explained for all integer LP and also mixed ILP, which will in turn help the
reader to solve any type of integer programming.
At the end of the module the reader will be able to
1. Formulate the ILP.
2. Generate Gomory constraints.
3. Solve allinteger LP by Gomory cutting plane method.
4. Solve mixed Integer LP by Gomory cutting plane method.
D Nagesh Kumar, IISc, Bangalore M7LO
Optimization Methods: Integer Programming – Integer Linear Programming 1
Module – 7 Lecture Notes – 1
Integer Linear Programming
Introduction
In all the previous lectures in linear programming discussed so far, the design variables
considered are supposed to take any real value. However in practical problems like
minimization of labor needed in a project, it makes little sense in assigning a value like 5.6 to
the number of labourers. In situations like this, one natural idea for obtaining an integer
solution is to ignore the integer constraints and use any of the techniques previously
discussed and then roundoff the solution to the nearest integer value. However, there are
several fundamental problems in using this approach:
1. The roundedoff solutions may not be feasible.
2. The objective function value given by the roundedoff solutions (even if some are
feasible) may not be the optimal one.
3. Even if some of the roundedoff solutions are optimal, checking all the roundedoff
solutions is computationally expensive ( possible roundoff values to be considered
for an variable problem)
n
2
n
Types of Integer Programming
When all the variables in an optimization problem are restricted to take only integer values, it
is called an all – integer programming problem. When the variables are restricted to take only
discrete values, the problem is called a discrete programming problem. When only some
variable values are restricted to take integer or discrete, it is called mixed integer or discrete
programming problem. When the variables are constrained to take values of either zero or 1,
then the problem is called zero – one programming problem.
Integer Linear Programming
Integer Linear Programming (ILP) is an extension of linear programming, with an additional
restriction that the variables should be integer valued. The standard form of an ILP is of the
form,
D Nagesh Kumar, IISc, Bangalore M7L1
Optimization Methods: Integer Programming – Integer Linear Programming 2
0
max
≥
≤
X
b AX to subject
X c
T
X must be integer valued
The associated linear program dropping the integer restrictions is called linear relaxation LR.
Thus, LR is less constrained than ILP. If the objective function coefficients are integer, then
for minimization, the optimal objective for ILP is greater than or equal to the roundedoff
value of the optimal objective for LR. For maximization, the optimal objective for ILP is less
than or equal to the roundedoff value of the optimal objective for LR.
For a minimization ILP, the optimal objective value for LR is less than or equal to the
optimal objective for ILP and for a maximization ILP, the optimal objective value for LR is
greater than or equal to that of ILP. If LR is infeasible, then ILP is also infeasible. Also, if LR
is optimized by integer variables, then that solution is feasible and optimal for IP.
A most popular method used for solving allinteger and mixedinteger linear programming
problems is the cutting plane method by Gomory (Gomory, 1957).
Gomory’s Cutting Plane Method for All – Integer Programming
Consider the following optimization problem.
0 ,
45 9 3
6 2 to subject
3 Maximize
2 1
2 1
2 1
2 1
≥
≤ +
≤ −
+ =
x x
x x
x x
x x Z
x
1
and x
2
are integers
The graphical solution for the linear relaxation of this problem is shown below.
D Nagesh Kumar, IISc, Bangalore M7L1
Optimization Methods: Integer Programming – Integer Linear Programming 3
0 1 2 3 4 5 6 7
0
1
2
3
4
5
6
7
D C
B
A
x
1
x
2
It can be seen that the solution is
7
3
3 ,
7
5
4
2 1
= = x x and the optimal value of
7
4
17 = Z .
The feasible solutions accounting the integer constraints are shown by red dots. These points
are called integer lattice points. The original feasible region is reduced to a new feasible
region by including some additional constraints such that an extreme point of the new
feasible region becomes an optimal solution after accounting for the integer constraints.
The graphical solution for the example previously discussed taking x
1
and x
2
as integers are
shown below. Two additional constraints (MN and OP) are included so that the original
feasible region ABCD is reduced to a new feasible region AEFGCD. Thus the solution for
this ILP is and the optimal value is 3 , 4
2 1
= = x x 15 = Z .
7
4
17 = Z
( )
7
3
3 ,
7
5
4
6 2
2 1
− x x
45 9 3
2 1
≤
+ ≤ x x
D Nagesh Kumar, IISc, Bangalore M7L1
Optimization Methods: Integer Programming – Integer Linear Programming 4
0 1 2 3 4 5 6 7
0
1
2
3
4
5
6
7
D C
B
A
Additional constraints
G
E
F
x
1
x
2
(4,3)
O
P
M
N
( )
7
3
3 ,
7
5
4
7
4
17 = Z
15 = Z
Gomary proposed a systematic method to develop these additional constraints known as
Gomory constraints.
Generation of Gomory Constraints:
Let the final tableau of an LP problem consist of n basic variables (original variables) and m
non basic variables (slack variables) as shown in the table below. The basic variables are
represented as x
i
(i=1,2,…,n) and the non basic variables are represented as y
j
(j=1,2,…,m).
D Nagesh Kumar, IISc, Bangalore M7L1
Optimization Methods: Integer Programming – Integer Linear Programming 5
Table 1
Variables
Basis Z
1
x
2
x …
i
x
…
n
x
1
y
2
y …
j
y
…
m
y
r
b
Z 1 0 0 0 0 c
1
c
2
c
j
c
m
b
1
x 0 1 0 0 0 c
11
c
12
c
1j
c
1m
1
b
2
x 0 0 1 0 0 c
21
c
22
c
2j
c
2m
2
b
…
i
x
0 0 0 1 0 c
31
c
32
c
3j
c
3m i
b
…
n
x
0 0 0 0 1 c
41
c
42
c
4j
c
4m n
b
Choose any basic variable with the highest fractional value. If there is a tie between two
basic variables, arbitrarily choose any of them as . Then from the i
i
x
i
x
th
equation of table,
∑
=
− =
m
j
j ij i i
y c b x
1
……..(1)
Express both and as an integer value plus a fractional part.
i
b
ij
c
) 3 ........(
) 2 ........(
ij ij ij
i i i
c c
b b
α
β
+ =
+ =
where
i
b ,
ij
c denote the integer part and
i
β ,
ij
α denote the fractional part.
i
β will be a
strictly positive fraction ( 1 0 < <
i
) β and
ij
α is a nonnegative fraction ( ) 1 0 < ≤
ij
α .
Substituting equations (2) and (3) in (1), equation (1) can be written as
∑ ∑
= =
− − = −
m
j
j ij i i j
m
j
ij i
y c b x y
1 1
α β …….(4)
For all the variables and to be integers, the right hand side of equation (4) should be
an integer.
i
x
j
y
= −
∑
=
j
m
j
ij i
y
1
α β integer ……(5)
D Nagesh Kumar, IISc, Bangalore M7L1
Optimization Methods: Integer Programming – Integer Linear Programming 6
Since
ij
α are nonnegative integers and are nonnegative integers, the term will
always be a nonnegative number. Thus we have,
j
y
j
m
j
ij
y
∑
=1
α
1
1
< ≤
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
∑
=
i j
m
j
ij i
y β α β …….(6)
Hence the constraint can be expressed as
0
1
≤ −
∑
=
j
m
j
ij i
y α β …….(7)
By introducing a slack variable (which should also be an integer), the Gomory constraint
can be written as
i
s
i j
m
j
ij i
y s β α − = −
∑
=1
…….(8)
General procedure for solving ILP:
1. Solve the given problem as an ordinary LP problem neglecting the integer
constraints. If the optimum values of the variables are integers itself, then there is
nothing more to be done.
2. If any of the basic variables has fractional values, introduce the Gomory constraints
as discussed in the previous section. Insert a new row with the coefficients of this
constraint, to the final tableau of the ordinary LP problem (Table 1).
3. Solve this by applying the dual simplex method.
Since the value of 0 =
j
y in Table 1, the Gomory constraint equation becomes
i i
s β − = which is a negative value and thus infeasible. Dual simplex method
is used to obtain a new optimal solution that satisfies the Gomory constraint.
4. Check whether the new solution is allinteger or not. If all values are not integers,
then a new Gomory constraint is developed from the new simplex tableau and the
dual simplex method is applied again.
5. This process is continued until an optimal integer solution is obtained or it shows that
the problem has no feasible integer solution.
D Nagesh Kumar, IISc, Bangalore M7L1
Optimization Methods: Integer Programming – Integer Linear Programming 7
Thus, the fundamental idea behind cutting planes is to add constraints to a linear program
until the optimal basic feasible solution takes on integer values. Gomory cuts have the
property that they can be generated for any integer program, but has the disadvantage that the
number of constraints generated can be enormous depending upon the number of variables.
D Nagesh Kumar, IISc, Bangalore M7L1
D Nagesh Kumar, IISc Optimization Methods: M7L1
1
Integer Programming
All Integer Linear
Programming
D Nagesh Kumar, IISc Optimization Methods: M7L1
2
Objectives
¾ To discuss the need for Integer Programming (IP)
¾ To discuss about the types of IP
¾ To explain Integer Linear Programming (ILP)
¾ To discuss the Gomory Cutting Plane method for solving ILP
¾ Graphically
¾ Theoretically
D Nagesh Kumar, IISc Optimization Methods: M7L1
3
Introduction
¾ In many practical problems, the values of decision variables are
constrained to take only integer values
¾ For example, in minimization of labor needed in a project, the number of
labourers should be an integer value
¾ By rounding off a real value to an integer value have several
fundamental problems like
¾ Rounded solutions may not be feasible
¾ Even if the solutions are feasible, the objective function given by the
rounded off solutions may not be the optimal one
¾ Finally, even if the above two conditions are satisfied, checking all the
roundedoff solutions is computationally expensive (2
n
possible solutions
to be considered for an n variable problem)
¾ This demands the need for Integer Programming
D Nagesh Kumar, IISc Optimization Methods: M7L1
4
Types of IP
All Integer Programming:
All the variables are restricted to take only integer
values
Discrete Programming:
All the variables are restricted to take only discrete
values
Mixed Integer or Discrete Programming:
Only some variables are restricted to take integer or
discrete values
Zero – One Programming:
Variables are constrained to take values of either zero
or 1
D Nagesh Kumar, IISc Optimization Methods: M7L1
5
Integer Linear Programming (ILP)
¾ An extension of linear programming (LP)
¾ Additional constraint: Variables should be integer valued
¾ Standard form of an ILP:
X must be integer valued
¾ Associated linear program, dropping the integer restrictions, is
called linear relaxation (LR)
0
max
≥
≤
X
b AX to subject
X c
T
D Nagesh Kumar, IISc Optimization Methods: M7L1
6
Checks for ILP:
¾ Minimization: Optimal objective value for LR is less
than or equal to the optimal objective for ILP
¾ Maximization: Optimal objective value for LR is
greater than or equal to that of ILP
¾ If LR is infeasible, then ILP is also infeasible
¾ If LR is optimized by integer variables, then that
solution is feasible and optimal for IP
D Nagesh Kumar, IISc Optimization Methods: M7L1
7
All – Integer Programming
Most popular method: Gomory’s Cutting Plane method
Original feasible region is reduced to a new feasible region by
including additional constraints such that all vertices of the new
feasible region are now integer points
Thus, an extreme point of the new feasible region becomes an
optimal solution after accounting for the integer constraints
Consider the optimization problem
; x
1
and x
2
are integers
0 ,
45 9 3
6 2 to subject
3 Maximize
2 1
2 1
2 1
2 1
≥
≤ +
≤ −
+ =
x x
x x
x x
x x Z
D Nagesh Kumar, IISc Optimization Methods: M7L1
8
Graphical Illustration
Graphical solution for the linear approximation (neglecting the integer
requirements) is shown in figure
D Nagesh Kumar, IISc Optimization Methods: M7L1
9
Graphical Illustration …contd.
¾ Optimal value of and the solution is
¾ Red dots in the figure show the feasible solutions accounting for the
integer requirements
¾ These points are called integer lattice points
¾ Now to reduce the original feasible region to a new feasible region
(considering x
1
and x
2
as integers) is done by including additional
constraints
¾ Graphical solution for the IP is shown in figure below
¾ Two additional constraints (MN and OP) are included so that the original
feasible region ABCD is reduced to a new feasible region AEFGCD
7
4
17 = Z
7
3
3 ,
7
5
4
2 1
= = x x
D Nagesh Kumar, IISc Optimization Methods: M7L1
10
Graphical Illustration …contd.
Optimal value of ILP is and the solution is 15 = Z
3 , 4
2 1
= = x x
D Nagesh Kumar, IISc Optimization Methods: M7L1
11
Generation of Gomory Constraints
¾ Consider the final
tableau of an LP
problem consisting of n
basic variables
(original variables) and
m non basic variables
(slack variables)
¾ The basic variables are
represented as x
i
(i=1,2,…,n) and the
non basic variables are
represented as y
j
(j=1,2,…,m).
D Nagesh Kumar, IISc Optimization Methods: M7L1
12
Generation of Gomory Constraints …contd.
¾ Pick the variable having the highest fractional value. In case of a
tie, choose arbitrarily any variable as
¾ From the i
th
equation,
¾ Expressing both b
j
and c
ij
as an integer part plus a fractional part,
i
x
i
x
∑
=
− =
m
j
j ij i i
y c b x
1
ij ij ij
i i i
c c
b b
α
β
+ =
+ =
D Nagesh Kumar, IISc Optimization Methods: M7L1
13
Generation of Gomory Constraints …contd.
¾ , denote the integer part and
¾ , denote the fractional part for which and
¾ Thus, the equation becomes,
i
b
ij
c
ij
α
i
β
∑ ∑
= =
− − = −
m
j
j ij i i j
m
j
ij i
y c b x y
1 1
α β
( ) 1 0 < <
i
β
( ) 1 0 < ≤
ij
α
D Nagesh Kumar, IISc Optimization Methods: M7L1
14
Generation of Gomory Constraints …contd.
¾ Considering the integer reuirements, the RHS of the equation also
should be an integer.
¾ Thus, we have
¾ Hence, the constraint can be expressed as,
¾ After introducing a slack variable s
i
, the final Gomory constraint can be
written as,
1
1
< ≤
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
∑
=
i j
m
j
ij i
y β α β
0
1
≤ −
∑
=
j
m
j
ij i
y α β
i j
m
j
ij i
y s β α − = −
∑
=1
D Nagesh Kumar, IISc Optimization Methods: M7L1
15
Procedure for solving AllInteger LP
¾ Solve the problem as an ordinary LP problem neglecting the
integer requirements.
¾ If the optimum values of the variables are not integers, then
choose the basic variable which has the largest fractional
value, and generate Gomory constraint for that variable.
¾ Insert a new row with the coefficients of this constraint, to
the final tableau of the ordinary LP problem.
¾ Solve this by applying the dual simplex method
D Nagesh Kumar, IISc Optimization Methods: M7L1
16
Procedure for solving AllInteger LP
…contd.
¾ Check whether the new solution is allinteger or not.
¾ If all values are not integers, then a new Gomory constraint is
developed for the noninteger valued variable from the new
simplex tableau and the dual simplex method is applied again.
¾ The process is continued until
¾ An optimal integer solution is obtained or
¾ It shows that the problem has no feasible integer solution.
D Nagesh Kumar, IISc Optimization Methods: M7L1
17
Thank You
Optimization Methods: Integer Programming – Mixed Integer Programming 1
Module – 7 Lecture Notes – 2
Mixed Integer Programming
Introduction
In the previous lecture we have discussed the procedure for solving integer linear
programming in which all the decision variables are restricted to take only integer values. In a
Mixed Integer Programming (MIP) model, some of the variables are real valued and some are
integer valued. When the objective function and constraints for a MIP are all linear, then it is
a Mixed Integer Linear Program (MILP). Although Mixed Integer Nonlinear Programs
(MINLP) also exists, in this chapter we will be dealing with MILP only.
Mixed Integer Programming
In mixed integer programming (MIP), only some of the decision and slack variables are
restricted to take integer values. Gomory cutting plane method is used popularly to solve MIP
and the solution procedure is similar in many aspects to that of allinteger programming. The
first step is to solve the MIP problem as an ordinary LP problem neglecting the integer
restrictions. The procedure ends if the values of the basic variables which are constrained to
take only integer values happen to be integers in this optimal solution. If not, a Gomory
constraint is developed for the basic variable with integer restriction and has largest fractional
value which is explained below. The rest of the procedure is same as that of allinteger
programming.
Generation of Gomory Constraints:
Let be the basic variable which has integer restriction and also has largest fractional value
in the optimal solution of ordinary LP problem. Then from the i
i
x
th
equation of table,
∑
=
− =
m
j
j ij i i
y c b x
1
As explained in allinteger programming, express as an integer value plus a fractional part.
i
b
i i i
b b β + =
ij
c can be expressed as
D Nagesh Kumar, IISc, Bangalore M7L2
Optimization Methods: Integer Programming – Mixed Integer Programming 2
− +
+ =
ij ij ij
c c c
where
⎪
⎩
⎪
⎨
⎧
<
≥
=
⎪
⎩
⎪
⎨
⎧
<
≥
=
−
+
0
0 0
0 0
0
ij ij
ij
ij
ij
ij ij
ij
c if c
c if
c
c if
c if c
c
Therefore,
( ) ( )
i i i j
m
j
ij ij
x b y c c − + = +
∑
=
− +
β
1
Since is restricted to be an integer,
i
x
i
b is also an integer and 1 0 < <
i
β , the value of
( )
i i i
x b − + β can be or <0. 0 ≥
Case I: ( )
i i i
x b − + β 0 ≥
For to be an integer,
i
x ( ) ,.... 2 1 + + = − +
i i i i i i
or or x b β β β β
Therefore,
( )
i j
m
j
ij ij
y c c β ≥ +
∑
=
− +
1
Finally it takes the form
i j
m
j
ij
y c β ≥
∑
=
+
1
Case II: ( )
i i i
x b − + β <0
For to be an integer,
i
x
( ) ,.... 3 2 1
i i i i i i
or or x b β β β β + − + − + − = − +
Therefore,
( ) 1
1
− ≤ +
∑
=
− +
i j
m
j
ij ij
y c c β
D Nagesh Kumar, IISc, Bangalore M7L2
Optimization Methods: Integer Programming – Mixed Integer Programming 3
Finally it takes the form
1
1
− ≤
∑
=
−
i j
m
j
ij
y c β
Dividing this inequality by ( 1 −
i
) β and multiplying with
i
β , we have
i j
m
j
ij
i
i
y c β
β
β
≥
−
∑
=
−
1
1
Considering both cases I and II, the final form of the inequality becomes (since one of the
inequalities should be satisfied)
i j
m
j
ij
i
i
j
m
j
ij
y c y c β
β
β
≥
−
+
∑ ∑
=
−
=
+
1 1
1
Then, the Gomory constraint after introducing a slack variable is
i
s
i j
m
j
ij
i
i
j
m
j
ij i
y c y c s β
β
β
− =
−
− −
∑ ∑
=
−
=
+
1 1
1
Generate the Gomory constraint for the variables having integer restrictions. Insert this
constraint as the last row of the final tableau of LP problem and solve this using dual simplex
method. MIP techniques are useful for solving purebinary problems and any combination of
real, integer and binary problems.
D Nagesh Kumar, IISc, Bangalore M7L2
D Nagesh Kumar, IISc Optimization Methods: M7L2
1
Integer Programming
Mixed Integer Linear
Programming
D Nagesh Kumar, IISc Optimization Methods: M7L2
2
Objectives
¾ To discuss about the Mixed Integer Programming (MIP)
¾ To discuss about the Mixed Integer Linear Programming (MILP)
¾ To discuss the generation of Gomory constraints
¾ To describe the procedure for solving MILP
D Nagesh Kumar, IISc Optimization Methods: M7L2
3
Introduction
¾ Mixed Integer Programming:
¾ Some of the decision variables are real valued and some
are integer valued
¾ Mixed Integer Linear Programming:
¾ MIP with linear objective function and constraints
¾ The procedure for solving an MIP is similar to that
of All Integer LP with some exceptions in the
generation of Gomory constraints.
D Nagesh Kumar, IISc Optimization Methods: M7L2
4
Generation of Gomory Constraints
¾ Consider the final tableau of an LP problem
consisting of n basic variables (original variables)
and m non basic variables (slack variables)
¾ Let x
i
be the basic variable which has integer
restrictions
D Nagesh Kumar, IISc Optimization Methods: M7L2
5
Generation of Gomory Constraints …contd.
¾ From the i
th
equation,
¾
¾ Expressing b
j
as an integer part plus a fractional part,
¾ Expressing c
ij
as where
∑
=
− =
m
j
j ij i i
y c b x
1
i i i
b b β + =
− +
+ =
ij ij ij
c c c
⎪
⎩
⎪
⎨
⎧
<
≥
=
⎪
⎩
⎪
⎨
⎧
<
≥
=
−
+
0
0 0
0 0
0
ij ij
ij
ij
ij
ij ij
ij
c if c
c if
c
c if
c if c
c
D Nagesh Kumar, IISc Optimization Methods: M7L2
6
Generation of Gomory Constraints …contd.
¾ Thus,
¾ Since x
i
and are restricted to take integer values and also
the value of can be or <0
¾ Thus we have to consider two cases.
( ) ( )
i i i j
m
j
ij ij
x b y c c − + = +
∑
=
− +
β
1
i
b 1 0 < <
i
β
( )
i i i
x b − + β 0 ≥
D Nagesh Kumar, IISc Optimization Methods: M7L2
7
Generation of Gomory Constraints …contd.
Case I:
¾ For x
i
to be an integer,
¾ Therefore,
¾ Finally it takes the form,
( ) 0 ≥ − +
i i i
x b β
( ) ,.... 2 1 + + = − +
i i i i i i
or or x b β β β β
( )
i j
m
j
ij ij
y c c β ≥ +
∑
=
− +
1
i j
m
j
ij
y c β ≥
∑
=
+
1
D Nagesh Kumar, IISc Optimization Methods: M7L2
8
Generation of Gomory Constraints …contd.
Case II:
¾ For x
i
to be an integer,
¾ Therefore,
¾ Finally it takes the form,
( ) 0 < − +
i i i
x b β
( ) ,.... 3 2 1
i i i i i i
or or x b β β β β + − + − + − = − +
( ) 1
1
− ≤ +
∑
=
− +
i j
m
j
ij ij
y c c β
1
1
− ≤
∑
=
−
i j
m
j
ij
y c β
D Nagesh Kumar, IISc Optimization Methods: M7L2
9
Generation of Gomory Constraints …contd.
¾ Dividing this inequality by and multiplying with , we have
¾ Now considering both cases I and II, the final form of the Gomory
constraint after adding one slack variable s
i
is,
( ) 1 −
i
β
i
β
i j
m
j
ij
i
i
y c β
β
β
≥
−
∑
=
−
1
1
i j
m
j
ij
i
i
j
m
j
ij i
y c y c s β
β
β
− =
−
− −
∑ ∑
=
−
=
+
1 1
1
D Nagesh Kumar, IISc Optimization Methods: M7L2
10
Procedure for solving MixedInteger LP
¾ Solve the problem as an ordinary LP problem neglecting the
integrality constraints.
¾ Generate Gomory constraint for the fractional valued
variable that has integer restrictions.
¾ Insert a new row with the coefficients of this constraint, to
the final tableau of the ordinary LP problem.
¾ Solve this by applying the dual simplex method
¾ The process is continued for all variables that have
integrality constraints
D Nagesh Kumar, IISc Optimization Methods: M7L2
11
Thank You
Optimization Methods: Integer Programming  Examples 1
Module – 7 Lecture Notes – 3
Integer Programming  Examples
Introduction
In the previous two lectures, we have discussed about the procedures for solving integer
linear programming and also mixed integer linear programming. In this lecture we will be
discussing a few examples based on the methods already discussed.
Example of Cutting plane method for ILP:
These steps are explained using the example previously discussed.
0 ,
45 9 3
6 2 to subject
3 Maximize
2 1
2 1
2 1
2 1
≥
≤ +
≤ −
+ =
x x
x x
x x
x x Z
x
1
and x
2
are integers
The standard form for the problem can be written as
0 , , ,
45 9 3
6 2 to subject
3 Maximize
2 1 2 1
2 2 1
1 2 1
2 1
≥
= + +
= + −
+ =
y y x x
y x x
y x x
x x Z
are y and y x x
2 1 2 1
, , integers
Step 1: Solve the problem as an ordinary LP problem neglecting the integer requirements.
Table 1
Variables
Iteration Basis
Z
1
x
2
x
1
y
2
y
r
b
rs
r
c
b
Z 1 3 1 0 0 0 
1
y 0 2 1 1 0 6 3
1
2
y 0 3 9 0 1 45 15
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 2
Table 2
Variables
Iteration Basis Z
1
x
2
x
1
y
2
y
r
b
rs
r
c
b
Z 1 0
2
5
−
2
3
0 9 
1
x
0 1
2
1
−
2
1
0 3  2
2
y 0 0
2
21
2
3
− 1 36
7
24
Table 3
Variables
Iteration Basis Z
1
x
2
x
1
y
2
y
r
b
rs
r
c
b
Z 1 0 0
7
8
21
5
7
123

1
x 0 1 0
14
6
21
1
7
33
 3
2
x 0 0 1
7
1
−
21
2
7
24

Optimum value of Z is
7
123
as shown above. Corresponding values of basic variables
are
7
5
4
7
33
1
= = x ,
7
3
3
7
24
2
= = x and those of nonbasic variables are all zero
(i.e., ). The values are not integers. 0
2 1
= = y y
Step 2: Introduce Gomory constraints.
Gomory constraint is developed for which is having high fractional value. From the row
corresponding to in the last table, we can write,
1
x
1
x
2 1 1
21
1
14
6
7
33
y y x − − =
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 3
Here
21
1
0 ,
21
1
,
14
6
, 0 ,
14
6
,
7
5
, 4 ,
7
33
12 12 12 11 11 11 1
= = = = = = = = = α α β and c c c c b b
i i
.
From Eqn. Gomory constraint can be expressed as
21
1
21
1
14
6
., .
2 1 1
1 2 12 1 11 1
− = − −
− = − −
y y s e i
y y s β α α
By inserting a new row with the coefficients of this constraint to the last table, we get
Table 4
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
1
s
Z 1 0 0
7
8
21
5
0
7
123
1
x 0 1 0
14
6
21
1
0
7
33
2
x 0 0 1
7
1
−
21
2
0
7
24
1
s 0 0 0
14
6
−
21
1
− 1
7
5
−
Step 3: Solve using dual simplex method
Table 5
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
1
s
Z 1 0 0
7
8
21
5
0
7
123
1
x 0 1 0
14
6
21
1
0
7
33
2
x 0 0 1
7
1
−
21
2
0
7
24
1
s 0 0 0
14
6
−
21
1
− 1
7
5
−
Ratio  
3
8
5 
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 4
Table 6
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
1
s
Z 1 0 0 0
9
1
3
8
3
47
1
x 0 1 0 0 0 1 4
2
x 0 0 1 0
9
1
3
1
−
3
11
4
1
y 0 0 0 1
9
1
3
7
−
3
5
Optimum value of Z from the present tableau is
3
47
as shown above. Corresponding values
of basic variables are , 4
1
= x
3
11
2
= x ,
3
7
1
− = y and those of nonbasic variables are all zero
(i.e., ). Here also the values of and are not integers. 0
1 2
= = s y
2
x
1
y
Step 4: Generation of new Gomory constraint for
2
x
From the row corresponding to in the last table, we can write,
2
x
1 2 2
3
1
9
1
3
11
s y x + − =
Therefore Gomory constraint can be written as
3
2
3
1
9
1
1 2 2
− = + − s y s
Step 5: Adding this constraint to the previous table and solving using dual simplex method
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 5
Table 7
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
1
s
2
s
Z 1 0 0 0
9
1
3
8
0
3
47
1
x 0 1 0 0 0 1 0 4
2
x 0 0 1 0
9
1
3
1
− 0
3
11
1
y
0 0 0 1
9
1
3
7
− 0
3
5
2
s 0 0 0 0
9
1
− 0
3
1
3
2
−
Ratio    1

 
Table 8
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
1
s
2
s
Z 1 0 0 0 0
3
8
3
1
15
1
x 0 1 0 0 0 1 0 4
2
x 0 0 1 0 0
3
1
−
3
1
3
1
y 0 0 0 1 0
3
7
−
3
1
1
5
2
s 0 0 0 0 1 0 3 6
The solution from this tableau is 0 , 6 , 1 , 3 , 4
1 2 2 1 2 1
= = = = = = s y s y x x and the value of Z =
15. These are satisfying the integer requirement and hence the desired solution.
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 6
Example of Cutting plane method for MILP
Consider the example previously discussed with integer constraint only on .
2
x
The standard form for the problem is
0 , , ,
45 9 3
6 2 to subject
3 Maximize
2 1 2 1
2 2 1
1 2 1
2 1
≥
= + +
= + −
+ =
y y x x
y x x
y x x
x x Z
2
x should be an integer
Step 1: Solve the problem as an ordinary LP problem. The final tableau is showing the
optimal solutions are shown below.
Table 9
Variables
Iteration Basis Z
1
x
2
x
1
y
2
y
r
b
rs
r
c
b
Z 1 0 0
7
8
21
5
7
123

1
x 0 1 0
14
6
21
1
7
33
 3
2
x 0 0 1
7
1
−
21
2
7
24

Optimum value of Z is
7
123
and corresponding values of basic variables are
7
5
4
7
33
1
= = x ,
7
3
3
7
24
2
= = x and those of nonbasic variables are all zero (i.e., 0
2 1
= = y y ). This is not
satisfying the constraint of to be an integer.
2
x
Step 2: Generate Gomory constraint.
Gomory constraint is developed for .From the row corresponding to in the last table,
we can write,
2
x
2
x
1 2 2
21
2
7
1
7
24
y y x − + =
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 7
Here
21
2
,
7
1
,
7
24
22 21 2
− = = = c c b .
Since
2 2 2
β + = b b as per Eqn(), the value of 3
2
= b and
7
3
2
= β .
Similarly
− +
+ =
21 21 21
c c c and
− +
+ =
22 22 22
c c c .
Therefore,
7
1
, 0
21 21
− = =
− +
c c since
21
c is negative
0 ,
21
2
22 22
= =
− +
c c since
22
c is positive
Thus Gomory constraint can be written as
i j
m
j
ij
i
i
j
m
j
ij i
y c y c s β
β
β
− =
−
− −
∑ ∑
=
−
=
+
1 1
1
7
3
28
3
21
2
., .
1 2 2
− = − − y y s e i
Insert this constraint as the last row of the final tableau.
Table 10
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
2
s
Z 1 0 0
7
8
21
5
0
7
123
1
x 0 1 0
14
6
21
1
0
7
33
2
x 0 0 1
7
1
−
21
2
0
7
24
2
s 0 0 0
28
3
−
21
2
− 1
7
3
−
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 8
Step 3: Solve using dual simplex method
Table 11
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
2
s
Z 1 0 0
7
8
21
5
0
7
123
1
x 0 1 0
14
6
21
1
0
7
33
2
x
0 0 1
7
1
−
21
2
0
7
24
4
2
s 0 0 0
28
3
−
21
2
− 1
7
3
−
Ratio  
3
32
2.5 
Table 12
Variables
r
b
Iteration Basis Z
1
x
2
x
1
y
2
y
2
s
Z 1 0 0
8
7
0 1
2
33
1
x 0 1 0
8
3
0 1
2
9
2
x 0 0 1
4
1
− 0 1 3
4
2
y 0 0 0
8
9
1
2
21
−
2
9
Optimum value of Z from the present tableau is
2
33
as shown above. Corresponding values
of basic variables are , , 5 . 4
1
= x 3
2
= x 5 . 4
2
= y and those of nonbasic variables are all zero
(i.e., ). This solution is satisfying all the constraints. 0
2 1
= = s y
D Nagesh Kumar, IISc, Bangalore M7L3
Optimization Methods: Integer Programming  Examples 9
References/ Further Reading:
1. Hillier F.S. and G.J. Lieberman, Operations Research, CBS Publishers & Distributors,
New Delhi, 1987.
2. Kasana H.S., and Kumar K.D., Introductory Operations Research – Theory and
Applications, Springer Pvt. Ltd, New Delhi, 2003.
3. Rao, S.S., Engineering Optimization – Theory and Practice, New Age Intl. Pvt. Ltd.,
New Delhi, 1996.
4. Ravindran A., D.T. Phillips and J.J. Solberg, Operations Research – Principles and
Practice, John Wiley & Sons, New York, 2001.
5. Taha H.A., Operations Research – An Introduction, PrenticeHall of India Pvt. Ltd., New
Delhi, 2005.
D Nagesh Kumar, IISc, Bangalore M7L3
D Nagesh Kumar, IISc Optimization Methods: M7L3
1
Integer Programming
Examples
D Nagesh Kumar, IISc Optimization Methods: M7L3
2
Objectives
¾ To illustrate Gomory Cutting Plane Method for
solving
¾ All Integer linear Programming (AILP)
¾ Mixed Integer Linear Programming (MILP)
D Nagesh Kumar, IISc Optimization Methods: M7L3
3
Example Problem (AILP)
Consider the problem
x
1
, x
2
are integers
Standard form of the problem can be written as
x
1
, x
2
, y
1
and y
2
are integers
0 ,
45 9 3
6 2 to subject
3 Maximize
2 1
2 1
2 1
2 1
≥
≤ +
≤ −
+ =
x x
x x
x x
x x Z
0 , , ,
45 9 3
6 2 to subject
3 Maximize
2 1 2 1
2 2 1
1 2 1
2 1
≥
= + +
= + −
+ =
y y x x
y x x
y x x
x x Z
D Nagesh Kumar, IISc Optimization Methods: M7L3
4
Example Problem (AILP) …contd.
Optimum value of Z is and the values of basic variables are
7
123
;
7
5
4
7
33
1
= = x
7
3
3
7
24
2
= = x
Solve the problem as an ordinary LP (neglecting integer requirements)
The final tableau of LP problem is shown below
D Nagesh Kumar, IISc Optimization Methods: M7L3
5
Example Problem (AILP) …contd.
Since the values of basic variables are not integers, generate Gomory
constraint for x
1
which has a high fractional value. For this, write the
equation for x
1
from the table above
Here,
Thus, Gomory constraint can be written as
2 1 1
21
1
14
6
7
33
y y x − − =
21
1
0 ,
21
1
,
14
6
, 0 ,
14
6
,
7
5
, 4 ,
7
33
12 12 12
11 11 11
1
= = =
= = =
= = =
α
α
β
and c c
c c
b b
i i
21
1
21
1
14
6
., .
2 1 1
1 2 12 1 11 1
− = − −
− = − −
y y s e i
y y s β α α
D Nagesh Kumar, IISc Optimization Methods: M7L3
6
Example Problem (AILP) …contd.
Solve this using Dual Simplex method
Insert this constraint as a new row in the previous table
D Nagesh Kumar, IISc Optimization Methods: M7L3
7
Example Problem (AILP) …contd.
Optimum value of Z is and the values of basic variables are
and
3
47
; 4
1
= x
;
3
11
2
= x
3
7
1
− = y
D Nagesh Kumar, IISc Optimization Methods: M7L3
8
Example Problem (AILP) …contd.
Since the values of basic variable x
2
from this table is not an integer,
generate Gomory constraint for x
2
. For this, write the equation for x
2
from
the table above
Thus, Gomory constraint can be written as
Insert this constraint as a new row in the last table and solve using dual
simplex method
1 2 2
3
1
9
1
3
11
s y x + − =
3
2
3
1
9
1
1 2 2
− = + − s y s
D Nagesh Kumar, IISc Optimization Methods: M7L3
9
Example Problem (AILP) …contd.
Optimum value of Z is 15 and the values of basic variables are
x
1
= 4, x
2
= 3, y
1
= 1, s
2
= 6 and y
2
= s
1
= 0.
These are satisfying the constraints and hence the desired solution.
D Nagesh Kumar, IISc Optimization Methods: M7L3
10
Example Problem (MILP)
Consider the previous problem with integer constraint only on x
2
; x
2
is an integer
Standard form of the problem can be written as
; x
2
should be an integer
0 ,
45 9 3
6 2 to subject
3 Maximize
2 1
2 1
2 1
2 1
≥
≤ +
≤ −
+ =
x x
x x
x x
x x Z
0 , , ,
45 9 3
6 2 to subject
3 Maximize
2 1 2 1
2 2 1
1 2 1
2 1
≥
= + +
= + −
+ =
y y x x
y x x
y x x
x x Z
D Nagesh Kumar, IISc Optimization Methods: M7L3
11
Example Problem (MILP) …contd.
Optimum value of Z is and the values of basic variables are
7
123
;
7
5
4
7
33
1
= = x
7
3
3
7
24
2
= = x
Solve the problem as an ordinary LP (neglecting integer requirements)
The final tableau of LP problem is shown below
D Nagesh Kumar, IISc Optimization Methods: M7L3
12
Example Problem (MILP) …contd.
Since the value of x
2
is not an integer, generate Gomory constraint for x
2
. For
this, write the equation for x
2
from the table above
Here,
Thus, the value of and
Since, and ,
since is negative
since is positive
1 2 2
21
2
7
1
7
24
y y x − + =
21
2
,
7
1
,
7
24
22 21 2
− = = = c c b
3
2
= b
7
3
2
= β
− +
+ =
21 21 21
c c c
− +
+ =
22 22 22
c c c
7
1
, 0
21 21
− = =
− +
c c
0 ,
21
2
22 22
= =
− +
c c
21
c
22
c
D Nagesh Kumar, IISc Optimization Methods: M7L3
13
Example Problem (MILP) …contd.
Thus, Gomory constraint can be written as
Insert this constraint as a new row to the previous table and solve it using
Dual Simplex method
i j
m
j
ij
i
i
j
m
j
ij i
y c y c s β
β
β
− =
−
− −
∑ ∑
=
−
=
+
1 1
1
7
3
28
3
21
2
., .
1 2 2
− = − − y y s e i
D Nagesh Kumar, IISc Optimization Methods: M7L3
14
Optimum value of Z is and the values of basic variables are
and that of nonbasic variables are zero.
This solution is satisfying all the constraints an hence the desired.
2
33
; 5 . 4
1
= x ; 3
2
= x
5 . 4
2
= y
Example Problem (MILP) …contd.
D Nagesh Kumar, IISc Optimization Methods: M7L3
15
Thank You
Optimization Methods: Advanced Topics in Optimization  Learning Objectives
Module 8: Advanced Topics in Optimization
Learning Objectives
In the previous modules, we discussed about almost all the major techniques used for
optimization. This module gives a brief outline of some additional methods often used to
solve some typical optimization problems.
The module starts with a description of piecewise linear approximation of nonlinear
functions which will help the reader to approach the nonlinear problems to split up into linear
sub problems and solve it using the ordinary simplex method. This will be followed by a
discussion of multiobjective optimization problems, in which two methods will be explained
to deal the multiple objectives. The decomposition of larger problems into smaller ones is
illustrated in multilevel optimization. A brief outline of direct and indirect search methods
will be given next. The importance of evolutionary algorithms and steps involved will be
elaborated with special emphasis on genetic algorithms. The applications of these methods in
civil engineering will be outlined toward the end of this module.
At the end of the module the reader will be able to
1. Solve a nonlinear problem through its linear approximation
2. Solve a multiobjective problem through weighted and constrained methods
3. Acquire an idea about the various direct and indirect search methods
4. Understand evolutionary algorithms
5. Visualize advanced optimization applications in civil engineering
D Nagesh Kumar, IISc, Bangalore M8LO
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
1
Module – 8 Lecture Notes – 1
Piecewise Linear Approximation of a Nonlinear Function
Introduction
In the previous lectures, we have learned how to solve a nonlinear problem using various
methods. It is clear that unlike in linear programming, for nonlinear programming there exists
no general algorithm due to the irregular behavior of nonlinear functions. One commonly
used technique for solving nonlinear problems is to first represent the nonlinear function
(both objective function and constraints) by a set of linear functions and then apply simplex
method to solve this using some restrictions. In this lecture we will be discussing about a
method to approximate a nonlinear function using linear functions. This method can be
applied only to a single variable nonlinear function. For a nonlinear multivariable function
consisting of ‘n’ variables, this method is applicable only if the function is in separable form
i.e., can be expressed as a sum of ‘n’ single variable functions. In this lecture, only single
variable nonlinear functions are discussed.
Piecewise Linearization
Any nonlinear single variable function f(x) can be approximated by a piecewise linear
function. Geometrically, this can be shown as a curve being represented as a set of connected
line segments as shown in the figure below.
t
1
t
4
f(t
4
)
f(t
3
)
f(t
2
)
f(t
1
)
x
f(x)
t
3
t
2
D Nagesh Kumar, IISc, Bangalore M8L1
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
2
Method 1:
Consider an optimization function having only one nonlinear term f(x). Let the xaxis of the
nonlinear function f(x) be divided by ‘p’ breaking points t
1
, t
2
, t
2
, …, t
p
and the corresponding
function values be f(t
1
), f(t
2
),…, f(t
p
). Suppose if ‘x’ can take values in the interval
, then the breaking points can be shown as, X x ≤ ≤ 0
X t t t
p
≡ < < < ≡ ... 0
2 1
.
Expressing ‘x’ as a weighted average of these breaking points,
p p
t w t w t w x + + + = ...
2 2 1 1
∑
=
=
p
i
i i
t w x e i
1
., .
The function f(x) can be expressed as,
( ) ( ) ( ) ( )
( )
∑
=
=
+ + + =
p
i
i i
p p
t f w
t f w t f w t f w x f
1
2 2 1 1
...
where
∑
=
=
p
i
i
w
1
1
Finally the model can be expressed as
Max or Min ( ) ( )
∑
=
=
p
i
i i
t f w x f
1
subject to the additional constraints
∑
∑
=
=
=
=
p
i
i
p
i
i i
w
x t w
1
1
1
Linearly approximated model stated above can be solved using simplex method with some
restrictions. The restricting condition specifies that there should not be more than two ‘w
i
’ in
the basis and also two ‘w
i
’ can take positive values only if they are adjacent. This is because,
if the actual value of ‘x’ is between t
i
and t
i+1
, then ‘x’ can be represented as a weighted
D Nagesh Kumar, IISc, Bangalore M8L1
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
3
average of w
i
and w
i+1
only i.e.,
1 1 + +
+ =
i i i i
t w t w x . Therefore, the contributing weights w
i
and
w
i+1
only will be positive, rest all weights be zero.
Similarly for an objective function consisting of ‘n’ variables (‘n’ terms) represented as
Max or Min ( ) ( ) ( ) ( )
n n
x f x f x f x f + + + = ....
2 2 1 1
subjected to ‘m’ constraints
( ) ( ) ( ) m j for b x g x g x g
j n nj j j
,..., 2 , 1 ....
2 2 1 1
= ≤ + + +
The linear approximation of this problem is
n k for w
m j for b t g w to subjected
t f w Min or Max
p
i
ki
j
n
k
p
i
ki kj ki
n
k
p
i
ki k ki
,..., 2 , 1 1
,..., 2 , 1 ) (
) (
1
1 1
1 1
= =
= ≤
∑
∑∑
∑∑
=
= =
= =
Method 2:
Let ‘x’ be expressed as a sum, instead of expressing as the weighted sum of the breaking
points as in the previous method. Then,
∑
−
=
−
+ =
+ + + + =
1
1
1
1 2 1 1
....
p
i
i
p
u t
u u u t x
where is the increment of the variable ‘x’ in the interval , i.e., the bound of is
i
u ) , (
1 + i i
t t
i
u
i i i
t t u − ≤ ≤
+1
0 .
The function f(x) can be expressed as
( ) ( )
i
p
i
i
u t f x f
∑
−
=
+ =
1
1
1
α
where
i
α represents the slope of the linear approximation between the points and
given by
1 + i
t
i
t
D Nagesh Kumar, IISc, Bangalore M8L1
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
4
( ) ( )
i i
i i
i
t t
t f t f
−
−
=
+
+
1
1
α .
Finally the model can be expressed as
Max or Min ( ) ( )
i
p
i
i
u t f x f
∑
−
=
+ =
1
1
1
α
subjected to the additional constraints
1 ,...., 2 , 1 , 0
1
1
1
1
− = − ≤ ≤
= +
+
−
=
∑
p i t t u
x u t
i i i
p
i
i
Example
The example below illustrates the application of method 1.
Consider the objective function
Maximize
2
3
1
x x f + =
subject to
0
4 0
15 2 2
2
1
2
2
1
≥
≤ ≤
≤ +
x
x
x x
The problem is already in separable form (i.e., each term consists of only one variable). So
we can split up the objective function and constraint into two parts
( ) ( )
( ) ( )
2 12 1 11 1
2 2 1 1
x g x g g
x f x f f
+ =
+ =
where
( ) ( )
( ) ( )
2 2 12
2
1 1 11
2 2 2
3
1 1 1
2 ; 2
;
x x g x x g
x x f x x f
= =
= =
Since and are in linear form, they are left as such and therefore is treated
as a linear variable. Consider five breaking points for .
( )
2 2
x f ( )
2 12
x g
2
x
1
x
D Nagesh Kumar, IISc, Bangalore M8L1
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
5
Table 1
i
i
t
1
( )
i i
t f
1
( )
i i
t g
1 1
1 0 0 0
2 1 1 2
3 2 8 8
4 3 27 18
5 4 64 32
Thus, can be written as, ( )
1 1
x f
( ) ( )
64 27 8 1 0
15 14 13 12 11
5
1
1 1 1 1 1
× + × + × + × + × =
=
∑
=
w w w w w
t f w x f
i
i i
and can be written as, ( )
1 11
x g
( ) ( )
32 18 8 2 0
15 14 13 12 11
5
1
1 1 1 1 11
× + × + × + × + × =
=
∑
=
w w w w w
t g w x g
i
i i i
The linear approximation of the above problem thus becomes,
Maximize
2 15 14 13 12
64 27 8 x w w w w f + + + + =
subject to
5 ,..., 2 , 1 0
1
15 2 32 18 8 2
1
15 14 13 12 11
1 2 15 14 13 12
= ≥
= + + + +
= + + + + +
i for w
w w w w w
s x w w w w
i
This can be solved using simplex method in a restricted basis condition.
Table 2
Variables
r
b
rs
r
c
b
Iteration Basis f
11
w
12
w
13
w
14
w
15
w
2
x
1
s
f 1 0 1 8 27 64 1 0 0 
1
s 0 0 2
8
18 32 2 1 15 1.87
1
11
w 0 1 1 1 1 1 0 0 1 1
D Nagesh Kumar, IISc, Bangalore M8L1
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
6
From the table above, it is clear that should be the entering variable. For that should
be the exiting variable. But according to restricted basis condition and cannot occur
together in basis as they are not adjacent. Therefore, consider the next best entering
variable . This also is not possible, since should be exited and and cannot occur
together. Again, considering the next best variable , it is clear that should be the
exiting variable.
15
w
1
s
15
w
11
w
14
w
1
s
14
w
11
w
13
w
11
w
Table 3
Variables
r
b
rs
r
c
b
Iteration Basis f
11
w
12
w
13
w
14
w
15
w
2
x
1
s
f 1 8 7 0 19 56 1 0 8 
1
s 0 8 6 0 10 24 2 1 7 3
1
13
w
0 1 1 1 1 1 0 0 1 15
For the table 2 above, the entering variable is . Then the variable to be exited is and this
is not acceptable since is not an adjacent point to . Next variable can be admitted
by dropping .
15
w
1
s
15
w
13
w
14
w
1
s
Table 4
Variables
r
b
rs
r
c
b
Iteration Basis f
11
w
12
w
13
w
14
w
15
w
2
x
1
s
f 1 7.2 4.4 0 0 10.4 4.8 1.9 21.3 
14
w 0 0.8 0.6 0 1 2.4 0.2 0.1 0.7
1
13
w
0 1.8 1.6 1 0 1.4 0.2 0.1 0.3
D Nagesh Kumar, IISc, Bangalore M8L1
Optimization Methods: Advanced Topics in Optimization  Piecewise linear
approximation of a nonlinear function
7
Now, cannot be admitted since cannot be dropped. Similarly and cannot be
entered as cannot be dropped. Thus, the process ends at this point and the last table gives
the best solution.
15
w
14
w
11
w
12
w
13
w
7 . 0 ; 3 . 0
14 13
= = w w
Now,
7 . 2
3 2
14 13
5
1
1 1 1
=
× + × =
=
∑
=
w w
t w x
i
i i
0
2
= x and
The optimum value of . 3 . 21 = f
This may be an approximate solution to the original nonlinear problem. However, the
solution can be improved by taking finer breaking points.
D Nagesh Kumar, IISc, Bangalore M8L1
D Nagesh Kumar, IISc Optimization Methods: M8L1
1
Advanced Topics in Optimization
Piecewise Linear
Approximation of a
Nonlinear Function
D Nagesh Kumar, IISc Optimization Methods: M8L1
2
Introduction and Objectives
Introduction
¾ There exists no general algorithm for nonlinear programming due to its
irregular behavior
¾ Nonlinear problems can be solved by first representing the nonlinear
function (both objective function and constraints) by a set of linear
functions and then apply simplex method to solve this using some
restrictions
Objectives
¾ To discuss the various methods to approximate a nonlinear function
using linear functions
¾ To demonstrate this using a numerical example
D Nagesh Kumar, IISc Optimization Methods: M8L1
3
Piecewise Linearization
¾ A nonlinear single variable
function f(x) can be
approximated by a piecewise
linear function
¾ Geometrically, f(x) can be
shown as a curve being
represented as a set of
connected line segments
D Nagesh Kumar, IISc Optimization Methods: M8L1
4
Piecewise Linearization: Method 1
¾ Consider an optimization function having only one nonlinear
term f(x)
¾ Let the xaxis of the nonlinear function f(x) be divided by ‘p’
breaking points t
1
, t
2
, t
2
, …, t
p
¾ Corresponding function values be f(t
1
), f(t
2
),…, f(t
p
)
¾ If ‘x’ can take values in the interval , then the breaking
points can be shown as
X x ≤ ≤ 0
X t t t
p
≡ < < < ≡ ... 0
2 1
D Nagesh Kumar, IISc Optimization Methods: M8L1
5
Piecewise Linearization: Method 1 …contd.
¾ Express ‘x’ as a weighted average of these breaking points
¾ Function f(x) can be expressed as
where
p p
t w t w t w x + + + = ...
2 2 1 1
∑
=
=
p
i
i i
t w x e i
1
., .
( ) ( ) ( ) ( ) ( )
∑
=
= + + + =
p
i
i i p p
t f w t f w t f w t f w x f
1
2 2 1 1
...
∑
=
=
p
i
i
w
1
1
D Nagesh Kumar, IISc Optimization Methods: M8L1
6
Piecewise Linearization: Method 1 …contd.
¾ Finally the model can be expressed as
subject to the additional constraints
( ) ( )
∑
=
=
p
i
i i
t f w x f Min or Max
1
∑
∑
=
=
=
=
p
i
i
p
i
i i
w
x t w
1
1
1
D Nagesh Kumar, IISc Optimization Methods: M8L1
7
Piecewise Linearization: Method 1 …contd.
¾ This linearly approximated model can be solved using simplex method
with some restrictions
¾ Restricted condition:
¾ There should not be more than two ‘w
i
’ in the basis and
¾ Two ‘w
i
’ can take positive values only if they are adjacent. i.e., if ‘x’ takes
the value between t
i
and t
i+1
, then only w
i
and w
i+1
(contributing weights to
the value of ‘x’) will be positive, rest all weights be zero
¾ In general, for an objective function consisting of ‘n’ variables (‘n’ terms)
represented as
( ) ( ) ( ) ( )
n n
x f x f x f x f Min or Max + + + = ....
2 2 1 1
D Nagesh Kumar, IISc Optimization Methods: M8L1
8
Piecewise Linearization: Method 1 …contd.
¾ subjected to ‘m’ constraints
¾ The linear approximation of this problem is
( ) ( ) ( ) m j for b x g x g x g
j n nj j j
,..., 2 , 1 ....
2 2 1 1
= ≤ + + +
n k for w
m j for b t g w to subjected
t f w Min or Max
p
i
ki
j
n
k
p
i
ki kj ki
n
k
p
i
ki k ki
,..., 2 , 1 1
,..., 2 , 1 ) (
) (
1
1 1
1 1
= =
= ≤
∑
∑∑
∑∑
=
= =
= =
D Nagesh Kumar, IISc Optimization Methods: M8L1
9
Piecewise Linearization: Method 2
¾ ‘x’ is expressed as a sum, instead of expressing as the weighted
sum of the breaking points as in the previous method
where u
i
is the increment of the variable ‘x’ in the interval i.e.,
the bound of u
i
is
¾ The function f(x) can be expressed as
¾ where represents the slope of the linear approximation between the
points and
∑
−
=
−
+ = + + + + =
1
1
1 1 2 1 1
....
p
i
i p
u t u u u t x
) , (
1 + i i
t t
i i i
t t u − ≤ ≤
+1
0
( ) ( )
i
p
i
i
u t f x f
∑
−
=
+ =
1
1
1
α
i
α
i
t
1 + i
t
( ) ( )
i i
i i
i
t t
t f t f
−
−
=
+
+
1
1
α
D Nagesh Kumar, IISc Optimization Methods: M8L1
10
Piecewise Linearization: Method 2 …contd.
¾ Finally the model can be expressed as
subjected to additional constraints
( ) ( )
i
p
i
i
u t f x f Min or Max
∑
−
=
+ =
1
1
1
α
1 ,...., 2 , 1 , 0
1
1
1
1
− = − ≤ ≤
= +
+
−
=
∑
p i t t u
x u t
i i i
p
i
i
D Nagesh Kumar, IISc Optimization Methods: M8L1
11
Piecewise Linearization: Numerical
Example
¾ The example below illustrates the application of method 1
¾ Consider the objective function
¾ subject to
¾ The problem is already in separable form (i.e., each term consists of
only one variable).
2
3
1
x x f Maximize + =
0
4 0
15 2 2
2
1
2
2
1
≥
≤ ≤
≤ +
x
x
x x
D Nagesh Kumar, IISc Optimization Methods: M8L1
12
Piecewise Linearization: Numerical Example
…contd.
¾ Split up the objective function and constraint into two parts
where
¾ and are treated as linear variables as they are in linear
form
( ) ( )
( ) ( )
2 12 1 11 1
2 2 1 1
x g x g g
x f x f f
+ =
+ =
( ) ( )
( ) ( )
2 2 12
2
1 1 11
2 2 2
3
1 1 1
2 ; 2
;
x x g x x g
x x f x x f
= =
= =
( )
2 2
x f ( )
2 12
x g
D Nagesh Kumar, IISc Optimization Methods: M8L1
13
Piecewise Linearization: Numerical Example
…contd.
¾ Consider five breaking points for x
1
¾ can be written as,
( )
1 1
x f
( ) ( )
64 27 8 1 0
15 14 13 12 11
5
1
1 1 1 1 1
× + × + × + × + × =
=
∑
=
w w w w w
t f w x f
i
i i
D Nagesh Kumar, IISc Optimization Methods: M8L1
14
Piecewise Linearization: Numerical Example
…contd.
¾ can be written as,
¾ Thus, the linear approximation of the above problem becomes
subject to
( )
1 11
x g
( ) ( )
32 18 8 2 0
15 14 13 12 11
5
1
1 1 1 1 11
× + × + × + × + × =
=
∑
=
w w w w w
t g w x g
i
i i i
2 15 14 13 12
64 27 8 x w w w w f Maximize + + + + =
5 ,..., 2 , 1 0
1
15 2 32 18 8 2
1
15 14 13 12 11
1 2 15 14 13 12
= ≥
= + + + +
= + + + + +
i for w
w w w w w
s x w w w w
i
D Nagesh Kumar, IISc Optimization Methods: M8L1
15
Piecewise Linearization: Numerical Example
…contd.
¾ This can be solved using simplex method in a restricted basis condition
¾ The simplex tableau is shown below
D Nagesh Kumar, IISc Optimization Methods: M8L1
16
Piecewise Linearization: Numerical Example
…contd.
¾ From the table, it is clear that should be the entering variable
¾ should be the exiting variable
¾ But according to restricted basis condition and cannot occur
together in basis as they are not adjacent
¾ Therefore, consider the next best entering variable
¾ This also is not possible, since should be exited and and
cannot occur together
¾ The next best variable , it is clear that should be the exiting
variable
15
w
1
s
15
w
11
w
14
w
1
s
14
w
11
w
13
w
11
w
D Nagesh Kumar, IISc Optimization Methods: M8L1
17
Piecewise Linearization: Numerical Example
…contd.
¾ The entering variable is . Then the variable to be exited is and
this is not acceptable since is not an adjacent point to
¾ Next variable can be admitted by dropping .
¾ The simplex tableau is shown below
15
w
1
s
15
w
13
w
14
w
1
s
D Nagesh Kumar, IISc Optimization Methods: M8L1
18
Piecewise Linearization: Numerical Example
…contd.
¾ Now, cannot be admitted since cannot be dropped
¾ Similarly and cannot be entered as cannot be dropped
¾ The simplex tableau is shown below
15
w
14
w
11
w
12
w
13
w
D Nagesh Kumar, IISc Optimization Methods: M8L1
19
Piecewise Linearization: Numerical Example
…contd.
¾ Since there is no more variable to be entered, the process ends
¾ Therefore, the best solution is
¾ Now,
¾ The optimum value is
¾ This may be an approximate solution to the original nonlinear problem
¾ However, the solution can be improved by taking finer breaking points
7 . 0 ; 3 . 0
14 13
= = w w
7 . 2 3 2
14 13
5
1
1 1 1
= × + × = =
∑
=
w w t w x
i
i i
0
2
= x and
3 . 21 = f
D Nagesh Kumar, IISc Optimization Methods: M8L1
20
Thank You
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 1
Module – 8 Lecture Notes – 2
Multiobjective Optimization
Introduction
In a real world problem it is very unlikely that we will meet the situation of single objective
and multiple constraints more often than not. Thus the rigidity provided by the General
Problem (GP) is, many a times, far away from the practical design problems. In many of the
water resources optimization problems maximizing aggregated net benefits is a common
objective. At the same time maximizing water quality, regional development, resource
utilization, and various social issues are other objectives which are to be maximized. There
may be conflicting objectives along with the main objective like irrigation, hydropower,
recreation etc. Generally multiple objectives or parameters have to be met before any
acceptable solution can be obtained. Here it should be noticed that the word “acceptable”
implicates that there is normally no single solution to the problems of the above type.
Actually methods of multicriteria or multiobjective analysis are not designed to identify the
best solution, but only to provide information on the tradeoffs between given sets of
quantitative performance criteria.
In the present discussion on multiobjective optimization, we will first introduce the
mathematical definition and then talk about two broad classes of solution methods typically
known as (i) Utility Function Method (Weighting function method) (ii) Bounded Objective
Function Method (Reduced Feasible Region Method or Constraint Method ).
Multiobjective Problem
A multiobjective optimization problem with inequality (or equality) constraints may be
formulated as
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 2
Find (1)
⎪
⎪
⎪
⎪
⎭
⎪
⎪
⎪
⎪
⎬
⎫
⎪
⎪
⎪
⎪
⎩
⎪
⎪
⎪
⎪
⎨
⎧
=
n
x
x
x
X
.
.
.
2
1
which minimizes f
1
(X), f
2
(X), … , f
k
(X) (2)
subject to
j= 1, 2 , … , m (3) , 0 ) ( ≤ X g
j
Here k denotes the number of objective functions to be minimized and m is the number of
constraints. It is worthwhile to mention that objective functions and constraints need not be
linear but when they are, it is called Multiobjective Linear Programming (MOLP).
For the problems of the type mentioned above the very notion of optimization changes and
we try to find good tradeoffs rather than a single solution as in GP. The most commonly
adopted notion of the “optimum” proposed by Pareto is depicted below.
A vector of the decision variable X is called Pareto Optimal (efficient) if there does not exist
another Y such that for i = 1, 2, … , k with ) ( ) ( X f Y f
i i
≤ ) ( ) ( X f Y f
i j
< for at least one j. In
other words a solution vector X is called optimal if there is no other vector Y that reduces
some objective functions without causing simultaneous increase in at least one other
objective function.
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 3
k
i
j
Fig. 1
As shown in above figure there are three objectives i, j, k. Direction of their increment is also
indicated. The surface (which is formed based on constraints) is efficient because no
objective can be reduced without a simultaneous increase in at least one of the other
objectives.
Utility Function Method (Weighting function method)
In this method a utility function is defined for each of the objectives according to the relative
importance of f
i..
A simple utility function may be defined as α
i
f
i
(X) for i
th
objective where α
i
is a scalar and represents the weight assigned to the corresponding objective. Then the total
utility U may be defined as weighted sum of objective functions as below
U = α , ) (
1
∑
=
k
i
i i
X f α
i
> 0, i = 1, 2, … , k. (4)
The solution vector X may be found by maximizing the total utility as defined above with the
constraint (3).
Without any loss to generality, it is customary to assume that although it is not
essential. Also α
1
1
=
∑
=
k
i
i
α
i
values indicate the relative utility of each of the objectives.
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 4
The following figure represents the decision space for a given set of constraints and utility
functions. Here X = and two objectives are f
⎥
⎦
⎤
⎢
⎣
⎡
2
1
x
x
1
(X) and f
2
(X) with upper bound
constraints* of type (3) as in figure 2.
g
1
(X)
g
2
(X)
g
3
(X)
g
4
(X)
g
5
(X)
g
6
(X)
x
2
A
B
C
D
E
O
x
1
Decision Space
Fig. 2
*constraints g
1
(X) to g
6
(X) represent x
1 ,
x
2
≥0
For Linear Programming (LP), the Pareto front is obtained by plotting the values of objective
functions at common points (points of intersection) of constraints and joining them through
straight lines in objective space.
It should be noted that all the points on the constraint surface need not be efficient in Pareto
sense as point A in the following figure.
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 5
A
B
C
D
E
f
2
f
1
Objective Space
Fig. 3
By looking at Figure 3 one may qualitatively infer that it follows Pareto Optimal definition.
Now optimizing utility function means moving along the efficient front and looking for the
maximum value of utility function U defined by equation (4).
One major limitation is that this method cannot generate the complete set of efficient
solutions unless the efficiency frontier is strictly convex. If a part of it is concave, only the
end points of this can be obtained by the weighing technique.
Bounded objective function method
In this method we try to trap the optimal solution of the objective functions in a bounded or
reduced feasible region. In formulating the problem one objective function is maximized
while all other objectives are converted into constraints with lower bounds along with other
constraints of the problem. Mathematically the problem may be formulated as
Maximize f
i
(X)
Subject to , 0 ) ( ≤ X g
j
j= 1, 2 , … , m (5)
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 6
f
k
(X) e ≥
k
∀ i k ≠
here e
k
represents lower bound of the k
th
objective. In this approach the feasible region S
represented by , 0 ) ( ≤ X g
j
j= 1, 2 , … , m is further reduced to S’ by (k1) constraints
f
k
(X) e ≥
k
. ∀ i k ≠
e.g. let there are three objectives which are to be maximized in the region of constraints S.
The problem may be formulated as:
maximize{objective1}
maximize{objective2}
maximize{objective3}
subject to X =
⎥
⎦
⎤
⎢
⎣
⎡
2
1
x
x
∈ S
In the above problem S identifies the region given by , 0 ) ( ≤ X g
j
j= 1, 2 , … , m.
In the bounded objective function method, the same problem may be formulated as
maximize{objective1}
subject to
{objective2} e ≥
1
{objective3} e ≥
2
X ∈ S
As may be seen, one of the objectives ({objective1}) is now the only objective and all other
objectives are included as constraints. There are lower bounds specified for other objectives
which are the minimum values at least to be attained. Subject to these additional constraints,
the objective is maximized. Figure 4 illustrates the scheme.
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 7
x
2
w
1
w
2
w
3
S
S’
A
B
C
D
E
e
1
e
2
P
x
1
F
Fig. 4
In the above figure w
1
, w
2
, and w
3
are gradients of the three objectives respectively. If
{objective1} was to be maximized in the region S, without taking into consideration the
other objectives, then solution point is E. But due to lower bounds of the other objectives the
feasible region reduces to S’ and solution point is P now. It may be seen that changing e
1
does not affect {objective1} as much as changing e
2
. This fact gives rise to sensitivity
analysis.
Exercise Problem
A reservoir is planned both for gravity and lift irrigation through withdrawals from its
storage. The total storage available for both the uses is limited to 5 units each year. It is
decided to limit the gravity irrigation withdrawals in a year to 4 units. If X
1
is the allocation
of water for gravity irrigation and X
2
is the allocation for lift irrigation, the two objectives
planned to be maximized are expressed as
Maximize Z
1
(X) = 3x
1
 2x
2
and Z
2
(X) =  x
1
+ 4x
2
D Nagesh Kumar, IISc, Bangalore M8L2
Optimization Methods: Advanced Topics in Optimization  Multiobjective Optimization 8
For above problem, do the following
(i) Generate a Pareto Front of noninferior (efficient) solutions by plotting Decision space and
Objective space.
(ii) Formulate multi objective optimization model using weighting approach with w
1
and w
2
as weights for gravity and lift irrigation respectively.
(iii) Solve it, for (i) w
1
=1 and w
2
=2 (ii) w
1
=2 and w
2
=1
(iv) Formulate the problem using constraint method
[Solution: (i) X
1
=0, X
2
=5; (ii) X
1
=4, X
2
=0 to 1 ]
D Nagesh Kumar, IISc, Bangalore M8L2
D Nagesh Kumar, IISc Optimization Methods: M8L2
1
Advanced Topics in Optimization
Multi Objective
Optimization
D Nagesh Kumar, IISc Optimization Methods: M8L2
2
Introduction
Introduction
¾ In a real world problem it is very unlikely that we will meet the
situation of single objective and multiple constraints more often
than not
¾ There may be conflicting objectives along with the main
objective like irrigation, hydropower, recreation etc.
¾ Generally multiple objectives or parameters have to be met
before any acceptable solution can be obtained.
¾ Multicriteria or multiobjective analysis are not designed to
identify the best solution, but only to provide information on the
tradeoffs.
D Nagesh Kumar, IISc Optimization Methods: M8L2
3
Multiobjective Problem
¾ A multiobjective optimization problem with inequality (or equality)
constraints may be formulated as
Find (1)
which minimizes f
1
(X), f
2
(X), …, f
k
(X) (2)
subject to j= 1, 2 , …, m (3)
¾ Here k denotes the number of objective functions to be minimized and m
is the number of constraints.
⎪
⎪
⎪
⎪
⎭
⎪
⎪
⎪
⎪
⎬
⎫
⎪
⎪
⎪
⎪
⎩
⎪
⎪
⎪
⎪
⎨
⎧
=
n
x
x
x
X
.
.
.
2
1
, 0 ) ( ≤ X g
j
D Nagesh Kumar, IISc Optimization Methods: M8L2
4
Pareto Optimal Front
¾ A vector of the decision variable X is called Pareto
Optimal (efficient) if there does not exist another Y such
that for i = 1, 2, …, k with for at
least one j
¾ In other words a solution vector X is called optimal if
there is no other vector Y that reduces some objective
functions without causing simultaneous increase in at
least one other objective function.
¾ For the problems of the type mentioned above the very
notion of optimization changes and we try to find good
tradeoffs rather than a single solution as in GP.
) ( ) ( X f Y f
i i
≤
) ( ) ( X f Y f
i j
<
D Nagesh Kumar, IISc Optimization Methods: M8L2
5
Pareto Optimal Front…
¾ As shown in above figure
there are three objectives i, j,
k. Direction of their increment
is also indicated.
¾ The surface (which is formed
based on constraints) is
efficient because no objective
can be reduced without a
simultaneous increase in at
least one of the other
objectives.
D Nagesh Kumar, IISc Optimization Methods: M8L2
6
Utility Function Method (Weighting
function method)
¾ In this method a utility function is defined for each of the
objectives according to the relative importance of f
i
.
¾ A simple utility function may be defined as α
i
f
i
(X) for ith
objective where α
i
is a scalar and represents the weight
assigned to the corresponding objective.
¾ Total utility U may be defined as weighted sum of
objective functions as below
α
i
> 0, i = 1, 2, …, k. (4)
¾ Without any loss in generality it is customary to assume
that
, ) (
1
∑
=
k
i
i i
X f α
1
1
=
∑
=
k
i
i
α
D Nagesh Kumar, IISc Optimization Methods: M8L2
7
Utility Function Method…
¾ Figure represents decision
space for a given set of
constraints and utility
functions.
¾ Here X = and two objectives
are f
1
(X) and f
2
(X) with upper
bound constraints* of type (3)
as in figure 2.
¾ Pareto front is obtained by
plotting the values of objective
functions at common points
(points of intersection) of
constraints.
g
1
(X)
g
2
(X)
g
3
(X)
g
4
(X)
g
5
(X)
g
6
(X)
x
2
2
A
B
C
D
E
O
Decision Space
D Nagesh Kumar, IISc Optimization Methods: M8L2
8
Utility Function Method…
¾ It should be noted that all the
points on the constraint surface
need not be efficient in Pareto
sense as point A in the following
figure.
¾ By looking at figure one may
qualitatively infer that it follows
Pareto Optimal definition.
¾ Now optimizing utility function
means moving along efficient front
and looking for the maximum value
of utility function U defined by
equation (4).
A
B
C
D
E
f
2
D Nagesh Kumar, IISc Optimization Methods: M8L2
9
Bounded objective function method
¾ In this method we try to trap the optimal solution of the objective
functions in a bounded or reduced feasible region.
¾ In formulating the problem one objective function is maximized
while all other objectives are converted into constraints with
lower bounds along with other constraints of the problem.
¾ Mathematically the problem may be formulated as
Maximize f
i
(X)
Subject to
j = 1, 2 , …, m (5)
f
k
(X) e
k
here e
k
represents lower bound on the kth objective.
, 0 ) ( ≤ X g
j
≥ ∀ i k ≠
D Nagesh Kumar, IISc Optimization Methods: M8L2
10
Bounded objective function method…
¾ In this approach the feasible region S represented by j=
1, 2 , …, m is further reduced to S’ by (k1) constraints f
k
(X)
e
k
.
¾ e.g. let there are three objectives which are to be maximized in
region of constraints S.
¾ Problem may be formulated
maximize{objective1}
maximize{objective2}
maximize{objective3}
subject to
X = S
¾ In above problem S identifies the region given by j= 1, 2
, …, m.
, 0 ) ( ≤ X g
j
∀
, 0 ) ( ≤ X g
j
∈
≥
⎥
⎦
⎤
⎢
⎣
⎡
2
1
x
x
D Nagesh Kumar, IISc Optimization Methods: M8L2
11
Bounded objective function method…
¾ In bounded objective function
method, same problem may be
formulated as
maximize{objective1}
subject to
{objective2} e1
{objective3} e2
X S
¾ As may be seen that one of the
objectives ({objective1}) is now
the only objective and all other
objectives are included as the
constraints.
∈
≥
≥
x
2
w
1
w
2
w
3
S
S’
A
B
C
D
E
e
1
e
2
P
D Nagesh Kumar, IISc Optimization Methods: M8L2
12
Bounded objective function method…
¾ In previous figure w
1
, w
2
, and w
3
are gradients of the
three objectives respectively.
¾ If {objective1} was to be maximized in region S
without taking into consideration other objectives
then solution point had been E.
¾ But due to lower bound on other objectives the
feasible region reduces to S’ and solution point is P
now.
¾ It may be seen that changing e
1
does not affect
{objective1} as much as changing e
2
. This fact gives
rise to sensitivity analysis.
D Nagesh Kumar, IISc Optimization Methods: M8L2
13
Exercise Problem
¾ A reservoir is planned both for gravity and lift irrigation through
withdrawals from its storage. The total storage available for both the
uses is limited to 5 units each year. It is decided to limit the gravity
irrigation withdrawals in a year to 4 units. If X1 is the allocation of
water to gravity irrigation and X2 is the allocation for lift irrigation, two
objectives are planned to be maximized and are expressed as
Maximize Z
1
(X) = 3x
1
 2x
2
and Z
2
(X) =  x
1
+ 4x
2
For above problem do the following
(i) Generate a Pareto Front of noninferior (efficient) solutions by plotting
Decision space and Objective space.
(ii) Formulate multi objective optimization model using weighting approach
with w
1
and w
2
as weights for gravity and lift irrigation respectively.
(iii) Solve it, if (a) w
1
=1 and w
2
=2 (b) w
1
=2 and w
2
=1
(iv) Formulate the problem using constraint method
[Solution: (i) x
1
=0, x
2
=5; (ii) x
1
=4, x
2
=0 to 1 ]
D Nagesh Kumar, IISc Optimization Methods: M8L2
14
Thank You
Optimization Methods: Advanced Topics in Optimization  Multilevel Optimization 1
Module – 8 Lecture Notes – 3
Multilevel Optimization
Introduction
The example problems discussed in the previous modules consist of very few decision
variables and constraints. However in practical situations, one has to handle an optimization
problem involving a large number of variables and constraints. Solving such a problem will
be quite cumbersome. In multilevel optimization, such large sized problems are decomposed
into smaller independent problems and the overall optimum solution can be obtained by
solving each subproblem independently. In this lecture a decomposition method for
nonlinear optimization problems, known as modelcoordination method will be discussed.
Model Coordination Method
Consider a minimization optimization problem consisting of n variables, . ) (x F
n
x x x ,..., ,
2 1
) ,..., , (
2 1 n
x x x F Min
subjected to constraints
n i ux x lx
m j x x x g
i i i
n j
,..., 2 , 1
,..., 2 , 1 , 0 ) ,..., , (
2 1
= ≤ ≤
= ≤
where and represents the lower and upper bounds of the decision variable .
i
lx
i
ux
i
x
Let be the decision variable vector. For applying the model coordination
method, the vector X should be divided into two subvectors, Y and Z such that Y contains the
coordination variables between the subsystems i.e., variables that are common to the
subproblems and Z vector contains the free or confined variables of subproblems. If the
problem is partitioned into ‘P’ subproblems, then vector Z can also be partitioned into ‘P’
variable sets, each set corresponding to each subproblem.
{
n
x x x X ,..., ,
2 1
= }
⎪
⎪
⎭
⎪
⎪
⎬
⎫
⎪
⎪
⎩
⎪
⎪
⎨
⎧
=
P
Z
Z
Z
Z
M
2
1
Thus the objective function can be partitioned into ‘P’ parts as shown, ) (x F
D Nagesh Kumar, IISc, Bangalore M8L3
Optimization Methods: Advanced Topics in Optimization  Multilevel Optimization 2
( )
∑
=
=
P
k
k k
Z Y f x F
1
, ) (
where denotes the objective function of the k (
k k
Z Y f , )
th
subproblem. In this the coordination
variable Y will appear in all subobjective functions and will appear only in k
k
Z
th
sub
objective function.
Similarly the constraints can be decomposed as
P k for Z Y g
k k
,..., 2 , 1 0 ) , ( = ≤
The lower and upper bound constraints are
P k for uZ Z lZ
uY Y lY
k k k
,..., 2 , 1 = ≤ ≤
≤ ≤
The problem thus decomposed is solved using a two level approach which is described
below.
Procedure:
First level:
Fix the value of the coordination variables, Y at some value, say . Then solve each
independent subproblem and find the value of .
opt
Y
k
Z
( )
k k
Z Y f Min ,
subject to
P k for uZ Z lZ
uY Y lY
Z Y g
k k k
k k
,..., 2 , 1
0 ) , (
= ≤ ≤
≤ ≤
≤
Let the values of obtained by solving this problem be .
k
Z
opt k
Z
Second level:
Now consider the problem after substituting the values.
opt k
Z
( )
∑
=
=
P
k
opt k k
Z Y f Y f Min
1
, ) (
subject to uY Y lY ≤ ≤
D Nagesh Kumar, IISc, Bangalore M8L3
Optimization Methods: Advanced Topics in Optimization  Multilevel Optimization 3
Solve this problem to find a new . Again solve the first level problems. This process is
repeated until convergence is achieved.
opt
Y
D Nagesh Kumar, IISc, Bangalore M8L3
D Nagesh Kumar, IISc Optimization Methods: M8L3
1
Advanced Topics in Optimization
Multilevel
Optimization
D Nagesh Kumar, IISc Optimization Methods: M8L3
2
Objectives
¾ To discuss about Multilevel Optimization
¾ To describe a decomposition method for nonlinear
optimization problems, known as modelcoordination
method
D Nagesh Kumar, IISc Optimization Methods: M8L3
3
Introduction
¾ In practical situations, an optimization problem involves a large
number of variables and constraints
¾ In multilevel optimization, such large sized problems are
decomposed into smaller independent problems
¾ The overall optimum solution is obtained by solving each sub
problem independently
D Nagesh Kumar, IISc Optimization Methods: M8L3
4
Model Coordination Method
¾ Consider an minimization optimization problem
consisting of n variables,
¾ subjected to constraints
¾ where and represents the lower and upper bound of
the decision variable
¾ Decision variable vector:
) (x F
n
x x x ,..., ,
2 1
n i ux x lx
m j x x x g
i i i
n j
,..., 2 , 1
,..., 2 , 1 , 0 ) ,..., , (
2 1
= ≤ ≤
= ≤
i
lx
i
ux
i
x
{ }
n
x x x X ,..., ,
2 1
=
D Nagesh Kumar, IISc Optimization Methods: M8L3
5
Model Coordination Method …contd.
¾ For applying model coordination method, the vector X should be
divided into two subvectors, Y and Z
¾ Y contains the coordination variables between the subsystems i.e.,
variables that are common to the subproblems
¾ Z vector contains the free or confined variables of subproblems
¾ If the problem is partitioned into ‘P’ subproblems, then vector Z can
also be partitioned into ‘P’ variable sets, each set corresponding to
each subproblem
⎪
⎪
⎭
⎪
⎪
⎬
⎫
⎪
⎪
⎩
⎪
⎪
⎨
⎧
=
P
Z
Z
Z
Z
Μ
2
1
D Nagesh Kumar, IISc Optimization Methods: M8L3
6
Model Coordination Method …contd.
¾ Thus the objective function can be partitioned into ‘P’
parts
where denotes the objective function of the k
th
sub
problem
¾ The coordination variable Y will appear in all subobjective
functions and Z
k
will appear only in k
th
subobjective function
) (x F
( )
∑
=
=
P
k
k k
Z Y f x F
1
, ) (
( )
k k
Z Y f ,
D Nagesh Kumar, IISc Optimization Methods: M8L3
7
Model Coordination Method …contd.
¾ Similarly the constraints are also decomposed as
¾ The lower and upper bound constraints are
¾ The problem is decomposed and solved using a two level
approach
P k for Z Y g
k k
,..., 2 , 1 0 ) , ( = ≤
P k for uZ Z lZ
uY Y lY
k k k
,..., 2 , 1 = ≤ ≤
≤ ≤
D Nagesh Kumar, IISc Optimization Methods: M8L3
8
Model Coordination Method: Procedure
¾ First level:
¾ Fix the value of the coordination variables, Y at some value,
say Y
opt
¾ Solve each independent subproblem and find the value of Z
k
subject to
( )
k k
Z Y f Min ,
P k for uZ Z lZ
uY Y lY
Z Y g
k k k
k k
,..., 2 , 1
0 ) , (
= ≤ ≤
≤ ≤
≤
D Nagesh Kumar, IISc Optimization Methods: M8L3
9
Model Coordination Method: Procedure …contd.
¾ Let the values of Z
k
obtained by solving this problem be Z
kopt
¾ Second level:
¾ Now consider the problem after substituting the Z
kopt
values
¾ subject to
( )
∑
=
=
P
k
opt k k
Z Y f Y f Min
1
, ) (
uY Y lY ≤ ≤
D Nagesh Kumar, IISc Optimization Methods: M8L3
10
Model Coordination Method: Procedure …contd.
¾ Solve this problem to find a new Y
opt
¾ Again solve the first level problems
¾ This process is repeated until convergence is achieved
D Nagesh Kumar, IISc Optimization Methods: M8L3
11
Thank You
Optimization Methods: Advanced Topics in Optimization  Direct and Indirect Search
Methods
1
Module – 8 Lecture Notes – 4
Direct and Indirect Search Methods
Introduction
Most of the real world system models involve nonlinear optimization with complicated
objective functions or constraints for which analytical solutions (solutions using quadratic
programming, geometric programming, etc.) are not available. In such cases one of the
possible solutions is the search algorithm in which, the objective function is first computed
with a trial solution and then the solution is sequentially improved based on the
corresponding objective function value till convergence. A generalized flowchart of the
search algorithm in solving a nonlinear optimization with decision variable X
i
, is presented in
Fig. 1.
Fig. 1 Flowchart of Search Algorithm
No
Start with Trial
Solution X
i
, Set i=1
Compute Objective
function f(X
i
)
Generate new
solution X
i+1
Compute Objective
function f(X
i+1
)
Convergence Check
Set i=i+1
Optimal Solution
X
opt
=X
i
Yes
D Nagesh Kumar, IISc, Bangalore M8L4
Optimization Methods: Advanced Topics in Optimization  Direct and Indirect Search
Methods
2
The search algorithms can be broadly classified into two types: (1) direct search algorithm
and (2) indirect search algorithm. A direct search algorithm for numerical search optimization
depends on the objective function only through ranking a countable set of function values. It
does not involve the partial derivatives of the function and hence it is also called nongradient
or zeroth order method. Indirect search algorithm, also called the descent method, depends on
the first (firstorder methods) and often second derivatives (secondorder methods) of the
objective function. A brief overview of the direct search algorithm is presented.
Direct Search Algorithm
Some of the direct search algorithms for solving nonlinear optimization, which requires
objective functions, are described below:
A) Random Search Method: This method generates trial solutions for the optimization model
using random number generators for the decision variables. Random search method includes
random jump method, random walk method and random walk method with direction
exploitation. Random jump method generates huge number of data points for the decision
variable assuming a uniform distribution for them and finds out the best solution by
comparing the corresponding objective function values. Random walk method generates trial
solution with sequential improvements which is governed by a scalar step length and a unit
random vector. The random walk method with direct exploitation is an improved version of
random walk method, in which, first the successful direction of generating trial solutions is
found out and then maximum possible steps are taken along this successful direction.
B) Grid Search Method: This methodology involves setting up of grids in the decision space
and evaluating the values of the objective function at each grid point. The point which
corresponds to the best value of the objective function is considered to be the optimum
solution. A major drawback of this methodology is that the number of grid points increases
exponentially with the number of decision variables, which makes the method
computationally costlier.
C) Univariate Method: This procedure involves generation of trial solutions for one decision
variable at a time, keeping all the others fixed. Thus the best solution for a decision variable
D Nagesh Kumar, IISc, Bangalore M8L4
Optimization Methods: Advanced Topics in Optimization  Direct and Indirect Search
Methods
3
keeping others constant can be obtained. After completion of the process with all the decision
variables, the algorithm is repeated till convergence.
D) Pattern Directions: In univariate method the search direction is along the direction of co
ordinate axis which makes the rate of convergence very slow. To overcome this drawback,
the method of pattern direction is used, in which, the search is performed not along the
direction of the coordinate axes but along the direction towards the best solution. This can be
achieved with Hooke and Jeeves’ method or Powell’s method. In the Hooke and Jeeves’
method, a sequential technique is used consisting of two moves: exploratory move and the
pattern move. Exploratory move is used to explore the local behavior of the objective
function, and the pattern move is used to take advantage of the pattern direction. Powell’s
method is a direct search method with conjugate gradient, which minimizes the quadratic
function in a finite number of steps. Since a general nonlinear function can be approximated
reasonably well by a quadratic function, conjugate gradient minimizes the computational time
to convergence.
E)Rosen Brock’s Method of Rotating Coordinates: This is a modified version of Hooke and
Jeeves’ method, in which, the coordinate system is rotated in such a way that the first axis
always orients to the locally estimated direction of the best solution and all the axes are made
mutually orthogonal and normal to the first one.
F) Simplex Method: Simplex method is a conventional direct search algorithm where the best
solution lies on the vertices of a geometric figure in Ndimensional space made of a set of
N+1 points. The method compares the objective function values at the N+1 vertices and
moves towards the optimum point iteratively. The movement of the simplex algorithm is
achieved by reflection, contraction and expansion.
Indirect Search Algorithm
The indirect search algorithms are based on the derivatives or gradients of the objective
function. The gradient of a function in Ndimensional space is given by:
D Nagesh Kumar, IISc, Bangalore M8L4
Optimization Methods: Advanced Topics in Optimization  Direct and Indirect Search
Methods
4
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦
⎤
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣
⎡
∂
∂
∂
∂
∂
∂
= ∇
N
x
f
x
f
x
f
f
.
.
.
2
1
(1)
Indirect search algorithms include:
A) Steepest Descent (Cauchy) Method: In this method, the search starts from an initial trial
point X1, and iteratively moves along the steepest descent directions until the optimum point
is found. Although, the method is straightforward, it is not applicable to the problems having
multiple local optima. In such cases the solution may get stuck at local optimum points.
B) Conjugate Gradient (FletcherReeves) Method: The convergence technique of the steepest
descent method can be greatly improved by using the concept of conjugate gradient with the
use of the property of quadratic convergence.
C) Newton’s Method: Newton’s method is a very popular method which is based on Taylor’s
series expansion. The Taylor’s series expansion of a function f(X) at X=X
i
is given by:
( ) ( ) ( ) ( ) [ ](
i i
T
i i
T
i i
X X J X X X X f X f X f − − + − ∇ + =
2
1
) (2)
where, [J
i
]=[J]x
i
, is the Hessian matrix of f evaluated at the point X
i.
Setting the partial
derivatives of Eq. (2), to zero, the minimum value of f(X) can be obtained.
( )
N j
x
X f
j
,..., 2 , 1 , 0 = =
∂
∂
(3)
D Nagesh Kumar, IISc, Bangalore M8L4
Optimization Methods: Advanced Topics in Optimization  Direct and Indirect Search
Methods
5
From Eq. (2) and (3)
[ ]( ) 0 = − + ∇ = ∇
i i i
X X J f f (4)
Eq. (4) can be solved to obtain an improved solution X
i+1
[ ]
i i i i
f J X X ∇ − =
−
+
1
1
(5)
The procedure is repeated till convergence for finding out the optimal solution.
D) Marquardt Method: Marquardt method is a combination method of both the steepest
descent algorithm and Newton’s method, which has the advantages of both the methods,
movement of function value towards optimum point and fast convergence rate. By modifying
the diagonal elements of the Hessian matrix iteratively, the optimum solution is obtained in
this method.
E) QuasiNewton Method: QuasiNewton methods are wellknown algorithms for finding
maxima and minima of nonlinear functions. They are based on Newton's method, but they
approximate the Hessian matrix, or its inverse, in order to reduce the amount of computation
per iteration. The Hessian matrix is updated using the secant equation, a generalization of the
secant method for multidimensional problems.
It should be noted that the above mentioned algorithms can be used for solving only
unconstrained optimization. For solving constrained optimization, a common procedure is the
use of a penalty function to convert the constrained optimization problem into an
unconstrained optimization problem. Let us assume that for a point X
i
, the amount of
violation of a constraint is δ. In such cases the objective function is given by:
( ) ( )
2
δ λ × × + = M X f X f
i i
(6)
where, λ=1( for minimization problem) and 1 ( for maximization problem), M=dummy
variable with a very high value. The penalty function automatically makes the solution
inferior where there is a violation of constraint.
D Nagesh Kumar, IISc, Bangalore M8L4
Optimization Methods: Advanced Topics in Optimization  Direct and Indirect Search
Methods
6
Summary
Various methods for direct and indirect search algorithms are discussed briefly in the present
class. The models are useful when no analytical solution is available for an optimization
problem. It should be noted that when there is availability of an analytical solution, the search
algorithms should not be used, because analytical solution gives a global optima whereas,
there is always a possibility that the numerical solution may get stuck at local optima.
D Nagesh Kumar, IISc, Bangalore M8L4
D Nagesh Kumar, IISc Optimization Methods: M8L4
1
Advanced Topics in Optimization
Direct and Indirect
Search Methods
D Nagesh Kumar, IISc Optimization Methods: M8L4
2
Introduction
Real World Problems
Nonlinear
Optimization
Complicated
Objective Function
Analytical Solution
Possible Solution:
Search Algorithm
D Nagesh Kumar, IISc Optimization Methods: M8L4
3
Flowchart for Search Algorithm
Start with Trial Solution X
i
, Set i=1
Compute Objective function f(X
i
)
Generate new solution X
i+1
Compute Objective function f(X
i+1
)
Convergence Check
Optimal Solution, X
opt
=X
i
Yes
Set i=i+1
No
D Nagesh Kumar, IISc Optimization Methods: M8L4
4
Classification of Search Algorithm
Search Algorithm
Direct Search Algorithm
•Considers only objective
function
•Partial derivatives of
objective function: not
considered
•Called nongradient or
zeroth order method
Indirect Search Algorithm
•Partial derivatives of objective
function are considered
•Also called descent method
D Nagesh Kumar, IISc Optimization Methods: M8L4
5
Direct Search Algorithm
Direct Search
Algorithm
Random Search Method
Grid Search Method
Pattern Directions
Univariate Method
Rosen Brock’s Method
Simplex Method
D Nagesh Kumar, IISc Optimization Methods: M8L4
6
Direct Search Algorithm (Contd..)
Random Search Method:
z Generates trial solution for the decision variables.
z Classification: Random jump, random walk, and random walk
with direction exploitation.
z Random Jump: generates huge number of data points
assuming uniform distribution of decision variables and selects
the best one
z Random Walk: generates trial solution with sequential
improvements using scalar step length and unit random vector.
z Random Walk with Direction Exploitation: Improved version of
random walk search, successful direction of generating trial
solution is found out and steps are taken along this direction.
D Nagesh Kumar, IISc Optimization Methods: M8L4
7
Direct Search Algorithm (Contd..)
Grid Search Method
z Methodology involves setting up grids in the decision
space.
z Objective function values are evaluated at the grid
points.
z The point corresponding to the best objective
function value considered as optimum solution.
z Major Drawback: number of grid points increases
exponentially with the number of decision variables.
D Nagesh Kumar, IISc Optimization Methods: M8L4
8
Direct Search Algorithm (Contd..)
Univariate Method:
z Generates trial solution for one decision variable
keeping all others fixed.
z Best solution for each of the decision variables
keeping others constant are obtained.
z The whole process is repeated iteratively till
convergence.
D Nagesh Kumar, IISc Optimization Methods: M8L4
9
Pattern Directions:
z In Univariate method, search direction is same as coordinate
axes directions.
z Makes the convergence process slow.
z In pattern directions, search is performed not along the
coordinate directions, but along the direction towards the best
solution.
z Popular Methods: Hooke and Jeeves’ Method, and Powells
method.
z Hooke and Jeeves’ Method: uses exploratory move and pattern
move.
z Powells method: uses conjugate gradient
Direct Search Algorithm (Contd..)
D Nagesh Kumar, IISc Optimization Methods: M8L4
10
Direct Search Algorithm (Contd..)
Rosen Brock’s Method of Rotating Coordinates:
zModified version of Hooke and Jeeves’ Method.
zCoordinate system is rotated in such a way that the first axis
always orients to the locally estimated direction of the best solution
and all the axes are made mutually orthogonal and normal to the
first one.
Simplex Method
zConventional direct search algorithm.
zThe best solution lies on the vertices of a geometric figure in N
dimensional space made of a set of N+1 points.
zThe method compares the objective function values at the N+1
vertices and moves towards the optimum point iteratively.
zMovement of the simplex algorithm: reflection, contraction and
expansion.
D Nagesh Kumar, IISc Optimization Methods: M8L4
11
Indirect Search Algorithm
Indirect
Search
Algorithm
Steepest Descent Method
Conjugate Gradient Method
Newton’s Method
QuasiNewton Method
Marquardt Method
D Nagesh Kumar, IISc Optimization Methods: M8L4
12
Indirect Search Algorithm (Contd..)
Steepest Descent Method:
z Search starts from an initial trial point X
1
z Iteratively moves along the steepest descent
direction until optimum point is found.
z Drawback: Solution may get stuck to a local optima.
Conjugate Gradient Method
z Convergence technique uses the concept of
conjugate gradient
z Uses the properties of quadratic convergence
D Nagesh Kumar, IISc Optimization Methods: M8L4
13
Indirect Search Algorithm (Contd..)
Newton’s Method:
z Based on Taylor series expansion.
[J
i
]=[J]x
i
is the Hessian Matrix
z Setting the partial derivatives of the objective function to zero,
minimum f(x) can be obtained
z From both the Eq.
z The improved solution is given by
z Process continues till convergence
( ) ( ) ( ) ( ) [ ]( )
i i
T
i i
T
i i
X X J X X X X f X f X f − − + − ∇ + =
2
1
( )
N j
x
X f
j
,..., 2 , 1 , 0 = =
∂
∂
[ ]( ) 0 = − + ∇ = ∇
i i i
X X J f f
[ ]
i i i i
f J X X ∇ − =
−
+
1
1
D Nagesh Kumar, IISc Optimization Methods: M8L4
14
Indirect Search Algorithm (Contd..)
Marquardt Method:
z Combination of both steepest descent algorithm and Newton’s
method
z By modifying the diagonal elements of Hessian matrix
iteratively optimum solution is obtained
QuasiNewton Method
z Based on Newton’s method
z They approximate the Hessian matrix, or its inverse, in order to
reduce the amount of computation per iteration.
z The Hessian matrix is updated using the secant equation, a
generalization of the secant method for multidimensional
problems
D Nagesh Kumar, IISc Optimization Methods: M8L4
15
Constrained Optimization
z Search algorithms cannot be directly applied to
constrained optimization.
z Constrained optimization can be converted into
unconstrained optimization using penalty function
when there is a constraint violation.
λ=1( for minimization problem) and 1 ( for
maximization problem), M=dummy variable with a
very high value
( ) ( )
2
δ λ × × + = M X f X f
i i
Penalty
Function
D Nagesh Kumar, IISc Optimization Methods: M8L4
16
Summary
z Nonlinear optimization with complicated objective
functions or constraints: Can be solved by search
algorithm.
z Care should be taken so that the search should not
get stuck at local optima.
z Search algorithms are not directly applicable to
constrained optimization
z Penalty functions can be used to convert constrained
optimization into unconstrained optimization
D Nagesh Kumar, IISc Optimization Methods: M8L4
17
Thank You
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
1
Lecture Notes – 5
Evolutionary Algorithms for Optimization and Search
Introduction
Most real world optimization problems involve complexities like discrete, continuous or
mixed variables, multiple conflicting objectives, nonlinearity, discontinuity and nonconvex
region. The search space (design space) may be so large that global optimum cannot be found
in a reasonable time. The existing linear or nonlinear methods may not be efficient or
computationally inexpensive for solving such problems. Various stochastic search methods
like simulated annealing, evolutionary algorithms (EA) or hill climbing can be used in such
situations. EAs have the advantage of being applicable to any combination of complexities
(multiobjective, nonlinearity etc) and also can be combined with any existing local search
or other methods. Various techniques which make use of EA approach are Genetic
Algorithms (GA), evolutionary programming, evolution strategy, learning classifier system
etc. All these EA techniques operate mainly on a population search basis. In this lecture
Genetic Algorithms, the most popular EA technique, is explained.
Concept
EAs start from a population of possible solutions (called individuals) and move towards the
optimal one by applying the principle of Darwinian evolution theory i.e., survival of the
fittest. Objects forming possible solution sets to the original problem is called phenotype and
the encoding (representation) of the individuals in the EA is called genotype. The mapping of
phenotype to genotype differs in each EA technique. In GA which is the most popular EA,
the variables are represented as strings of numbers (normally binary). If each design variable
is given a string of length ‘l’, and there are n such variables, then the design vector will have
a total string length of ‘nl’. For example, let there are 3 design variables and the string length
be 4 for each variable. The variables are 1 7 , 4
3 2 1
= = = x and x x . Then the chromosome
length is 12 as shown in the figure.
0 1 0 0 0 1 1 1 0 0 0 1
1
x
2
x
3
x
D Nagesh Kumar, IISc, Bangalore M8L5
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
2
An individual consists a genotype and a fitness function. Fitness represents the quality of the
solution (normally called fitness function). It forms the basis for selecting the individuals and
thereby facilitates improvements.
The pseudo code for a simple EA is given below
i = 0
Initialize population P
0
Evaluate initial population
while ( ! termination condition)
{
i = i+1
Perform competitive selection
Create population P
i
from P
i1
by recombination and mutation
Evaluate population P
i
}
A flowchart indicating the steps of a simple genetic algorithm is shown below.
D Nagesh Kumar, IISc, Bangalore M8L5
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
3
Generate Initial Population
Start
Encode Generated Population
Evaluate Fitness Functions
Meets
Optimization
Criteria?
Best
Individuals
Yes
Stop
Selection (select parents)
Mutation (mutate offsprings)
Crossover (selected parents)
No
R
E
G
E
N
E
R
A
T
I
O
N
The initial population is usually generated randomly in all EAs. The termination condition
may be a desired fitness function, maximum number of generations etc. In selection,
individuals with better fitness functions from generation ‘i' are taken to generate individuals
of ‘i+1’
th
generation. New population (offspring) is created by applying recombination and
mutation to the selected individuals (parents). Recombination creates one or two new
individuals by swaping (crossing over) the genome of a parent with another. Recombined
individual is then mutated by changing a single element (genome) to create a new individual.
D Nagesh Kumar, IISc, Bangalore M8L5
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
4
Finally, the new population is evaluated and the process is repeated. Each step is described in
more detail below.
Parent Selection
After fitness function evaluation, individuals are distinguished based on their quality.
According to Darwin's evolution theory the best ones should survive and create new offspring
for the next generation. There are many methods to select the best chromosomes, for example
roulette wheel selection, Boltzman selection, tournament selection, rank selection, steady
state selection and others. Two of these are briefly described, namely, roulette wheel
selection and rank selection:
Roulette Wheel Selection:
Parents are selected according to their fitness i.e., each individual is selected with a
probability proportional to its fitness value. In other words, depending on the percentage
contribution to the total population fitness, string is selected for mating to form the next
generation. This way, weak solutions are eliminated and strong solutions survive to form the
next generation. For example, consider a population containing four strings shown in the
table below. Each string is formed by concatenating four substrings which represents
variables a,b,c and d. Length of each string is taken as four bits. The first column represents
the possible solution in binary form. The second column gives the fitness values of the
decoded strings. The third column gives the percentage contribution of each string to the total
fitness of the population. Then by "Roulette Wheel" method, the probability of candidate 1
being selected as a parent of the next generation is 28.09%. Similarly, the probability that the
candidates 2, 3, 4 will be chosen for the next generation are 19.59, 12.89 and 39.43
respectively. These probabilities are represented on a pie chart, and then four numbers are
randomly generated between 1 and 100. Then, the likeliness that the numbers generated
would fall in the region of candidate 2 might be once, whereas for candidate 4 it might be
twice and candidate 1 more than once and for candidate 3 it may not fall at all. Thus, the
strings are chosen to form the parents of the next generation.
D Nagesh Kumar, IISc, Bangalore M8L5
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
5
Candidate Fitness value Percentage of total fitness
1011 0110 1101 1001 109 28.09
0101 0011 1110 1101 76 19.59
0001 0001 1111 1011 50 12.89
1011 1111 1011 1100 153 39.43
Total 388 100
Rank Selection:
The previous type of selection may have problems when the fitnesses differ very much. For
example, if the best chromosome fitness is 90% of the entire roulette wheel then the other
chromosomes will have very few chances to be selected. Rank selection first ranks the
population and then every chromosome receives fitness from this ranking. The worst will
have fitness 1, second worst 2 etc. and the best will have fitness N (number of chromosomes
in population). By this, all the chromosomes will have a chance to be selected. But this
method can lead to slower convergence, because the best chromosomes may not differ much
from the others.
Crossover
Selection alone cannot introduce any new individuals into the population, i.e., it cannot find
new points in the search space. These are generated by geneticallyinspired operators, of
which the most well known are crossover and mutation.
Crossover can be of either onepoint or twopoint scheme. In one point crossover, selected
pair of strings is cut at some random position and their segments are swapped to form new
pair of strings. In twopoint scheme, there will be two break points in the strings that are
randomly chosen. At the breakpoint, the segments of the two strings are swapped so that
D Nagesh Kumar, IISc, Bangalore M8L5
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
6
new set of strings are formed. For example, let us consider two 8bit strings given by
'10011101' and '10101011'.
Then according to onepoint crossover, if a random crossover point is chosen after 3 bits from
left and segments are cut as shown below:
100  11101
101  01011
and the segments are swapped to form
10001011
10111101
According to twopoint crossover, if two crossover points are selected as
100  11  101
101  01  011
Then after swapping both the extreme segments, the resulting strings formed are
10001101
10111011
Crossover is not usually applied to all pairs of individuals selected for mating. A random
choice is made, where the probability of crossover being applied is typically between 0.6 and
0.9.
Mutation
Mutation is applied to each child individually after crossover. It randomly alters each gene
with a small probability (generally not greater than 0.01). It injects a new genetic character
into the chromosome by changing at random a bit in a string depending on the probability of
mutation.
Example: 10111011
D Nagesh Kumar, IISc, Bangalore M8L5
Optimization Methods: Advanced Topics in Optimization  Evolutionary Algorithms for
Optimization and Search
7
is mutated as 10111111
It is seen in the above example that the sixth bit '0' is changed to '1'. Thus, in mutation
process, bits are changed from '1' to '0' or '0' to '1' at the randomly chosen position of
randomly selected strings.
Realcoded GAs
As explained earlier, GAs work with a coding of variables i.e., with a discrete search space.
GAs have also been developed to work directly with continuous variables. In these cases,
binary strings are not used. Instead, the variables are directly used. After the creation of
population of random variables, a reproduction operator can be used to select good strings in
the population.
Advantages and Disadvantages of EA:
EA can be efficiently used for highly complex problems with multiobjectivity, nonlinearity
etc. It provides not only a single best solution, but the 2
nd
best, 3
rd
best and so on as required.
It gives quick approximate solutions. EA methods can very well incorporate with other local
search algorithms.
There are some drawbacks also in using EA techniques. An optimal solution cannot be
ensured on using EA methods, which are usually known as heuristic search methods.
Convergence of EA techniques are problem oriented. Sensitivity analysis should be carried
out to find out the range in which the model is efficient. Also, the implementation of these
techniques requires good programming skill.
D Nagesh Kumar, IISc, Bangalore M8L5
D Nagesh Kumar, IISc Optimization Methods: M8L5
1
Advanced Topics in Optimization
Evolutionary Algorithms for
Optimization and Search
D Nagesh Kumar, IISc Optimization Methods: M8L5
2
Introduction
¾ Real world optimization problems mostly involve complexities like
discretecontinuous or mixed variables, multiple conflicting objectives,
nonlinearity, discontinuity and nonconvex region
¾ Global optimum cannot be found in a reasonable time due to the large
search space
¾ For such problems, existing linear or nonlinear methods may not be
efficient
¾ Various stochastic search methods like simulated annealing,
evolutionary algorithms (EA), hill climbing can be used in such
situations
D Nagesh Kumar, IISc Optimization Methods: M8L5
3
Introduction
¾ Among these techniques, the special advantage of EA’s are
¾ Can be applied to any combination of complexities (multiobjective,
nonlinearity etc) and also
¾ Can be combined with any existing local search or other methods
¾ Various techniques which make use of EA approach
¾ Genetic Algorithms (GA), Evolutionary Programming, Evolution
Strategy, Learning Classifier System etc.
¾ EA techniques operate mainly on a population search basis.
D Nagesh Kumar, IISc Optimization Methods: M8L5
4
Objectives
¾ To discuss the basic concept of Evolutionary Algorithms (EA)
¾ To explain the basic steps for a simple EA like
¾ Parent Selection
¾ Cross over
¾ Mutation
¾ To discuss the advantages and disadvantages of EA
D Nagesh Kumar, IISc Optimization Methods: M8L5
5
Basic Concept of EA
EAs start from a population of possible solutions (called individuals)
and move towards the optimal one by applying the principle of
Darwinian evolution theory i.e., survival of the fittest
Objects forming possible solution sets to the original problem is called
phenotype
The encoding (representation) or the individuals in the EA is called
genotype
The mapping of phenotype to genotype differs in each EA technique
D Nagesh Kumar, IISc Optimization Methods: M8L5
6
Basic Concept of EA …contd.
In GA, variables are represented as strings of numbers (normally binary)
Let the number of design variables be n
Let each design variable is given by a string of length ‘l
Then the design vector will have a total string length ‘nl’
For example, if the string length be 4 for each design variable and there
are 3 design variables,
Then the chromosome length is 12
as shown
1 7 , 4
3 2 1
= = = x and x x
D Nagesh Kumar, IISc Optimization Methods: M8L5
7
Basic Concept of EA …contd.
In GA, variables are represented as strings of numbers (normally binary)
Let the number of design variables be n
Let each design variable is given by a string of length ‘l
Then the design vector will have a total length ‘nl’
For example, if the string length be 4 and there are 3 design variables,
Then the chromosome of length 12 is
1 7 , 4
3 2 1
= = = x and x x
D Nagesh Kumar, IISc Optimization Methods: M8L5
8
Basic Concept of EA …contd.
An individual consists of a genotype and a fitness function
Fitness Function:
Represents the quality of the solution
Forms the basis for selecting the individuals and thereby
facilitates improvements
D Nagesh Kumar, IISc Optimization Methods: M8L5
9
Basic Concept of EA …contd.
Pseudo code for a simple EA
D Nagesh Kumar, IISc Optimization Methods: M8L5
10
Basic Concept
of EA …contd.
Flowchart indicating the
steps of a simple
genetic algorithm
D Nagesh Kumar, IISc Optimization Methods: M8L5
11
Basic Concept of EA …contd.
Initial population is randomly generated
Individuals with better fitness functions from generation ‘i' are taken to
generate individuals of ‘i+1’
th
generation
New population (offspring) is created by applying recombination and
mutation to the selected individuals (parents)
Finally, the new population is evaluated and the process is repeated
The termination condition may be a desired fitness function, maximum
number of generations etc
D Nagesh Kumar, IISc Optimization Methods: M8L5
12
Parent Selection
Individuals are distinguished based on their fitness function value
According to Darwin's evolution theory the best ones should
survive and create new offspring for the next generation
Different methods are available to select the best chromosomes
Roulette wheel selection, Rank selection, Boltzman selection,
Tournament selection, Steady state selection
D Nagesh Kumar, IISc Optimization Methods: M8L5
13
Parent Selection: Roulette wheel selection
Each individual is selected with a probability proportional to its
fitness value
In other words, an individual is selected depending on the
percentage contribution to the total population fitness
Thus, weak solutions are eliminated and strong solutions survive
to form the next generation
D Nagesh Kumar, IISc Optimization Methods: M8L5
14
Parent Selection: Roulette wheel selection …contd.
Each string is formed by concatenating four substrings representing
variables a, b, c and d. Length of each string is taken as four bits
Consider a population containing four strings shown
D Nagesh Kumar, IISc Optimization Methods: M8L5
15
Parent Selection: Roulette wheel selection …contd.
First column represents the possible solution in binary form
Second column gives the fitness values of the decoded strings
Third column gives the percentage contribution of each string to the total
fitness of the population
Thus, the probability of selection of candidate 1, as a parent of the next
generation is 28.09%
Probabilities of other candidates 2, 3, 4 are 19.59, 12.89 and 39.43
respectively
D Nagesh Kumar, IISc Optimization Methods: M8L5
16
Parent Selection: Roulette wheel selection …contd.
These probabilities are represented on a pie chart
Then four numbers are randomly generated between 1 and 100
The likeliness of these numbers falling in the region of candidate 2 might
be once, whereas for candidate 4 it might be twice and candidate 1 more
than once and for candidate 3 it may not fall at all
Thus, the strings are chosen to form the parents of the next generation
The main disadvantage of this method is when the fitnesses differ very
much
For example, if the best chromosome fitness is 90% of the entire roulette
wheel then the other chromosomes will have very few chances to be
selected
D Nagesh Kumar, IISc Optimization Methods: M8L5
17
Parent Selection: Rank Selection
Population is ranked first
Every chromosome will be allotted with one fitness corresponding to this
ranking
The worst will have fitness 1, second worst 2 etc. and the best will have
fitness N (number of chromosomes in population)
By doing this, all the chromosomes have a chance to be selected
But this method can lead to slower convergence, because the best
chromosomes may not differ much from the others
D Nagesh Kumar, IISc Optimization Methods: M8L5
18
Parent Selection
Through selection new individuals cannot get introduced into the
population
Selection cannot find new points in the search space
New individuals are generated by geneticallyinspired operators
known are crossover and mutation.
D Nagesh Kumar, IISc Optimization Methods: M8L5
19
Crossover
Crossover can be of either onepoint or twopoint scheme
One point crossover: Selected pair of strings is cut at some random
position and their segments are swapped to form new pair of strings
Consider two 8bit strings given by '10011101' and '10101011'
Choose a random crossover point after 3 bits from left
Segments are swapped and the resulting strings are
D Nagesh Kumar, IISc Optimization Methods: M8L5
20
Crossover …contd.
Two point crossover: There will be two break points in the strings that
are randomly chosen
At the breakpoint the segments of the two strings are swapped so that
new set of strings are formed
If two crossover points are selected as
After swapping both the extreme segments, the resulting strings formed
are
D Nagesh Kumar, IISc Optimization Methods: M8L5
21
Mutation
Mutation is applied to each child individually after crossover
Randomly alters each gene with a small probability (generally not
greater than 0.01)
Injects a new genetic character into the chromosome by changing at
random a bit in a string depending on the probability of mutation
Example: 10111011 is mutated as
10111111
Sixth bit '0' is changed to '1‘
In mutation process, bits are changed from '1' to '0' or '0' to '1' at the
randomly chosen position of randomly selected strings
D Nagesh Kumar, IISc Optimization Methods: M8L5
22
Advantages and Disadvantages of EA:
Advantages
¾ EA can be efficiently used for highly complex problems with
multiobjectivity, nonlinearity etc
¾ Provides not only a single best solution, but the 2
nd
best, 3
rd
best and so on as required.
¾ Gives quick approximate solutions
¾ Can incorporate with other local search algorithms
D Nagesh Kumar, IISc Optimization Methods: M8L5
23
Advantages and Disadvantages of EA:
Disadvantages
¾ Optimal solution cannot be ensured on using EA methods
¾ Convergence of EA techniques are problem oriented
¾ Sensitivity analysis should be carried out to find out the range
in which the model is efficient
¾ Implementation requires good programming skill
D Nagesh Kumar, IISc Optimization Methods: M8L5
24
Thank You
Optimization Methods: Advanced Topics in Optimization  Applications in Civil
Engineering
1
Module – 8 Lecture Notes – 6
Applications in Civil Engineering
Introduction
In this lecture we will discuss some applications of multiobjective optimization and
evolutionary algorithms in civil engineering.
Water quality management, waste load allocation
Waste Load Allocation (WLA) in streams refers to the determination of required pollutant
treatment levels at a set of point sources of pollution, to ensure that water quality standards
are maintained throughout the stream. The stakeholders involved in a waste load allocation
are the Pollution Control Agency (PCA) and the dischargers (municipal and industrial) who
are discharging waste into the stream. The goals of the PCA are to improve the water quality
throughout the stream whereas that of the dischargers is to reduce the treatment cost of the
pollutants. Therefore a waste load allocation model can be viewed as a multiobjective
optimization model with conflicting objectives. If the fractional removal level of the pollutant
is denoted by x and the concentration of water quality indicator (e.g., Dissolved Oxygen) is
denoted by c, then the following optimization model can be formulated:
c Maximize
(1)
x Minimize
(2)
) (x f c =
(3)
Eq. (3) represents the relationship between the water quality indicator and the fractional
removal levels of the pollutants. It should be noted that the relationship between c and x may
be nonlinear and therefore linear programming may not be applicable. In such cases the
applications of evolutionary algorithm is a possible solution. Interested readers may refer to
Tung and Hathhorn (1989), Sasikumar and Mujumdar (1998), and Mujumdar and Subbarao
(2004).
D Nagesh Kumar, IISc, Bangalore M8L6
Optimization Methods: Advanced Topics in Optimization  Applications in Civil
Engineering
2
Reservoir Operation
In reservoir operation problems, to achieve the best possible performance of the system,
decisions need to be taken on releases and storages over a period of time considering the
variations in inflows and demands. The goals of a multipurpose reservoir operation problem
can be:
A) Flood control
B) Hydropower generation
C) Meeting irrigation demand
D) Maintaining downstream water quality
Therefore deriving the operation policy for a multipurpose reservoir can be considered as a
multiobjective optimization problem. A typical reservoir operation problem is characterized
by the uncertainty resulting from the random behavior of inflow and demand, incorporation
of which in terms of risk may lead to a nonlinear optimization problem. Application of
evolutionary algorithms is a possible solution for such problems. Interested readers may refer
to Janga Reddy and Nagesh Kumar (2007), Nagesh Kumar and Janga Reddy (2007).
Water Distribution Systems
The typical goals of water distribution systems problem in designing urban pipe system can
be:
A) Meeting the household demands.
B) Minimizing cost of pipe system.
C) Meeting the required water pressure at all nodes of the distribution system.
D) Optimal positioning of valves.
Therefore designing urban water distribution system is a multiobjective problem, which is
also characterized by nonlinearity resulting from the simulation model (e.g., Hardy Cross
method). Multiobjective techniques with search algorithm or evolutionary algorithm are
therefore used for solving such problems. Apart from these, determination of optimum
D Nagesh Kumar, IISc, Bangalore M8L6
Optimization Methods: Advanced Topics in Optimization  Applications in Civil
Engineering
3
dosage of chlorine is also another important problem which is highly nonlinear because of the
nonlinear water quality simulation model. Evolutionary algorithms are successfully applied
for such problem in various case studies by different researchers.
Transportation Engineering
Evolutionary algorithm has become a useful tool for solving many problems in transportation
systems engineering. The problem, to efficiently move empty or laden containers for a
logistic company or Truck and Trailer Vehicle Routing Problem (TTVRP), is one among the
many potential research problems in transportation systems engineering. A general model for
TTVRP, consisting of a number of job orders to be served by trucks and trailers daily, is
constructed for a logistic company that provides transportation services for container
movement within the country. Due to the limited capacity of vehicles owned by the company,
the engineers of the company have to decide whether to assign the job orders of container
movement to its internal fleet of vehicles or to outsource the jobs to
other companies. The solution to the TTVRP consists of finding a complete routing schedule
for serving the jobs with  1. minimum routing distance and 2. minimum number of trucks,
subject to a number of constraints such as time windows and availability of trailers.
Multiobjective evolutionary algorithm can be used to solve such models. Applications of
evolutionary algorithm in solving transportation problems can be found in Lee et al. (2003).
References / Further Reading:
1. Deb K., MultiObjective Optimization using Evolutionary Algorithms, First Edition, John
Wiley & Sons Pte Ltd, 2002.
2. Deb K., Optimization for Engineering Design – Algorithms and Examples, Prentice Hall
of India Pvt Ltd, New Delhi, 1995.
3. Dorigo M., and Stutzle T., Ant Colony Optimization, Prentice Hall of India Pvt Ltd, New
Delhi, 2005.
4. Loucks, D.P., J.R. Stedinger, and D.A. Haith, Water Resources Systems Planning and
Analysis, Prentice – Hall, N.J., 1981.
5. Mays, L.W. and K. Tung, Hydrosystems Engineering and Management, McGrawHill
Inc., New York, 1992.
D Nagesh Kumar, IISc, Bangalore M8L6
Optimization Methods: Advanced Topics in Optimization  Applications in Civil
Engineering
4
6. Rao S.S., Engineering Optimization – Theory and Practice, Third Edition, New Age
International Limited, New Delhi, 2000.
7. Taha H.A., Operations Research – An Introduction, Seventh Edition, Pearson Education,
New Delhi, 2004.
8. Vedula, S., and P.P. Mujumdar, Water Resources Systems: Modelling Techniques and
Analysis, Tata McGraw Hill, New Delhi, 2005.
Journals  Suggested Reading
1. Janga Reddy, M., and Nagesh Kumar, D. (2007), Multiobjective differential evolution
with application to reservoir system optimization, Journal of Computing in Civil
Engineering, ASCE, 21(2), 136146.
2. Lee, L.H., Tan, K. C., Ou, K. and Chew, Y.H. (2003), Vehicle capacity planning system
(VCPS): A case study on vehicle routing problem with time windows, IEEE Transactions
on Systems, Man and Cybernetics: Part A (Systems and Humans), 33 (2), 169178.
3. Mujumdar, P.P. and Subbarao V.V.R (2004), Fuzzy waste load allocation model for river
systems: simulation – optimization approach, Journal of Computing in Civil Engineering,
ASCE, 18(2), 120131.
4. Nagesh Kumar, D. and Janga Reddy, M. (2007), Multipurpose reservoir operation using
particle swarm optimization, Journal of Water Resources Planning and Management,
ASCE, 133(3), 192201.
5. Sasikumar, K., and Mujumdar, P. P. (1998), Fuzzy optimization model for water quality
management of a river system, Journal of Water Resources Planning and Management,
ASCE, 124(2), 7988.
6. Tung, Y. K., and Hathhorn, W. E. (1989), Multipleobjective waste load allocation, Water
Resources Management, 3, 129140.
D Nagesh Kumar, IISc, Bangalore M8L6
D Nagesh Kumar, IISc Optimization Methods: M8L6
1
Advanced Topics in Optimization
Applications in
Civil Engineering
D Nagesh Kumar, IISc Optimization Methods: M8L6
2
Introduction
Applications:
z Water Quality Management: waste load
allocation.
z Reservoir Operation.
z Water Distribution Systems
z Transportation Engineering.
D Nagesh Kumar, IISc Optimization Methods: M8L6
3
Water Quality Management
z Waste Load Allocation (WLA) in streams refers to the
determination of required pollutant treatment levels at a set of
point sources of pollution to ensure that water quality standards
are maintained throughout the stream.
z Stakeholders involved: Pollution Control Agency (PCA) and the
dischargers (municipal and industrial) who are discharging
waste into the stream
z Goals/ Objectives: goals of the PCA are to improve the water
quality throughout the stream whereas that of dischargers is to
reduce the treatment cost of the pollutants
z Optimization model with conflicting objectives
D Nagesh Kumar, IISc Optimization Methods: M8L6
4
Water Quality Management (Contd..)
c Maximize
x Minimize
) (x f c =
Maximization of water quality
indicator (Dissolved Oxygen)
Minimization of fractional
levels to pollutant to reduce
treatment cost
Multi
Objective
Water Quality Simulation
Model: Nonlinear
Evolutionary
Algorithm can
be used
Suggested Readings: Tung and Hathhorn (1989),
Sasikumar and Mujumdar (1998), and Mujumdar
and Subbarao (2004)
D Nagesh Kumar, IISc Optimization Methods: M8L6
5
Reservoir Operation
z In reservoir operation problems, to achieve the best possible
performance of the system, decisions need to be taken on
releases and storages over a period of time considering the
variations in inflows and demands.
z The goals can be:
1. Flood control
2. Hydropower generation
3. Meeting irrigation demand
4. Maintaining water quality
downstream.
Multiobjective in nature
D Nagesh Kumar, IISc Optimization Methods: M8L6
6
Reservoir Operation (Contd..)
z Characterized by the uncertainty resulting from the
random behavior of inflow and demand,
incorporation of which in terms of risk may lead to a
nonlinear optimization problem.
z Application of evolutionary algorithms is a possible
solution for such problems.
z Suggested Readings: Jangareddy and Nagesh
Kumar (2007), Nagesh Kumar and Janga Reddy
(2007).
D Nagesh Kumar, IISc Optimization Methods: M8L6
7
Water Distribution Systems
Objectives can be:
1. Meeting the household
demands.
2. Minimizing cost of pipe
system.
3. Meeting the required water
pressure at all nodes of the
distribution system.
4. Optimal positioning of
valves.
Multiobjective in
nature
D Nagesh Kumar, IISc Optimization Methods: M8L6
8
Water Distribution Systems (Contd..)
z Simulation model (e.g., Hardy Cross
method): Nonlinear
z Determination of optimum dosage of chlorine
is also another important problem which is
highly nonlinear because of nonlinear water
quality simulation model.
z Possible solution: Evolutionary Algorithm
D Nagesh Kumar, IISc Optimization Methods: M8L6
9
Transportation Engineering
z Efficiently moving empty or laden containers for a
logistic company or Truck and Trailer Vehicle
Routing Problem (TTVRP).
z Objectives:
1. Minimize routing distance
2. Minimize number of trucks
z Model is nonlinear due to complicated inter
relationship between the components.
z Evolutionary Algorithm: Possible Solution.
z Suggested Reading: Lee et al. (2003)
D Nagesh Kumar, IISc Optimization Methods: M8L6
10
Thank You
This action might not be possible to undo. Are you sure you want to continue?
We've moved you to where you read on your other device.
Get the full title to continue reading from where you left off, or restart the preview.