Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
optimization methods using calculus have several limitations and thus not suitable for many practical applications.
Linear programming is Most widely used constrained form of optimization method which deals with nonnegative
solutions(x1= 0 , x2= 1/2 x3= 5) to determine system of linear equations with corresponding finite value of the objective function.
Linear Programming is required that all the mathematical functions in the model be linear functions.
The term Linear is used to describe the proportionate relationship of two or more variables in a model. The given change in one variable will always cause a resulting proportional change in another variable. The term linear implies that the objective function and constraints are linear functions of nonnegative decision
Linear programming (LP) techniques consist of a sequence of steps that will lead to an optimal solution to problems, in cases where an optimum exists
Graphical or Geometrical approach : It is possible to solve a 2variable problem graphically to find the optimal solution (not shown).
Simplex Method: This is a mathematical approach developed by George Dantzig. Can solve small problems by hand.
Computer Software : Most optimization software actually uses the Simplex Method to solve the problems.
decision variables. 2. Constraints variables. 3. All the decision variables must be nonnegative. should be linear function of decision
For example
Mathematical formulation of linear programming problem There are mainly four steps in the mathematical formulation of linear programming problem as a mathematical model. Identify the decision variables and assign symbols x and y to them. These decision variables are those quantities whose values we wish to determine. Identify the set of constraints and express them as linear equations / in equations in terms of the decision variables.
Identify the objective function and express it as a linear function of decision variables. It might take the form of
There are many real life situations where an LPP may be formulated. The following examples will help to explain the mathematical formulation of an LPP.
Examples
Example
A company makes cheap tables and chairs using only wood and labor. To make a chair requires 10 hours of labor and 20 board feet of wood. To make a table requires 5 hours of labor and 30 board feet of wood. The profit per chair is $8 and $6 per table. If it has 300 board feet of wood and 110 hours of labor each day, how many tables and chairs should it make to maximize profits?
Objective
and
Objective: Maximize Z = 6T + 8C
Maximum Profits = ($6 x # of tables) + ($8 x # of chairs)
Subject to:
30T + 20C < 300 board feet (wood constraint) 5T + 10C < 110 hours (labor constraint) T,C > 0 (non-negativity)
6T +
8 C
< 300 (wood constraint) < 110 (labor constraint) >0 (non-negativity)
30 T + 20 C 5 T + 10 C T, C
Inequalities
A resource may constrain a problem by being . . .
Equal-to = Equal-to or greater-than => or Equal-to or less-than =< or Greater-than > Less-than < . . .the amount of resource available. > <
Dealing with inequalities Converts Less-than or Equal-to variables, and Less-than variables to Equal-to variables by adding a slack variable.
SURPLUS VARIABLES
If the labor constraint was greater than or equal to the 110 hours; expressed as
5 T + 10 C > 110 hours
The L.P. model adds any needed slack and surplus variables. But, if they are needed, they will appear in the program output. Below is how the program adds the slack variables.
Maximize Subject to: Z = 6T + 8C 30T + 20C + SW = 300 board feet of wood 5T + 10C + SL = 110 hours of labor T, C, SW, SL > 0
A company manufactures two products X and Y whose profit contributions are Rs.10 and Rs. 20 respectively. Product X
A diet is to contain at least 4000 units of carbohydrates, 500 units of fat and 300 units of protein. Two foods A and B are available. Food A costs 2 dollars per unit and food B costs 4 dollars per unit. A unit of food A contains 10 units of carbohydrates, 20 units of fat and 15 units of protein. A unit of food B contains 25 units of carbohydrates, 10 units of fat and 20 units of protein. Formulate the problem as an LPP so as to find the minimum cost for a diet that
Let the diet contain x units of A and y units of B. Total cost = 2x + 4y The LPP formulated for the given diet problem is Minimize Z = 2x + 4y subject to the constraints
In the production of 2 types of toys, a factory uses 3 machines A, B and C. The time required to produce the first type of toy is 6 hours, 8 hours and 12 hours in machines A, B and C respectively. The time required to make the second type of toy is 8 hours, 4 hours and 4 hours in machines A,
B and C respectively. The maximum available time (in hours) for the
machines A, B, C are 380, 300 and 404 respectively. The profit on the first type of toy is 5 dollars while that on the second type of toy is 3 dollars. Find the number of toys of each type that should be produced to get maximum The data given in the problem can be represented in a table as follows. profit
Let x = number of toys of type-I to be produced y = number of toys of the type - II to be produced Total profit = 5x + 3y The LPP formulated for the given problem is: Maximize Z = 5x + 3y
characteristics:
1. 2. 3.
Objective function should be of maximization type All the constraints should be of equality type All the decision variables should be nonnegative
Standard form
Standard form is a basic way of describing a LP problem. It consists of 3 parts:
a11x1 + a12x2 + + a1nxn < b1 a21x1 + a22x2 + + a2nxn < b2 am1x1 + am2x2 + + amnxn < bm
Non-negative variables
Other forms, such as minimization problems, problems with constraints on alternative forms, as well as problems involving negative variables can always be rewritten into an equivalent problem in standard form.
Any linear programming problem can be expressed in standard form by using the following transformations.
1. The maximization of a function f (x1, x2, . . . , xn) is equivalent
Consequently, the objective function can be stated in the minimization form in any linear programming problem
2. The decision variables represent some physical dimensions, and hence the variables xj will be nonnegative. However, a variable may be unrestricted in sign in some problems. In such cases, an unrestricted variable (which can take a positive, negative, or zero value) can be written as the difference of two nonnegative variables. Thus if xj is unrestricted in sign, it can be written as xj = x j x j , where
It can be seen that xj will be negative, zero, or positive, depending on whether x j is greater than, equal to, or less than xj
it can be converted into the equality form by adding a nonnegative slack variable xn+1 as follows:
Each constraint
a x
j=1
ij j
bi is represented
as xN+i= bi
- a x
j=1
ij j
and xN+i 0.
xN+i are basic variables, or slack variables. The original set of xi are non-basic variables.
1.Objective function is of
minimization type. 2.Constraints are of inequality
type.
3.Decision variable, x2, is unrestricted, thus, may take negative values also. How to transform a general form of a LPP to the standard form ?
General form
General form
Transformation
Standard form
Standard form 1.Objective function
1.Objective function
2. First constraint.
2. First constraint.
3.Second constraint
3.Second constraint
4.Third constraint
4.Third constraint
Basic Definitions
Feasible solution. In a linear programming problem, any
solution that satisfies the constraints
simultaneously.
Basic feasible solution. This is a basic solution that satisfies the nonnegativity conditions of Eq.
Non-degenerate basic feasible solution. This is a basic feasible solution that has got exactly m positive xi . Optimal solution. A feasible solution that optimizes the objective function is called an optimal solution Optimal basic solution. This is a basic feasible solution for which the objective function is optimal.
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.
Case 1
Case 2
Case 3
From case 3
The solution obtained by setting the independent variable equal to zero is called a basic solution
and x4 = 0 (nonbasic or independent variable). Since this basic solution has all xj 0 (j = 1, 2, 3, 4), it is a basic feasible solution
Note that while comparing ( 3 4M) and ( 5 3M), it is decided that ( 3 4M)<( 5 3M) as M is any arbitrarily large number.
Where c1=1, c2=9 and c3=1 are the cost coefficients of the given objective function and
b=
9 15 14
Standard form constraints are written in matrix form and represented each column as P1, P2, P3 and P4
P1 1 3 2
P2 2 2 3
P3 3 2 1
P4 1 1 1
Where c1,c2,c3 are the cost coefficients of the given objective function
XB =
Models of electrical networks. The current flows are primal variables and the voltage differences are the dual variables that arise in consideration of optimization (and equilibrium) in electrical networks.
Models of economic markets. In these models, the primal variables are production levels and consumption levels, and the dual variables are prices of goods and services Structural design. In these models, the tensions on the beams are primal variables, and the nodal displacements are the dual variables.
Nonlinear (and linear) duality is very useful. For example, dual problems and their solutions are used in connection with:
Identifying near-optimal solutions. A good dual solution can be used to bound the values of primal solutions, and so can be used to actually identify when a primal solution is near-optimal. Proving optimality. Using a strong duality theorem, one can prove optimality of a primal solution by constructing a dual solution with the same objective function value. Sensitivity analysis of the primal problem. The dual variable on a constraint represents the incremental change in the optimal solution value per unit increase in the RHS of the constraint
Convergence of improvement algorithms. The dual problem is often used in the convergence analysis of algorithms.
Other uses, too . . . .
Dual Problem. As a definition, the dual problem can be formulated by transposing the rows and columns including the right-hand side and the objective function, reversing the inequalities and maximizing instead of minimizing. Thus by
Primal Problem
Dual Problem
Write the dual of the following linear programming problem: Maximize f = 50x1 + 100x2 subject to
If a linear programming problem has an optimal solution, then its dual has an optimal solution and the optimal
Duality Theorems Theorem 1 The dual of the dual is the primal. Theorem 2 Any feasible solution of the primal gives an f value greater than or at least equal to the value obtained by any feasible solution of the dual.
Dual Simplex Method Computationally, the dual simplex algorithm also involves a sequence of pivot operations, but with different rules (compared to the regular simplex method) for choosing the pivot element