150 likes | 633 Views
Integer Programming. Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be integer . In some cases a problem that requires an Integer solution can be solved as a Linear program. When?
E N D
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be integer. In some cases a problem that requires an Integer solution can be solved as a Linear program. When? When rounding off a real number to an integer number has no “effect” on your solution.
Integer Programming ! Homework 7-2) ! ! x1 - model 1 ovens ! x2 - model 2 ovens ! max 12 x1 + 8.5 x2 st x1 <= 300 x2 <= 100 2.3 x1 + 1.6 x2 <= 500 end free x1 LP OPTIMUM FOUND AT STEP 2 OBJECTIVE FUNCTION VALUE 1) 2623.913 VARIABLE VALUE REDUCED COST X1 147.826080 0.000000 X2 100.000000 0.000000 You cannot manufacture 147.82608 model 1 ovens. Simply rounding off to 147 model 1 ovens is an acceptable solution.
Integer Programming - Example Classic Knapsack Problem: You want to maximize the value of items you can pack into a single suitcase (or knapsack). However, you are limited to a weight of 50 lbs. xi = 0 if not chosen = 1 if put in knapsack
Integer Programming - Example Classic Knapsack Problem: If integer constraint relaxed - LP OPTIMUM FOUND AT STEP 4 OBJECTIVE FUNCTION VALUE 1) 60.42857 VARIABLE VALUE REDUCED COST XA 0.000000 0.428571 XB 1.000000 0.000000 XC 0.857143 0.000000 XD 1.000000 0.000000 XE 1.000000 0.000000
Integer Programming - Example Classic Knapsack Problem: With integer constraint - OBJECTIVE FUNCTION VALUE 1) 60.00000 VARIABLE VALUE REDUCED COST XA 1.000000 -15.000000 XB 1.000000 -20.000000 XC 0.000000 -18.000000 XD 1.000000 -13.000000 XE 1.000000 -12.000000
Integer Programming - Example Classic Knapsack Problem: How would you modify this formulation if you realized that you could not select item A without selecting item D? Add constraint: xA <= xD How would you modify if you could select at most 3 items? Add constraint: xA + xB +xC +xD +xE <= 3
Integer Programming - Example Other examples of formulating problems: see handouts
Solving IPs and MIPs • Approaches: • Solve to Optimality • Branch and Bound – lesson 6 • Implicit Enumeration – lesson 6 • Cutting Plane Method – lesson 7 • Good and sometimes Optimal Solutions • Heuristics (problem specific) – lesson 7 • Meta-Heuristics – lesson 8 & 9
Solving IPs – Branch and Bound See Branch and Bound On-Line Example
Solving IPs – Implicit Enumeration Similar to Binary IP Branch and Bound General Idea: Fixed variables – those for which a value has been fixed. Free Variable – variables which whose values are unspecified. Completion – when all variables have been assigned a value. Upper Bound (minimization problem) – Best feasible solution found thus far. Lower Bound (minimization problem) – Optimal solution for a relaxed problem at a given node (e.g. some variables fixed, some free).
Solving IPs – Implicit Enumeration Example Sequencing Problem: Sequence a series of jobs to minimize the maximum lateness (Lmax) for a set of jobs to be processed on a single machine. Each job belongs to a given part family. Jobs are denoted with an (i,j) subscript indicating the jth job from family i. Lmax = Max{Lij} Lij = Cij – dij Cijis the completion time of job ij.
Solving IPs – Implicit Enumeration Example Sequencing Problem cont: Also, when starting the processing of a new family, a family setup time is incurred. All jobs are ready to be scheduled at time 0. Optimality Condition: All jobs within a family must be sequenced in earliest due date order (EDD).
Solving IPs – Implicit Enumeration Step 1 – Find an initial Upper bound What is a good upper bound? Step 2 – Perform implicit enumeration. Start building partial sequences and fathom nodes if lower bound for partial sequence exceeds upper bound. Update upper bound whenever a better value is found for a completion. What is a good lower bounding scheme?
Solving IPs – Implicit Enumeration Insert Hand Slides For Example Problem
Solving IPs – Using Lindo max 15xa + 20xb + 18xc + 13xd + 12xest 18xa + 10xb + 21xc + 11xd + 11xe <= 50endint xaint xbint xcint xdint xe Statements – INT and GIN INT – forces binary solution (1 or 0) for decision variable. GIN – forces non-negative integer (0,1,2,3,4…) for decision variable. Knapsack problem: