Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computational Methods for Management and Economics Carla Gomes Module 6c Initialization in Simplex (Textbook – Hillier and Lieberman)

Similar presentations


Presentation on theme: "Computational Methods for Management and Economics Carla Gomes Module 6c Initialization in Simplex (Textbook – Hillier and Lieberman)"— Presentation transcript:

1 Computational Methods for Management and Economics Carla Gomes Module 6c Initialization in Simplex (Textbook – Hillier and Lieberman)

2 Initialization Adapting to other forms

3 Equality constraints Negative Right-hand sides Constraints ≥ Minimization

4 Artificial Variable Approach What if our problem is not in standard form – i.e., it may include functional constraints of type = and ≥ and also negative RHS? How can we identify an initial BFS? Approach – artificial variable technique: –Construct an artificial problem: introduce a dummy variable – an artificial variable, s.t., the usual non-negativity constraints, just for the purpose of being initial basic variable -- into each of the constraints that are non standard; Objective function – modify it to impose an exorbitant penalty on the artificial variables –Simplex method – forces the artificial variables to become 0, one at a time, until they are all gone, providing an initial basic solution for the original problem.

5 Handling Equality Constraints a i1 x 1 + a i2 x 2 + … + a in x n = b i Can be transformed into: a i1 x 1 + a i2 x 2 + … + a in x n ≥ b i a i1 x 1 + a i2 x 2 + … + a in x n ≤ b i But we still would have to deal with one constraint in non-standard form.

6 Wyndor Glass Requirement: plant 3must be uses at full capacity  3 x 1 + 2 x 2 = 18; Algebraic form: Z - 3 x 1 - 2 x 2 = 0; x 1 + x 3 = 4; 2 x 2 + x 3 = 12; 3 x 1 + 2 x 2 = 18; What’s the problem with this initial system from the simplex’s point of view?

7 What is the basic variable in the 3 rd equation? No obvious BFS

8 Procedure Construct an artificial problem that has the same optimal solution as the real problem by making two modifications to the real problem: 1.Apply the artificial variable technique by introducing a non-negative artificial variable into the equality constraint as if it were a slack variable. 2.Assign an overwhelming penalty to having by changing the objective function to: 3 x 1 + 2 x 2 + = 18; Z = 3 x 1 + 2 x 2 - M M is a huge positive number (Big M Method). = 18 - 3 x 1 + 2 x 2

9 Note: because plays the role of the slack variable in the 3 rd constraint, this constraint becomes equivalent to 3 x 1 + 2 x 2 <=18; therefore the feasible region is identical to the feasible region of the original Wyndor Glass problem.

10 3. Converting Z equation into proper form x 1 + x 3 = 4; 2 x 2 + x 4 = 12; 3 x 1 + 2 x 2 + = 18; Is this form the right form for the simplex? Why? Z - 3 x 1 - 2 x 2 + M = 0  convert Z equation into the proper form by subtracting from Eq(0), Eq(3) times M

11 Converting Z equation into proper form Now we are ready to use the Simplex method. Note: Think of M as a huge number. M only appears in Eq 0 in Expressions of the form aM + b; because M is huge it is enough to Compare the multiplicative factor a. What variable will enter the basis? What variable will leave the basis?

12 What operations do we need to perform to this tableau? Answer: Multiply pivot row by (-3) and add it to eq (3); Multiply pivot row by (3M+3) and add it to eq (0); What variable will enter the basis? What variable will leave the basis? Is this a feasible solution for the original problem? Optimal?Why?

13 What operations do we need to perform to this tableau? Answer: Divide pivot row by 2 Multiply new pivot row by (-2) and add it to eq (2); Multiply new pivot row by (2M+5) and add it to eq (0); Is this a feasible solution for the original problem? Optimal?Why? What variable will enter the basis? What variable will leave the basis?

14 Is this a feasible solution for the original problem? Optimal?Why?

15 Graphical Visualization of Wyndor Glass Problem x1=0,x2=0,x3=4,x4=12,x5=18 x1=4,x2=0,x3=0,x4=12,x5=18 x1=4,x2=3,x3=0,x4=6,x5=0 x1=2,x2=5,x3=2,x4=0,x5=0

16 Handling Negative Right Hand Sides x 1 + x 3 <=-1; -x 1 - x 3 ≥ 1;

17 Handling ≥ constraints x 1 + x 2 >= 6 start by introducing a surplus variable x 1 + x 2 - x3 = 6 now we know how to deal with equality constraints by adding an artificial variable, x 3 ≥ 0; x 1 + x 2 - x 3 + x 4 = 6 x 4 ≥ 0 is an artificial variable Note: x 1 + x 2 - x 3 + x 4 = 6  x 1 + x 2 = 6 + x 3 - x 4 Since x 3 >=0 and x 4 >=0 that means that x 1 + x 2 can now take any value (below or above the constraint) so this procedure in fact eliminates the constraint from the artificial problem.

18 Minimization Minimize Z = c 1 x 1 + c 2 x 2 + … + c n x n  Maximize - Z = - c 1 x 1 - c 2 x 2 - … - c n x n

19 The Big M Method Description of the Big M Method 1.Modify the constraints so that the RHS of each constraint is nonnegative. Identify each constraint that is now an = or ≥ constraint. 2.Convert each inequality constraint to augmented form (add a slack variable for ≤ constraints, add an surplus (excess) variable for ≥ constraints). 3.For each ≥ or = constraint, add artificial variables. Add sign restriction a i ≥ 0. 4.Let M denote a very large positive number. Add (for each artificial variable) Ma i to min problem objective functions or -Ma i to max problem objective functions. 5.Since each artificial variable will be in the starting basis, all artificial variables must be eliminated from row 0 before beginning the simplex. Remembering M represents a very large number, solve the transformed problem by the simplex.

20 Math Programming and Radiation Therapy

21 Radiation Therapy Overview High doses of radiation (energy/unit mass) can kill cells and/or prevent them from growing and dividing –True for cancer cells and normal cells Radiation is attractive because the repair mechanisms for cancer cells is less efficient than for normal cells (slides adapted from James Orlin’s)

22 Radiation Therapy Overview Recent advances in radiation therapy now make it possible to –map the cancerous region in greater detail –aim a larger number of different beamlets with greater specificity This has spawned the new field of tomotherapy “Optimizing the Delivery of Radiation Therapy to Cancer patients,” by Shepard, Ferris, Olivera, and Mackie, SIAM Review, Vol 41, pp 721-744, 1999. Also see http://www.tomotherapy.com/http://www.tomotherapy.com/

23 Conventional Radiotherapy Relative Intensity of Dose Delivered

24 Conventional Radiotherapy Relative Intensity of Dose Delivered

25 Conventional Radiotherapy In conventional radiotherapy –3 to 7 beams of radiation –radiation oncologist and physicist work together to determine a set of beam angles and beam intensities –determined by manual “trial-and-error” process

26 Goal: maximize the dose to the tumor while minimizing dose to the critical area Critical Area Tumor area With a small number of beams, it is difficult to achieve these goals.

27 Recent Advances More accurate map of tumor area –CT -- Computed Tomography –MRI -- Magnetic Resonance Imaging More accurate delivery of radiation –IMRT: Intensity Modulated Radiation Therapy –Tomotherapy

28 Tomotherapy: a diagram

29 Radiation Therapy: Problem Statement For a given tumor and given critical areas For a given set of possible beamlet origins and angles Determine the weight of each beamlet such that: –dosage over the tumor area will be at least a target level  L. –dosage over the critical area will be at most a target level  U.

30 Display of radiation levels

31 Linear Programming Model First, discretize the space –Divide up region into a 2D (or 3D) grid of pixels

32 More on the LP Create the beamlet data for each of p = 1,..., n possible beamlets. D p is the matrix of unit doses delivered by beam p. = unit dose delivered to pixel (i,j) by beamlet p

33 Linear Program Decision variables w = (w 1,..., w p ) w p = intensity weight assigned to beamlet p for p = 1 to n; D ij = dosage delivered to pixel (i,j)

34 An LP model minimize In an example reported in the paper, there were more than 63,000 variables, and more than 94,000 constraints (excluding upper/lower bounds) took 4 minutes to solve.

35 What to do if there is no feasible solution Use penalties: e.g., D ij   L – y ij and then penalize y in the objective. Consider non-linear penalties (e.g., quadratic) Consider costs that depend on damage rather than on radiation Develop target doses and penalize deviation from the target

36 Optimal Solution for the LP

37 An Optimal Solution to an NLP

38 Further considerations Minimize damage to critical tissue Maximize damage to tumor cells Minimize time to carry out the dosage LP depends on the technology

39 Mary’s radiation therapy: simplified version Goal – design and select the combination of beamlets to be used and the intensity of each one, to generate the best possible dose distribution (units: kilorads) Decision variables: –x 1 - dose at the entry point for beamlet 1 –x 2 - dose at the entry point for beamlet 1 Objective function: –Z – total dosage reaching healthy anatomy min z = 0.4 x 1 + 0.5 x 2 st 0.3x 1 + 0.1x 2 ≤ 2.7 critical tissues 0.6x 1 + 0.4x 2 = 6 tumor region 0.5x 1 + 0.5x 2 ≥ 6 center of tumor x 1, x 2, > 0

40 min z = 0.4 x 1 + 0.5 x 2 st 0.3x 1 + 0.1x 2 ≤ 2.7 0.6x 1 + 0.4x 2 = 6 0.5x 1 + 0.5x 2 ≥ 5 x 1, x 2, > 0

41 Getting the problem into augmented form (canonical form) for simplex

42

43 1 st Simplex Tableaux Optimal? Entering Variable? x 1 enters the base and x 3 leaves the base

44 When do we get a feasible solution for the original problem? What the optimal solution? x1 = ? x2 = ? Z = ? x4 = ? x5 = ? x6 = ?

45

46 From Big M Method to the Two- Phase Method The Big-M Method can be thought of as having two phases: –Phase 1 – all the artificial variables are driven to 0 (because of the penalty M) in order to reach an initial BF solution to the real problem; –Phase 2 – all the artificial variables are kept to 0 (because of the penalty M) while the simplex method generates a sequence of BF solutions for the real problem that leads to an optimal solution.  Two phase method – streamlined procedure for performing the two-phases directly, without introducing M explicitly ;

47 Two Phase Method: Mary’s radiation therapy Real problem’s objective function: min z = 0.4 x 1 + 0.5 x 2 Big M method’s objective function: min z = 0.4 x 1 + 0.5 x 2 + M x 4 + M x 6 Since the two first coefficients are negligible compared to M, the two phase method drops M by using the following objective functions: –Phase 1: minimize z = x 4 + x 6 (until x 4 =, x 6 =0) –Phase 2: min z = 0.4 x 1 + 0.5 x 2 (with x 4 =, x 6 =0)

48 min z = x 4 + x 6 st 0.3x 1 + 0.1x 2 + x3 = 2.7 0.6x 1 + 0.4x 2 + x 4 = 6 0.5x 1 + 0.5x 2 - x 5 + x 6 = 6 x 1, x 2, x 3, x 4, x 5, x 6 >= 0 The solution of phase 1 is the initial solution for phase 2, assuming That the optimal solution of phase 1 is z=0 and x 4, x 6 = 0; Phase 1: Mary’s radiation therapy

49 min z = 0.4x 1 + 0.5x 2 st 0.3x 1 + 0.1x 2 + x3 = 2.7 0.6x 1 + 0.4x 2 = 6 0.5x 1 + 0.5x 2 - x 5 = 6 x 1, x 2, x 3, x 5 >= 0 Phase 2: Mary’s radiation therapy Note: the solution from phase 1 is the initial BFS for phase 2.

50 Tableau for Phase 1: Mary’s radiation therapy min z = x 4 + x 6 st 0.3x 1 + 0.1x 2 + x3 = 2.7 0.6x 1 + 0.4x 2 + x 4 = 6 0.5x 1 + 0.5x 2 - x 5 + x 6 = 6 x 1, x 2, x 3, x 4, x 5, x 6 >= 0 What is the basic variable in equation 1? Equation 2? Equation 3? What operations do we need to perform in order to get the canonical form for the simplex? (multiply row 2 by –1 and row 3 by –1; add new row 2 and new row 3 to row 0)

51 Tableau for Phase 1: Mary’s radiation therapy What’s the initial solution for phase 2?x 1 =6; x 3 = 0.3; x 2 =6, x 4,x 5,x 6 =0

52 min z = 0.4x 1 + 0.5x 2 st 0.3x 1 + 0.1x 2 + x3 = 2.7 0.6x 1 + 0.4x 2 = 6 0.5x 1 + 0.5x 2 - x 5 = 6 x 1, x 2, x 3, x 5 >= 0 Phase 2: Mary’s radiation therapy Using phase 1 solution, how do we get the 1 st tableau for phase 2?

53 Preparing for Phase 2 Drop the artificial variables Substitute phase 2 objective function Restore canonical form for simplex for phase 2

54 Phase 2: Mary’s radiation therapy What variable leaves the basis and what variable enters the basis? Is it optimal? What’s the solution? And Z?

55 Graphical Visualization of Phase I and Phase II

56 Big M Method vs. Two-phase Method The two-phase method streamlines the Big M method by using only the multiplicative factors in phase 1 and by dropping the artificial variables in phase 2. Two-phase method is commonly used in computational implementations. 

57 No Feasible Solutions If the original problem has no feasible solutions, then either the Big M method or the phase 1 of the two-phase method yields a final solution that has at least one artificial variable greater than zero.

58 No Feasible Solutions min z = 0.4 x 1 + 0.5 x 2 st 0.3x 1 + 0.1x 2 ≤ 1.8 0.6x 1 + 0.4x 2 = 6 0.5x 1 + 0.5x 2 ≥ 5 x 1, x 2, > 0

59 No Feasible Solutions Why is it an infeasible solution to the original problem?

60 Handling variables allowed to be negative In several situation we need to consider variables that can have negative values – e.g., rates of increase. We consider two cases: –Variables with a bound on the negative values allowed –Variables with no bound on the negative values allowed

61 Variables with a bound on the negative values allowed Let’s consider the lower bound L, where L is a negative constant; Let’s assume the constraint: x ≥ L x ≥ L  x’ = x - L, x’ ≥ 0  x = x’ + L So x and the constraint x ≥ L can be replace with x’ + L and x’ ≥ 0.

62 Wyndor Glass x 1 – rate of increase in production (does not go below –10) Maximize Z = 3 x1+ 5 x2 subject to x1 ≤ 4 2x2≤ 12 3x1 + 2x2 ≤ 18 and x1 ≥ -10, x2 ≥0. Letx1 = rate of increase of the number of doors to produce x2 = the number of windows to produce Maximize Z = 3 (x’-10) + 5 x2 subject to (x’-10) ≤ 4 2 x2 ≤ 12 3 (x’-10) + 2x2 ≤ 18 and (x’-10) ≥ -10, x2 ≥ 0. Maximize Z = -30 + 3x’ + 5 x2 subject to x’≤ 14 2x’ ≤ 12 3x’+ 2x2 ≤ 48 and x’ ≥ 0, x2 ≥ 0. Note: A similar technique can be used when L is positive and a variable is subject to the constraint: x ≥ L

63 Variables with no bound on the negative values allowed Let’s consider a variable x that can have arbitrary values What transformation do we perform to use the LP model? x = x + - x - where x + ≥ 0; x - ≥ 0 (note that x can have arbitrary values since x + and x - can only have positive values) What’s the interpretation of this transformation? Any BF solution has the property that either x + = 0 or x - = 0 (or both) Therefore at the optimal solution we have: x if x > 0 x + = x + is the positive part 0 otherwise |x| if x < 0 x + = x - is the negative part 0 otherwise Example: if x=10 then x + =10 and x - = 0

64 Wyndor Glass x 1 – rate of increase in production (can have arbitrary values)) Maximize Z = 3 x1+ 5 x2 subject to x1 ≤ 4 2x2≤ 12 3x1 + 2x2 ≤ 18 and x2 ≥0. Letx1 = rate of increase of the number of doors to produce x2 = the number of windows to produce Maximize Z = 3 ( x + - x - ) + 5 x2 subject to ( x + - x - ) ≤ 4 2 x2 ≤ 12 3 ( x + - x - ) + 2x2 ≤ 18 and x + ≥0, x - ≥0, x2 ≥ 0. Note: A similar technique can be used when L is positive and a variable is subject to the constraint: x ≥ L Maximize Z = 3 x + - 3 x - + 5 x2 subject to x + - x - ≤ 4 2 x2 ≤ 12 3 x + - 3 x - + 2x2 ≤ 18 and x + ≥0, x - ≥0, x2 ≥ 0.

65 From a computational view point this approach has the disadvantage of introducing new variables. If all the variables can have arbitrary values the transformed model will have twice as many variables. Can we do better? Yes – by introducing only one additional variable. All variables x j are replaced by: –with x j = x j ’-x’’ where x j ’ ≥0, x’’ ≥ 0 (x’’ is the same for all variables; -x’’ corresponds to the largest (in absolute terms) negative original variable; x j ’is the amount by which x j exceeds x’’. )


Download ppt "Computational Methods for Management and Economics Carla Gomes Module 6c Initialization in Simplex (Textbook – Hillier and Lieberman)"

Similar presentations


Ads by Google