Week 2: linear programming Graph method 1 1.proporties of Linear programming Linearity implies that the LP must satisfy three basic properties: 1-Proportionality: this property requires the contribution of each decision variable in both the objective function and the constrain to be directly proportional to the value of the variable. Example: in the Reddy Mikks model, the quantities 5x1 and 4x2 give the profits for producing x1 and x2 tons of exterior and interior paint, respec tively, with the unit profit pet ton, 5 and 4, providing the constant of proportionality. If, on the other hand, Reddy mikks grants some sort of quantity discount when sales exceed certain amounts, then the profit function becomes nonlinear. 2-Additivity: this property requires the total contribution of all the variables in the objective function and in the constraints to be the direct sum of the individual contributions of each variable. In the Reddy Mikks model, the total profit equals the sum of the two individual profit components. If the two products compete for market share in such a way that an increase in sales of one adversely affects the other, then the additivity property is not satisfied and the model is no longer linear. 3-Certainty: all the objective and constraint coefficients of the LP model are deterministic. This means that they are known constants- a rare occurrence in real life, where data are more likely to be represented by probabilistic distributions. In essence, LP coefficients are average- value approximations of the probabilistic distributions. If the standard deviation of these distributions are sufficiently small, then the approximation is acceptable. Large standard deviation can be accounted for directly by using stochastic LP algorithms or indirectly by applying sensitivity analysis to the optimum solution. 2.Graph LP solution The graphical procedure includes four steps: Step 1: Draw coordinate space Tradition is that x1 is the horizontal axis and x2 is the vertical axis. Because of the non-negativity constraints on x1 and x2 it is enough to draw the 1st quadrant. Step 2: Draw constraint- lines each constraint consists of a line and of information (e.g. arrows) indicating which side of the line is feasible. To draw the line 1- one sets the inequality to be the equality 2- set x1 = 0 and then compute value x2 3- set x2 = 0, and then compute value x1. 4-draw the line between points (0,x2) and (x1,0) 2 Step 3: Define feasible region This is done by selecting the region satisfied by all the constraints including the non-negativity constraints. Step 4: Find the optimum by moving the isoprofit line The isoprofit line is the line where the objective function is constant. The procedure uses two examples to show how maximization and minimization objective functions are handled. Example: Reddy Mikks produces both interior and exterior paints from two raw material M1, M2. The following table provides the basic data of problem: Tons of raw material per ton Exterior paint Interior paint Raw material, M1 6 Raw material, M2 1 profit per ton 5 ($1000) 4 2 4 Max availability 24 6 daily A market survey indicates that the daily demand for interior paint cannot exceed that for exterior paint more than 1 ton. Also, the maximum daily demand for interior paint is 2 tons. Reddy Mikks wants to determine the optimum (best) product mix of interior and exterior paints that maximizes the total daily profit? Solution: variables of model are defined as x1=tons produced daily of exterior paint x2=tons produced daily of interior paint constrains: to construct the constrains that restrict raw material usage and product demand. the raw restriction are expressed verbally as (usage of a raw material by both paint) ≤ (max. raw material availability) The daily usage of raw material M1 is 6 ton of exterior paint and 4 ton of interior paint .thus Usage of raw material M1by exterior paint=6x1 tons/day Usage of raw material M1 by interior paint=4x2 tons/day Usage of raw material M1 by both paints=6x1+4X2 tons/day 3 Usage of raw material M2 by exterior paint=1x1 tons/day Usage of raw material M2 by interior paint=2x2 tons/day Usage of raw material M2 by both paints=x1+2X2 tons/day Because the daily availabilities of raw materials M1 and M2 are limited to 24 and 6 ton ,respectively, the associated restriction are given as 6π₯1 + 4π₯2 ≤ 24 (Raw material M1) π₯1 + 2π₯2 ≤ 6 (Raw material M2) The first demand restriction stipulate that excess of daily production of interior over exterior paint, x2-x1, should not exceed 1 ton, which translates to π₯2 − π₯1 ≤ 1 (market limit) The second demand restriction stipulate that the max. daily demand of interior paint is limited to 2 tons, which translates to π₯2 ≤ 2 (demand limit) An implicit (or "understood- to –be") restriction is that variable x1 and x2 cannot assume negative values. π₯1, π₯2 ≥ 0 Objective function: To construct objective function, note that the company wants to maximize (i.e. ,increase much as possible) the total daily profit of both paints. Given that the profit per ton of exterior and interior paints are 5 and 4 (thousand) dollars, respectively, it follows that Total profit from exterior paint=5x1 Total profit from exterior paint=4x2 Letting z represent the total daily profit, the objective of the company is Maximize z=5x1+4x2 The complete Reddy Mikks model is 4 Maximize z=5x1+4x2 Subject to: 6π₯1 + 4π₯2 ≤ 24 π₯1 + 2π₯2 ≤ 6 π₯2 − π₯1 ≤ 1 π₯2 ≤ 2 π₯1, π₯2 ≥ 0 5 Example: Ozark farms uses at least 800 lb of special feed daily. The special feed is mixture of corn and soybean meal with the following composition: Feedstuff Corn Soybean meal Lb per lb of feedstuff Protein Fiber 0.09 0.02 0.60 0.06 Cost($/lb) 0.30 0.90 The dietary requirements of the special feed are at least 30% protein and at most 5% fiber. Ozark farms wishes to determine the daily minimum-cost feed mix. Solution: Variable: The feed mix consists of corn and soybean meal, the decision variables of the model are define as: X1=lb of corn n the daily mix X2=lb of soybean meal in the daily mix Constrain: 6 The constraints of the model reflect the daily amount needed and the dietary requirements.because Ozark farms needs at least 800 lb of feed a da y, the associated constrain can be expressed as π₯1 + π₯2 ≥ 800 As for the protein dietary requirement constraint, the amount of protein included in x1 lb of corn and x2 lb of soybean meal is (0.09π₯1 + 0.6π₯2)lb. this quantity should equal at least 30% of the total feed mix (x1+x2) lb : 0.09π₯1 + 0.6π₯2 ≥ 0.3(x1+x2) 0.09π₯1 + 0.6π₯2 ≥ 0.3x1+0.3x2 0.09π₯1 + 0.6π₯2 − 0.3π₯1 − 0.3π₯2 ≥0 0.09π₯1 − 0.3π₯1 + (0.6π₯2 − 0.3π₯2) ≥0 -0.21x1+0.3x2≥0 Multiply by (-1) 0.21x1-0.3x2≤0 As for the fiber dietary requirement constraint, the amount of fiber included in x1 lb of corn and x2 lb of soybean meal is (0.02π₯1 + 0.06π₯2)lb. this quantity should equal at least 30% of the total feed mix (x1+x2) lb : 0.02π₯1 + 0.06π₯2≤0.05(x1+x2) 0.02x1+0.06x2-0.05x1+0.05x2≤0 (0.02 x1+0.05x1)+(0.06x2+0.05x2)≤0 -0.03x1+0.01x2≤0 Multiply by (-1) 0.03x1-0.01x2≥0 Objective function: The objective function seeks to minimize the total daily cost (in dollars) of the feed mix and is thus expressed as Minimize z=0.3x1+0.9x2 7 The complete model thus become Minimize z=0.3x1+0.9x2 Subject to π₯1 + π₯2 ≥ 800 0.21x1-0.3x2≤0 0.03x1-0.01x2≥0 x1,x2≥0 8 3.Simplex method The simplex method computations are particularly tedious and repetitive. It attempts to move from one corner point of the solution space to a better corner point until the optimum is found.The development of the simplex method computations is facilitated by imposing two requirements on the constrains of the problem: 1-all constraints (with the exception of the nonnegativity of the variable) are equations with nonnegative right-hand side. 2-all the variables are nonnegative. 3.1 convert inequalities into equation with nonnegative right-hand side In (≤) constrain, the right-hand side can be thought of as representing the limit on the availability of a resource, in which case the left-hand side would represent the usage of this limited resource by the activities (variables) of the model. The difference between the right- hand side and left-hand side of the (≤) constrain thus yields the unused or slack amount of the resource. To convert a (≤) inequality to an equation, a nonnegative slack variable is added to the left-hand side of the constraint. Example: 6x1+4x2 ≤ 24 6x1+4x2+s1=24 s1≥0 a (≥) constraint sets a lower limit on the activities of the LP model, so that the amount by which the left- hand side exceeds the minimum limit represents a surplus. The conversion from (≥) to (=) is achieved by subtracting a nonnegative surplus variable from the left-hand side of the inequality. Example: x1+x2 ≥800 x1+x2-s1=800 s1≥0 Example: 9 -x1+x2 ≤-3 -x1+x2+s1=-3 Multiplying both sides by (-1) will render a nonnegative right- hand side x1-x2-s1=3 in the graphical method, the solution space is delineated by the half- space representing the constraints, and in the simplex method the solution space is represented by m simultaneous linear equations and n nonnegative variables. The graphical solution space has an infinite number of solution points, but how can we draw a similar conclusion from the algebraic representation of the solution space. The algebraic representation the number of equation (m) is always less than or equal to the number of variable (n), if m=n, and the equations are consistent, the system has only one solution, but if m> n , then the system of equations, again if consistent, will yield an infinite number of solutions. In set of (m×n) equations (m>n), if n- m variables equal to zero and then solve the m equations for the remaining m variable, the resulting solution, if unique, is called a basic solution and must correspond to a (feasible or infeasible) corner point of the solution space. The maximum number of corner point is πΆππ = π! π! π − π ! 10