160 likes | 321 Views
Previously in Chapter 4. Assignment Problems Network Flow Problems Sequential Decision Problems Vehicle Routing Problems Transportation Problems Staffing Problems Production Problems. Agenda. Quiz Hardness Modeling with Binary Variables Issues with binary/integer variables
E N D
Previously in Chapter 4 • Assignment Problems • Network Flow Problems • Sequential Decision Problems • Vehicle Routing Problems • Transportation Problems • Staffing Problems • Production Problems
Agenda • Quiz • Hardness • Modeling with Binary Variables • Issues with binary/integer variables • Rounding may fail
Quiz • 24 hour take-home • Posted noon Monday • Due by noon on Tuesday • Coverage: through today’s lecture
Hardness • LP with n variables • can be solved in √n matrix operations • 2n possibilities for n binary variables • No really faster way knownfor some cases (NP hard problems) • fame + $1m Clay prize for proving it
Binary Variables • Piecewise linear functions • If statements • Discontinuous functions • Set Covering • Versions of the assignment problem
Knapsack Problem • n items • item i has weight wi, value vi • maximize the value in the knapsack • s.t. weight limit B is not exceeded
Knapsack Problem max x1v1+…+xnvn s.t. x1w1+…+xnwn ≤ B xi binary xi = 1 if item i in the knapsack NP hard problem
Penalty • Operating coal plant • $3000 penalty (per day) if emissions > b (emissions always < 88kg/day)
Penalty • $3000 penalty (per day) if emissions > b (emissions always < 88kg/day) • emissions p • f binary • p ≤ 88 + (b-88)f • penalty: (1-f)3000 • unintended option?
Fixed Cost • Transportation Problem • Fixed cost of $1000 for any shipment (quantity shipped always less than 100)
Fixed Cost • xij quantity shipped from i to j • fij binary (1 if xij > 0) • xij ≥ 0, xij ≤ 100 fij • fixed cost of 1000 fij
Facility Location Solution to Maximal Covering Problem w/ 10 facilities Dc=300 Set covering – Find min. # needed to cover all demands Max covering – Cover max # DEMANDS w/ fixed # facilities P-center – Cover all demand nodes w/ fixed # facilities in smallest possible distance Slide courtesy of Prof. Daskin
If statements (Part 2) 0 ≤x and If x≤b, then y=c, else y=d • create binary 0/1 variable z • add the constraints (b-x)/b ≤ z (if x≤b, then z=1) z≤1+(b-x)/b (if x>b, then z=0) y=cz+d(1-z) (if z=1, then y=c else y=d)
Other Integer/Binary issues • Sensitivity Analysis • Relaxation • Rounding
Rounding may fail Example courtesy of Prof. Daskin
Note that none of the points you would get to by rounding(9,9) (10,9), (9,8), (10,8) is feasible! Solution