Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
43 views

4 Linear Programming

The document discusses linear programming models, which optimize an objective function subject to constraints. It provides examples of decision variables, constraints, and objective functions. The document also describes solving linear programs graphically and numerically using the simplex algorithm, and analyzing sensitivity of the optimal solution to changes in the model.

Uploaded by

LTE002
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

4 Linear Programming

The document discusses linear programming models, which optimize an objective function subject to constraints. It provides examples of decision variables, constraints, and objective functions. The document also describes solving linear programs graphically and numerically using the simplex algorithm, and analyzing sensitivity of the optimal solution to changes in the model.

Uploaded by

LTE002
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

LINEAR PROGRAMMING Keywords: Optimization model, Linear Programming Model, Objective Function, Decision Variable, Constraint, Simplex Algorithm,

Graphical Solution, Sensitivity Analysis, Objective Function Coefficient, Right Hand Side, Shadow Prices, Reduced Cost. Introduction Engineering Economic Evaluation Methods such as the Present Worth Analysis method--covered in the previous chapter--are descriptive. They allow one to identify the superior project in a group of projects, but do not provide any information about making a given project better. Optimization models are prescriptive. They can be used to identify the values of decision variables that provide an optimal solution to many types of problems, including economic ones. While we will only be concerned with maximizing profit or minimizing costs here, Optimization Models can be used to minimize or maximize anything, including money, materials, energy, pollution, land use and waste amounts. Linear Programming (LP) models are a special type of Optimization Model, in which all of the equations are linear in form and there is a single objective function. Objective Functions, Decision Variables and Constraints Optimization models are made of objective functions, decision variables and constraints. Objective functions have the form Z = f(x1, x2,xn), where Z is something to be optimized (maximized or minimized), f() is a function used to calculate Z based on the decision variables, and x1, x2,xn are the decision variables. Decision variables are things that can be varied in order to optimize the value of Z. In general, Optimization Model can have multiple objective functions with Zs of different units, e.g., one objective function could be costs and another carbon dioxide generation. As we are only concerned with Linear Programming, our models will only have one objective function. Constraints take the form gi(x1, x2,xn) bi, where gi() is a function that estimates the consumption or production of a particular limited resource (bi). In some cases the units of a resource are the same as one or more decision variables, in which case the constraint directly limits the decision variables. Effectively, constraints limit the values the decision variables can take. They may reflect physical, business, or political realities. Many systems can be represented by optimization models. Linear programming (LP) models are a special case of optimization model in which there is only one objective function, all of the equations are linear, and all decision variables are non-negative. In an LP model the objective function takes the form

where the cs are the objective function coefficients. They convert the values of the decision variables into the units of Z, e.g., if the objective is to minimize cost and the decision variables are amounts, the objective coefficients will be the cost per amount.

Constraint equation i has the form

where constraint i limits the amount of resource bi that can be consumed. The as are the constraint coefficients. They determine the amount of resource bi consumed or produced per unit of a given decision variable. If resource bi is time and the decision variables are amounts, the constraint coefficients will be time per amount. If a particular decision variable is not related to resource bi, its constraint coefficient will be zero in constraint equation i. Non-negativity requirements take the form . Though a special kind of Optimization Model, linear programming can be used to model many systems. The value of linear programming models is increased by the existence of a solution method called the Simplex Algorithm. The solution method is numerical, involving the iterative manipulation of a matrix representing the LP model equations. The rows represent the objective function and constraint equations. The columns represent the decision variables, slack variables and Z. Slack variables are used to convert constraint equations from inequalities to equalities. The Simplex Algorithm can solve LP models with thousands of decision variables and constraints. While we will not learn the details of the Simplex Algorithm here we will use the Excel Solver Add-in to solve LP problems, which uses the Simplex Algorithm when it is applied to LP models. It is also important to note that, by its very nature, the Simplex Algorithm provides sensitivity information, which can be used to estimate the impact of uncertainty regarding the objective function coefficients and the resource limits. The simplest LP models contain only two decision variables and can be solved graphically. We will use a two-decision variable LP model to gain some understanding of the nature of LP solutions and Sensitivity Analyses. Remember, the graphical solution only works on LP models with 2 decision variables.

Example - Wastewater Treatment Plant (WWTP) Example (adapted from Revelle, C., E. Whitlatch, and J Wright (2004) Civil and Environmental Systems Engineering 2cd Ed.Pearson Prentice Hall): A city operates wastewater treatment plants (WWTP) A and B that discharge wastewater into River R. WWTP A is located upstream of B. A schematic of the system is given in Figure 1.

Figure 1: Wastewater Discharge from WWTPs A & B into River R The town has grown and the nature and quantity of the wastewater changed such that River R has become unacceptably polluted. Pollution reduction is assumed to cost $20k per unit reduction at WWTP A and $10k at WWTP B. The decision variables are XA and XB, the unit pollution reduction at WWTPs A and B, respectively. Protecting the River between WWTPs A and B requires at least a 50 unit reduction in pollution from WWTP A. Protecting the River below WWTP B requires that the reduction at WWTPs A and B (i.e., XA + XB) sum to at least 100 units, e.g., if XA equals 60 then XB would need to equal at least 40. For operational reasons, each WWTP must reduce its pollution by at least 35 units. Because the city jointly manages the WWTPs, it is in the citys interest to limit overall costs. The LP model can be formulated as

A graphical representation of the solution space is given in Figure 2.

Figure 2: Graphical Solution of WTTP problem The lines with arrows attached are the three constraints. The vertical line represents XA 50, the horizontal line XB 35, and the sloped line XA + XB 100. Feasible solutions, i.e., solutions that meet the constraints, will be in the upper right region of the graph. The line that stretches from 0,100 to 50,0 represents values of XA and XB that give Z = $1M. It was identified by selecting the point 0,100, finding the value of Z, and using that Z value to find the X axis interception point. All points on the line give the same value of Z, $1M. It is called an Objective function line. Sliding it to the right will increase Z. Given that this is a minimization problem, one wants to keep the objective function line as far to the left as allowed by the feasible region. Sliding the objective function line to the right until just one point on the line is in the feasible region identifies the optimal solution, i.e., the solution with minimum Z. The optimal point is O in the Figure, corresponding to Z = $1.5M. The optimal solution is Z=$1.5M, XA = 50 unit reduction, XB = 50 unit reduction. The Simplex 4

Algorithm works by efficiently moving from extreme point to extreme point (constraint intersections) until the optimal solution is identified. An LP model will have a unique solution only if the objective function line intersects the feasible region at only one point. There are a number of situations that result in no solution or more than one solution. Either situation can cause the Simplex Algorithm to fail. If the sloped constraint in Figure 2 was parallel to the Constant Z line, there would be multiple optima. Local optima will occur if the solution space is concave. It is also possible for the constraints to leave no feasible solution region (Infeasible Solution) or an unbounded feasible solution region (e.g., a maximization LP problem with no constraint(s) providing an upper limit on Z). The Solver Add-In can be used to solve Linear Programming problems using the Simplex Algorithm. The resulting EXCEL spreadsheet for the WWTP problem is shown in Figure 3. Two input boxes for Excel Solver are shown in Figure 4, Solver Parameters and Solver Options. The Solver Parameters box is the main input box. Set Target Cell is used to identify the cell containing the objective function. The Equal to: option is set to minimize, because our objective is to minimize cost. By Changing Cells references the decision variables, XA and XB. Subject to the Constraints references the constraints. Add, Change, or Delete a constraint using the buttons to the right. Selecting the Options button in the Solver Parameters box opens the Solver Options box. Check Assume Linear Model to ensure that Solver uses the Simplex Algorithm and provides appropriate Sensitivity information. Check Assume Non-Negativity to make sure decision variables are nonnegative (not necessary in this case because of the constraints). Select the OK button to run Solver. A dialogue box will give you the option to produce various reports, including a sensitivity report. Solver can provide solutions to many types of models, not just LP. A number of the settings in the Solver Options box are not applicable to LP models.

Figure 3: Excel Spreadsheet for WWTP Problem

Figure 4: Solver Parameters and Solver Options Boxes

Sensitivity Analysis In Linear Programming, sensitivity analysis is used to calculate the effect of changes in objective function coefficients, decision variables, and right-hand side (RHS) values on the optimal solution. The Simplex Algorithm automatically provides sensitivity information. For the Objective Function, this includes: Reduced Costs, the change in the value of Z caused by increasing by one unit a decision variable that has a value of zero in the optimal solution. This will create a non-optimal solution, but provides information on the impact of bringing a new variable into the solution. The Reduced Cost is zero for a decision variable that is included (has a non-zero value) in the optimal solution. A positive reduced cost indicates that the value of Z will increase if the decision variable is brought into the solution with a value of one unit. Allowable Increase, the amount an objective function coefficient can be increased before the location of the optimal solution is changed. A change in location means that the new optimal solution is bounded by different constraints. Allowable Decrease, the amount an objective function coefficient can be decreased before the location of the optimal solution is changed. For the Constraints, this includes: Shadow Prices, the change in the optimal value of Z caused by a one unit increase in the RHS value in a constraint. The shadow price of a constraint is zero if the constraint has slack, i.e., the left hand side (LHS) sum is not equal to the RHS value. A positive shadow price indicates that the optimal value of Z will increase if the constraint RHS value increases. Allowable Increase, the amount the RHS value of a constraint can be increased before the location of the optimal solution is changed. A change in location means that the new optimal solution is bounded by different constraints. Allowable Decrease, the amount the RHS value of a constraint can be decreased before the location of the optimal solution is changed. WWTP Example Continued Sensitivity Analysis The Simplex Algorithm automatically provides sensitivity information regarding the effect of changes in resource limits or objective function coefficients on the optimal solution. Our graphical solution can be used to understand the nature of some sensitivity information. As seen in Figure 2, the XA 50 and XA + XB 100constraints are binding. Changing the right-hand-side (RHS) limit of either would change the optimal solution. Increasing the RHS limit of XA 50 to 51 would change the optimal solution to the point 51, 49 and change Z to $1.51M, so a one unit change in that resource limit increases Z by $0.01M. $0.01M is the shadow price (or dual price) of this resource. Increasing the RHS limit of XA + XB 100 to 101 would change the optimal solution to the point 50, 51 and change Z to $1.51M, so a one unit change in that resource limit also increases Z by $0.01M. The shadow price of this resource is $0.01M. XB 35 is not binding. Its RHS can be increased to 50 without affecting the optimal solution.

Changing the objective function coefficients changes the slope of the objective function. Increasing the coefficient associated with XA rotates the line clockwise. Increasing XA by one unit increases Z by $20,000. Increasing the coefficient associated with XB rotates the line counterclockwise. Increasing XB by one unit increases Z by $10,000. The objective function can be rotated clockwise almost all the way to vertical without changing the optimal solution location (though the value of Z would change). Once rotated to vertical there will be multiple optima. It can be rotated counterclockwise until it is almost parallel with the XA + XB 100 constraint without changing the optimal solution location. Once rotated to parallel with XA + XB 100 there will be multiple optima. If it is rotated a little more, the optimal solution will move to the intersection of the XA + XB 100 and XB 35 constraints. Further rotation to horizontal will produce multiple optima. The Excel Solver Sensitivity Report for the Wastewater example is given in Table 1. The Adjustable Cells portion is for the objective function. The adjustable cells are the decision variables. The Constraints section is for the constraints. The Cell column gives the cell locations in the Excel spreadsheet. The Name column shows the names assigned to the decision variables or constraint equations in the Excel spreadsheet. The Final Value column gives the optimal solution values for the decision variables and the constraint left-hand sides. Table 1: Excel Solver Sensitivity Report for WWTP Example Adjustable Cells Cell $B$8 $B$9 Constraints Cell $B$15 $B$16 $B$17 Name XA XA + XB XB Final Value 50 100 50 Shadow Price 10000 10000 0 Constraint Allowable Allowable R.H. Side Increase Decrease 50 15 50 100 1E+30 15 35 15 1E+30 Name XA XB Final Reduced Objective Allowable Allowable Value Cost Coefficient Increase Decrease 50 0 20000 1E+30 10000 50 0 10000 10000 10000

In the Adjustable Cells portion, the Reduced Cost is the change in the value of Z caused by increasing by one unit a decision variable that has a value of zero in the optimal solution. This sensitivity analysis parameter is provided by the Simplex algorithm, but is not obvious in a graphical solution. Reduced Cost will only be non-zero for decision variables that are zero in the current optimal solution. In the example

given here, both decision variables are included in the optimal solution, so their Reduced Costs are both zero. The Objective Coefficient column is just that, the value of each objective function coefficient. They give the change in Z associated with a unit change in the associated decision variable. The Allowable Increase and Allowable Decrease columns give the maximum changes in the objective function coefficients that do not result in a new optimal solution location. Here, location means a particular combination of binding constraints. In the example given here, decreasing the value of the first objective function coefficient from 20000 to 9999 (a decrease of just more than 10000 units) would change the location of the optimal solution. There is no limit on how much it can be increased (infinity is represented by the very large number 1E+30 in Solver). In the Constraints sections, the Shadow Prices are clearly indicated. The Allowable Increase and Allowable Decrease columns give the maximum changes in the RHS that do not result in a new optimal solution location. In the example given here, increasing the RHS value of the first constraint from 50 to 66 (an increase of just more than 15 units) would change the location of the optimal solution.

You might also like