Languages and Servers for Optimization Support Robert Fourer Industrial Engineering & Management Sciences Northwestern University Evanston, Illinois 60208-3119, U.S.A. 4er@iems.northwestern.edu http://www.iems.northwestern.edu/~4er/SLIDES/ INFORMS Conference on OR/MS Practice Cambridge, Massachusetts — Tuesday, April 27, 2004 Track 14: Selected Presentations: Features of Current Practice 1 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Large-Scale Optimization Minimization or maximization of an objective that depends on many decision variables Subject to many interrelated restrictions (constraints) on the values of the variables 2 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Large-Scale Optimization Modeling Central Truth: Optimization Modeling is Hard Given access to the right technical tools and expertise, building and analyzing models is most of the work Subjects of this presentation Helping people build and analyze models is the purpose of optimization modeling languages Giving access to the right technical tools and expertise is the purpose of optimization servers 3 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Optimization Modeling Languages Examples Simple: Diet Complicated: Fleet sizing General observations Essential features Choices New developments 4 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
The McDonald’s Diet Problem Foods: Nutrients: QP Quarter Pounder Prot Protein FR Fries, small Iron Iron MD McLean Deluxe VitA Vitamin A SM Sausage McMuffin Cals Calories BM Big Mac VitC Vitamin C 1M 1% Lowfat Milk Carb Carbohydrates FF Filet-O-Fish Calc Calcium OJ Orange Juice MC McGrilled Chicken 5 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
McDonald’s Diet Problem Data QP MD BM FF MC FR SM 1M OJ Cost 1.8 2.2 1.8 1.4 2.3 0.8 1.3 0.6 0.7 Need: Protein 55 28 24 25 14 31 3 15 9 1 Vitamin A 100 15 15 6 2 8 0 4 10 2 Vitamin C 100 6 10 2 0 15 15 0 4 120 Calcium 100 30 20 25 15 15 0 20 30 2 Iron 100 20 20 20 10 8 2 15 0 2 Calories 2000 510 370 500 370 400 220 345 110 80 Carbo 350 34 35 42 38 42 26 27 12 20 6 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Diet Problem Formulation: Too General Minimize cx Subject to Ax = b x ≥ 0 7 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Diet Problem Formulation: Too Specific Minimize 1.84 x QP + 2.19 x MD + 1.84 x BM + 1.44 x FF + 2.29 x MC + 0.77 x FR + 1.29 x SM + 0.60 x 1M + 0.72 x OJ ≥ Subject to 28 x QP + 24 x MD + 25 x BM + 14 x FF + 31 x MC + 3 x FR + 15 x SM + 9 x 1M + 1 x OJ 55 ≥ 15 x QP + 15 x MD + 6 x BM + 2 x FF + 8 x MC + 0 x FR + 4 x SM + 10 x 1M + 2 x OJ 100 ≥ 6 x QP + 10 x MD + 2 x BM + 0 x FF + 15 x MC + 15 x FR + 0 x SM + 4 x 1M + 120 x OJ 100 ≥ 30 x QP + 20 x MD + 25 x BM + 15 x FF + 15 x MC + 0 x FR + 20 x SM + 30 x 1M + 2 x OJ 100 ≥ 20 x QP + 20 x MD + 20 x BM + 10 x FF + 8 x MC + 2 x FR + 15 x SM + 0 x 1M + 2 x OJ 100 ≥ 2000 510 x QP + 370 x MD + 500 x BM + 370 x FF + 400 x MC + 220 x FR + 345 x SM + 110 x 1M + 80 x OJ ≥ 34 x QP + 35 x MD + 42 x BM + 38 x FF + 42 x MC + 26 x FR + 27 x SM + 12 x 1M + 20 x OJ 350 8 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Diet Problem Algebraic Model F , a set of foods Given N , a set of nutrients a ij ≥ 0, for each i ∈ N and j ∈ F : and units of nutrient i in one serving of food j b i > 0, for each i ∈ N : units of nutrient i required, c j > 0, for each j ∈ F : cost per serving of food j , x j ≥ 0, for each j ∈ F : Define number of servings of food j to be purchased Σ j ∈ F c j x j Minimize Subject to Σ j ∈ F a ij x j ≥ b i , for each i ∈ N 9 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Diet Problem Algebraic Model in AMPL set NUTR; # nutrients set NUTR; # nutrients set FOOD; # foods set FOOD; # foods param amt {NUTR,FOOD} >= 0; param amt {NUTR,FOOD} >= 0; # nutrient in each food # nutrient in each food param n_min {NUTR} > 0; param n_min {NUTR} > 0; # lower bounds on nutrients # lower bounds on nutrients param cost {FOOD} > 0; # costs of foods param cost {FOOD} > 0; # costs of foods var Buy {FOOD} var Buy {FOOD} integer >= 0; # integer >= 0; # foods to be purchased foods to be purchased minimize TotalCost: minimize TotalCost: sum {j in FOOD} cost[j] * Buy[j]; sum {j in FOOD} cost[j] * Buy[j]; subject to Need {i in NUTR}: subject to Need {i in NUTR}: sum {j in FOOD} amt[i sum {j in FOOD} amt[i,j] * Buy[j] >= n_min[i]; ,j] * Buy[j] >= n_min[i]; 10 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Airline Fleet Assignment set set FLEETS FLEETS; param param fleet_size fleet_size {FLEETS FLEETS} >= 0; } >= 0; set CITIES set CITIES; set set TIMES TIMES circular; circular; set set FLEET_LEGS FLEET_LEGS within within {f in {f in FLEETS FLEETS, c1 in , c1 in CITIES CITIES, t1 in , t1 in TIMES TIMES, , c2 in c2 in CITIES CITIES, t2 in , t2 in TIMES TIMES: : c1 <> c2 and t1 <> t2}; c1 <> c2 and t1 <> t2}; # (f,c1,t1,c2,t2) represents availability of fleet f # (f,c1,t1,c2,t2) represents availability of fleet f # to cover the leg that # to cover the leg that leaves c1 at t1 and leaves c1 at t1 and # whose arrival time plus tur # whose arrival time plus turnaround time at c2 is t2 naround time at c2 is t2 param param leg_cost leg_cost {FLEET_LEGS FLEET_LEGS} >= 0; } >= 0; 11 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Fleet Assignment Computed Sets set set LEGS LEGS := := setof {(f,c1,t1,c2,t2) in setof {(f,c1,t1,c2,t2) in FLEET_LEGS FLEET_LEGS} (c1,t1,c2,t2); } (c1,t1,c2,t2); # set of all legs that can # set of all legs that can be covered by some fleet be covered by some fleet set SERV_CITIES set SERV_CITIES {f in {f in FLEETS FLEETS} := } := union {(f,c1,c2,t1,t2) in union {(f,c1,c2,t1,t2) in FLEET_LEGS FLEET_LEGS} {c1,c2}; } {c1,c2}; # for each fleet, set # for each fleet, set of cities that it serves of cities that it serves set set OP_TIMES OP_TIMES {f in {f in FLEETS FLEETS, c in , c in SERV_CITIES SERV_CITIES[f]} [f]} circular by circular by TIMES TIMES := := setof {(f,c,c2,t1,t2) in setof {(f,c,c2,t1,t2) in FLEET_LEGS FLEET_LEGS} t1 union } t1 union setof {(f,c1,c,t1,t2) in FLEET_LEGS setof {(f,c1,c,t1,t2) in FLEET_LEGS} t2; } t2; # for each fleet and city # for each fleet and city served by that fleet, served by that fleet, # set of active arriv # set of active arrival & departure times, al & departure times, # with arrival time padde # with arrival time padded for turn requirements d for turn requirements 12 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Fleet Assignment Underlying Network Model minimize Total_Cost; minimize Total_Cost; node node Balance Balance {f {f in in FLEETS FLEETS, c i , c in SERV_CITIES SERV_CITIES[f], [f], OP_TIMES OP_TIMES[f,c]}; [f,c]}; # for each fleet and cit # for each fleet and city served by that fleet, y served by that fleet, # a node for e # a node for each possible time ach possible time arc arc Fly Fly {(f,c1,t1,c2,t2) in {(f,c1,t1,c2,t2) in FLEET_LEGS FLEET_LEGS} >= 0, <= 1, } >= 0, <= 1, from Balance[f,c1,t1], to Balance[f,c2,t2], from Balance[f,c1,t1] , to Balance[f,c2,t2], obj Total_Cost obj Total_Cost leg_cost leg_cost[f,c1,t1,c2,t2]; [f,c1,t1,c2,t2]; # arcs for fle # arcs for fleet/flight assignments et/flight assignments arc arc Sit Sit {f in {f in FLEETS FLEETS, , c in c in SERV_CITIES SERV_CITIES[f], t in OP_TI [f], t in OP_TIMES[f,c]} >= 0, MES[f,c]} >= 0, from Balance[f,c,t], from Balance[f,c,t], to Balance[f,c,next(t)]; to Balance[f,c,next(t)]; # arcs for planes # arcs for planes on the ground on the ground 13 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Fleet Assignment Service and Fleet-Size Constraints subj to Service subj to Service {(c1,t1,c2,t2) in {(c1,t1,c2,t2) in LEGS LEGS}: }: sum sum {(f,c1,t1,c2,t2) {(f,c1,t1,c2,t2) in FLEET_LEGS FLEET_LEGS} Fly Fly[f,c1,t1,c2,t2] [f,c1,t1,c2,t2] = 1; # each leg must be # each leg must be served by some fleet served by some fleet subj to FleetSize {f in subj to FleetSize {f in FLEETS FLEETS}: }: sum {(f,c1,t1,c2,t2) in sum {(f,c1,t1,c2,t2) in FLEET_LEGS FLEET_LEGS: : ord(t2, ord(t2,TIMES TIMES) < ord(t1, ) < ord(t1,TIMES TIMES)} )} Fly Fly[f,c1,t1,c2,t2] + [f,c1,t1,c2,t2] + sum {c in sum {c in SERV_CITIES SERV_CITIES[f]} [f]} Sit Sit[f,c,last( [f,c,last(OP_TIMES OP_TIMES[f,c])] [f,c])] <= fleet_size <= fleet_size[f]; [f]; # planes used = the numb # planes used = the number in the air at the er in the air at the # last time (arriving "e # last time (arriving "earlier" than they leave) arlier" than they leave) # plus number on the groun # plus number on the ground at the last time d at the last time 14 Robert Fourer, INFORMS Conference on OR/MS Practice, 27 April 2004, Track 14
Recommend
More recommend