Presentation on theme: "Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery."— Presentation transcript:
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery Lecture 6
Optimization of thermal processes2007/2008 Linear programming (LP) problems −General statement −Standard form of LP problem Example of LP problem −Transformation to standard form −Graphical solution method Pivotal reduction of a system of linear equations (Gauss-Jordan method) Concepts and theorems fundamental for the simplex method Simplex algorithm Overview
Optimization of thermal processes2007/2008 A linear programming (LP) problem Objective function Feasible region Feasible region is convex as the constraint functions are convex (linear). Here is the maximum
Optimization of thermal processes2007/2008 Standard form of a linear programming problem Minimize subject to the constraints cost coefficients All decision variables are nonnegative m linear equations known constants
Optimization of thermal processes2007/2008 How to transform any linear programming problem into the standard form? Maximize is equivalent to minimize If some of the decision variables are unrestricted in sign, we can express them as the difference of two nonnegative variables: where
Optimization of thermal processes2007/2008 How to transform any linear programming problem into the standard form? 3. An inequality constraint in the form: can be converted into the equality by adding a nonnegative slack variable: Slack variable 4. Similarly, for inequality constraints in the form: we substract a nonnegative surplus variable: Surplus variable
Optimization of thermal processes2007/2008 Example of linear programming problem Two products (denoted by I and II respectively) can be manufactured at the factory with the use of three ingredients: A, B and C. The amount of the ingredients required for one unit of each of the products is as follows: III A45 B52 C38 The total avalaible amount of the ingredients is: ABC The profit for product I is 5 zl per unit, for product II – 3 zl per unit. Maximize the profit.
Optimization of thermal processes2007/2008 Transformation to the standard form (example contd) Design vector Number of units of product I Number of units of product II Objective function (the profit) Constraints Standard form minimize Slack variables
Feasible region Optimization of thermal processes2007/2008 Graphical method of solution (example contd) Objective function surfaces optimum We are looking for the objective function surface representing the largest value, intersecting one of the extreme points (vertices) of the feasible region. Of course, this method is not very accurate and can be applied only to two dimensional problems (with two design variables). We definitely need a better and more general method.
Optimization of thermal processes2007/2008 How to solve a set of linear equations? (n equations, n unknowns) We can: multiply any equation by any non-zero constant add any two equations Using only these two operations we can eliminate a particular variable from all but one equations. This elimination is called pivot operation. For instance, we can eliminate x 2 : x 2 eliminated we pivot on this term
Optimization of thermal processes2007/2008 How to solve a set of linear equations? (n equations, n unknowns) Performing pivot operation on all variables we can solve the whole system of equations. This is Gauss-Jordan elimination. Canonical form From the canonical form the solution can be directly obtained as
Optimization of thermal processes2007/2008 Pivotal reduction of a general system of equations (m equations, n unknowns) Performing pivotal operations with respect to any set of m variables, say x 1, x 2,..., x m, we obtain: Canonical system with pivotal variables: x 1, x 2,..., x m Pivotal variablesNonpivotal or independent variables
Optimization of thermal processes2007/2008 Pivotal reduction of a general system of equations (m equations, n unknowns) One special solution can be deduced from the canonical system : This solution is called a basic solution. Thus, to obtain basic solution we: choose m pivotal variables; they are called basic variables; the set of basic variables is called a basis perform pivotal reduction with respect to the basic variables set the independent variables to zero; they are called nonbasic variables The importance of the basic solution stems from the fact that it corresponds to the extreme point (vertex) of a feasible region.
Optimization of thermal processes2007/2008 Some important theorems A region where constraints are satisfied (feasible region) in LP problem is a convex set. Convex sets a b Nonconvex (concave) sets For a convex set any segment line joining any two poins is also in the set. These points are outside. Extreme point (vertex) Vertex is a point in the convex set that does not lie on a line segment joing two other points of the set. The minimum of a linear function over a convex set is attained at a vertex of this set.
Optimization of thermal processes2007/2008 Some important theorems Feasible solution in LP problem is the solution that satisfies the constraints (see the standard form of LP problem): Equality constraints Nonnegativity conditions Basic feasible solution is basic solution that satisfies the nonnegativity conditions: Every basic feasible solution is an extreme point (vertex) of the convex set of feasible solutions. The minimum of a linear function over a convex set is attained at a vertex of this set. Looking for the optimal solution we just have to inspect basic feasible solutions. This is the basis of the simplex method
Optimization of thermal processes2007/2008 Motivation of the simplex method Given a system of linear equations corresponding to the constraints of the LP problem we can generate all basic solutions We pick only the feasible solutions (nonnegative variables) We calculate the value of the objective function for the given solution From obtained values we take the minimal one Unfortunetely, such procedure could be tedious and inefficient. The number of basic solutions to inspect is equal to: e.g. for n=20, m=10 we have basic solutions But many of these solutions are not feasible What we really need is a computational scheme that: examines a sequence of basic feasible solutions each of which corresponds to a lower value of f until minimum is reached
Nonbasic variables Basic variables (including -f) Optimization of thermal processes2007/2008 Simplex algorithm Start point – the constraints and the objective function in canonical form: Constraints Objective function Basic solution:
Optimization of thermal processes2007/2008 Simplex algorithm A basic feasible solution is an optimal solution with a minimum objective function value if all the cost coefficients are nonnegative. Why? We can write: These variables are presently zero and are constrained to be nonnegative. If all are positive then increasing any cannot decrease the value of the objective function Otherwise, we can improve the solution by increasing some of the nonbasic variables: we change the basis by introducing new variable x s for which:
Optimization of thermal processes2007/2008 Simplex algorithm Now, we can observe what happens to present basic variables, when we increase the new one: All the variables should stay nonnegative, so the largest value we are allowed to take is:
Optimization of thermal processes2007/2008 Simplex algorithm For this specific value we obtain: It is not difficult to see, that we can obtain the same result by single pivot operation on the element Thus, we reach another basic feasible solution with a new basis This new basic solution corresponds to a lower objective function value
Optimization of thermal processes2007/2008 Simplex algorithm - example Maximize subject to
Optimization of thermal processes2007/2008 Thank you for your attention