+ All Categories
Home > Documents > LP Integer Programming.ppt

LP Integer Programming.ppt

Date post: 03-Nov-2014
Category:
Upload: sudipitm
View: 116 times
Download: 1 times
Share this document with a friend
Description:
lpp
Popular Tags:
36
Integer Programming Decision Variables take Integer Values
Transcript
Page 1: LP Integer Programming.ppt

Integer Programming

Decision Variables take Integer Values

Page 2: LP Integer Programming.ppt

X1

X2

Area of Feasibility

1

2

3

4

5

1 2 3 4 5 6

Point at Intersection are feasible points

as they are integers

Acceptable valuesFor X1, X2 are

(1,1), (2,1), (1,2), (2,2) ..

Page 3: LP Integer Programming.ppt

A cost minimization example

• Minimize Cost = 0.01X1 + 0.07X2

• Subject to :

• 6X1 + 2X2 >= 18 (Constraint 1)

• 8X1 + 10X2 >= 40 (Constraint 2)

• X2 >= 1 (Constraint 3)

• X1, X2 >= 0 (Non Negativity)

Page 4: LP Integer Programming.ppt

Minimization Problem

X2

X1

X2 >= 1

Objective Function8X1 + 10X2 >= 40

6X1 + 2X

2 >= 18Optimum X1 = 2.27, X2 = 2.19

Z = 0.10x2.27 + 0.07x2.19 = 0.38Z (Integer) = 0.10*2 + 0.07*3 = 0.41

A

B

C

4

2

8

10

2 4 6 8 10

3

Optimum (Integer) X1 = 2, X2 = 3

Page 5: LP Integer Programming.ppt

Another Example

• Maximize Z = 40000X1 + 30000X2• Subject to:• 10X1 + 3X2 <= 30• 600X1 + 1000X2 <= 3600• 500X1 + 200X2 <= 1800• X1,X2 >= 0 and integers• Integer : X1 = 2, X2 = 2, Z = 140000• LP : X1 = 2.561, X2 = 1.4634, Z = 146341.46• Simply cannot round LP solutions to get Integers

Page 6: LP Integer Programming.ppt

Types of Integer Programming Problems

• Pure Integer Problems (Number of each type of plane to produce, number of each type of house to construct, and so on..)

• Mixed Integer Problems (have some variables requiring integer values, and some may have continous (decimal) values, like a landscape design which requires the percentage area to plant grass (continous variable) and number of trees to plant (integer variable)

• 0-1 Integer Problems where variables require values as 0 or 1 (binary), or Yes/No type. Examples are a bank considering possible locations for a branch, scheduling of jobs to machines or workers to jobs.

Page 7: LP Integer Programming.ppt

Formulating Integer programming Problems with 0-1 constraints

• Either - or – Alternatives

• k out of n alternatives

• If – Then Alternatives

• Either – Or Constraints

• Variables that have minimum level requirements

Page 8: LP Integer Programming.ppt

Either – Or Alternatives

• A manufacturer may need a machine to replace one that recently has failed. Two alternatives X1 and X2 are being considered, but only one will be needed.

• Constraint : X1 + X2 = 1

• If neither machine will be acquired then constraint is X1 + X2 <= 0

• X1 and X2 are 0 or 1 variables

Page 9: LP Integer Programming.ppt

K out of N Alternatives

• A decision maker (DM) must choose a specified number of alternatives. Say choose 2 machines from a list of 5 alternatives.

• X1 + X2 + X3 + X4 + X5 = 2 (exactly 2)• X1 + X2 + X3 + X4 + X5 >= 2 (atleast 2)• X1 + X2 + X3 + X4 + X5 <= 2 (atmost 2)• Choosing anywhere 2 to 4 • X1 + X2 + X3 + X4 + X5 >= 2 (lower bound) • X1 + X2 + X3 + X4 + X5 <= 4 (upper bound)

Page 10: LP Integer Programming.ppt

If – Then Alternatives

• DM has to take some action which necessitates another action that supports the initial decision

• Purchase of X2 machine may necessitate purchase of another X1 machine, then : X1 >= X2 or X1 – X2 >= 0 (Reverse is not true)

• If purchase of either machine requires the purchase of the other then X1 – X2 = 0

Page 11: LP Integer Programming.ppt

Either – Or Constraints

• Situations may arise in which a constraint will apply only if a particular alternative is chosen

• A certain machine may necessitate special power requirements. Hence it can be able to “turn-on” or “turn-off” a constraint.

• A machine X3 requires the constraint 5X1 + 3X2 >= 100.

• Formulate as 5X1 + 3X2 >= 100X3, X3 is 0-1 variable 5X1 + 3X2 – 100X3 >= 0

• If X3 is not chosen, constraint 5X1 + 3X2 >= 50 is required. Formulate as :

• 5X1 + 3X2 >= 100X3 (if X3 is chosen)• 5X1 + 3X2 >= 50(1-X3) (if X3 is not chosen)

Page 12: LP Integer Programming.ppt

Variables that have Minimum Level Requirements

• At times, a variable either will have a zero value or an amounts that exceeds a specified value.

• Example is the minimum order size for a purchased part might be required by a vendor. Say min qty for X1 is 200 units.

• X1 >= 200Y1 (Y1 is 0-1 variable)• X1 – 200Y1 >= 0, X1 = integer, Y1 = 0 or 1• If X1 = 0, the constraint would force Y1 to be zero

Page 13: LP Integer Programming.ppt

Specialized Integer Programming Problems

• Fixed Charge problem

• Set Covering problem

• Knapsack problem

• Facility Location problem

• Traveling Salesperson problem

Page 14: LP Integer Programming.ppt

Fixed Charge Example

• For situations that involve fixed costs if a certain activity is undertaken.

• Contribution that a variable makes to profit is linear after a fixed charge has been deducted.

• Suppose that profit per unit on a machine may be $20 per unit after a setup cost of $80 has been allowed for.

• Portion of Obj function Max Z = 20X1 – 80Y1• Add X1 <= MY1 or X1 – MY1 <= 0 where M is a very

large number, Y1 = 0-1 variable, X1 = integer.• If X1 = 0, Y1 = 0. If X1 # 0, Y1 = 1 plus making the

constraint non – binding as M is very large.

Page 15: LP Integer Programming.ppt

Fixed Charge Example

• X1, X2 = Qty of product 1 and 2 respectively.• Y1 = 1 if X1 > 0, Y1 = 0 if X1 = 0• Y2 = 1 if X2 > 0, Y2 = 0 if X2 = 0• M = very large number• Max Z = 20X1 + 30X2 - 80Y1 – 90Y2• ST : 2X1 + 2X2 <= 400 hours (M/C Time)• X1 – MY1 <= 0 (Fixed Charge for Product 1)• X2 – MY2 <= 0 (Fixed Charge for Product 2)• X1, X2 >= 0 and integer, Y1,Y2 = 0-1 variable• Optimal Solution X2 = 200, Y2 = 1, Total Profit = 5910

Page 16: LP Integer Programming.ppt

Fixed Charge Problem

• A company makes 3 products A,B,C. Unit profit for A,B,C are $6,$10,$5 respectively. The products can be manufactured using one of the two processes. Demand for A is predicted to be between 50 and 100 units per week. For product B, demand is between 150 to 200 units per week. Similarly for product C, it is predicted to be between 100 to 150 units per week.

• Process 1 has a capacity of 2000 hours per week, with product A, B, C taking 4 hours, 6 hours and 3 hours per unit. The setup cost for process 1 is $100 and setup time is 24 hours.

• Process 2 has a capacity of 2400 hours per week, with product A, B, C taking 5 hours, 7 hours and 4 hours per unit. The setup cost for process 2 is $80 and setup time is 18 hours.

• Determine the production schedule that will maximize the profit and also determine which of the two processes will be utilized.

Page 17: LP Integer Programming.ppt

Fixed Charge Problem• Let X1, X2, X3 be units of Product A,B, C• Let Y1, Y2 be the 0-1 variables for Process 1 and 2• Maximize Z = 6X1 + 10X2 + 5X3 – 100Y1 – 80Y2• Subject to• 4X1 + 6X2 + 3X3 + 24Y1 <= 2000 hours (Process 1)• 5X1 + 7X2 + 4X3 + 18Y2 <= 2400 hours (Process 2)• X1 >= 50• X1 <= 100• X2 >= 150• X2 <= 200• X3 >= 100• X3 <= 150• Y1 + Y2 = 1 (Any one Process is to be selected)• X1,X2,X3 >= 0 and integer• Y1,Y2 = 0 or 1• Optimal Solution X1 = 80, X2 = 200, X3 = 150, Y1 = 1, Y2 = 0, Max Profit = $3330

Page 18: LP Integer Programming.ppt

Set Covering Problem• A telecommunication company is considering expanding its cable and internet

services operations into a new area. The area is divided into 10 neighborhoods. The company is considering 7 location nodes to reach all 10 neighborhoods

• The cost for opening the seven nodes are $125, $85, $70, $60, $90, $100 and $110.

• Seven nodes can reach the following neighborhoods :• Node 1 : Neighborhoods 1,3,4,6,9, 10• Node 2 : Neighborhoods 2,4,6,8• Node 3 : Neighborhoods 1,2,5• Node 4 : Neighborhoods 3,6,7,10• Node 5 : Neighborhoods 2,3,7,9• Node 6 : Neighborhoods 4,5,8,10• Node 7 : Neighborhoods 1,5,7,8,9• Determine which nodes should be opened to provide coverage to all

neighborhoods at a minimum cost

Page 19: LP Integer Programming.ppt

Set Coverage Problem• Let Cj be cost of operating or setting up node j (j = 1,2,3,…7)• Let Xj = 1 if node j provides service (j = 1,2,3,…7)• Let Xj = 0 if node j does not provide service (j = 1,2,3,…7)• Minimize Z = 125X1 + 85X2 + 70X3 + 60X4 + 90X5 + 100X6 + 110X7• Subject to :• X1 + X3 + X7 >= 1 (coverage of neighborhood 1)• X2 + X3 + X5 >= 1 (coverage of neighborhood 2)• X1 + X4 + X5 >= 1 (coverage of neighborhood 3)• X1 + X2 + X6 >= 1 (coverage of neighborhood 4)• X3 + X6 + X7 >= 1 (coverage of neighborhood 5)• X1 + X2 + X6 >= 1 (coverage of neighborhood 6)• X4 + X5 + X7 >= 1 (coverage of neighborhood 7)• X2 + X6 + X7 >= 1 (coverage of neighborhood 8)• X1 + X5 + X7 >= 1 (coverage of neighborhood 9)• X1 + X4 + X6 >= 1 (coverage of neighborhood 10)• X1, X2, X3, X4, X5, X6, X7 = 0 or 1• Optimal Answer X2 = 1, X4 = 1, X7 = 1 Cost = $255

Page 20: LP Integer Programming.ppt

1 2 3 4 5 6 7 8 9 10

1 Y Y Y Y Y Y

2 Y Y Y Y

3 Y Y Y

4 Y Y Y

5 Y Y Y Y

6 Y Y Y Y Y

7 Y Y Y Y Y

Neighbourhood

Node

Page 21: LP Integer Programming.ppt

KnapSack Problem

• The Knapsack problem is defined as how many units of different kinds of items or products to put in a knapsack with a given capacity in order to maximize profit.

• Maximize Z = C1X1 + C2X2 + …. + CnXn

• Subject to :

• A1X1 + A2X2 + ….. + AnXn <= B

• X1, X2,.. Xn >= 0 and integer

Page 22: LP Integer Programming.ppt

Knapsack Example

• TriState must purchase three possible major food items : poultry, ice-cream, yoghurt in batches to realize quantity discounts for filling up vacant 5 tons capacity in its super freezer.

• One batch of ice-cream weighs 2 tons and profit per batch is $90. One batch of poultry weights 3 tons and profit per batch is $150, while one batch of yoghurt weighs 1 ton and profit per batch is $30.

• Let X1,X2,X3 = batch of ice-cream, poultry, yoghurt• Maximize Z = 90X1 + 150X2 + 30X3• Subject to : • 2X1 + 3X2 + X3 <= 5 tons• X1, X2, X3 >= 0 and integer• Optimal Solution : X1 = 1, X2 = 1, Max Profit = $240

Page 23: LP Integer Programming.ppt

Facility Location Problem

• Here we consider many new locations and also take capacity considerations

• 0-1 mixed integer programming is utilized.

• Used for location of plants, hospitals, healthcare facilities, fast food restaurants, schools, police and fire stations.

Page 24: LP Integer Programming.ppt

Facility Location Problem

• M&R Manufacturing Company is considering a major expansion. It has 2 plants A & B with capacity of 26000 units and 30000 units per annum respectively. The company sells through its retail outlets located at P, Q, R and S with annual demands of 27000, 32000, 23000 and 30000 units per annum.

• The company is in the process of considering four new manufacturing plant locations at I, J, K and L. The capacities and cost of purchasing or building the facility is as : I – 30000 units / $220000, J – 33000 units / $260000, K – 26000 units / $ 200000, L – 37000 units / $ 280000.

• The shipping costs from the existing plants and the 4 new plant locations to the existing retail outlets is given.

• Determine the optimal shipping schedule that minimizes the total cost which includes the shipping cost and cost of building/purchasing, such that the total demand at all retail outlets is satisfied.

Page 25: LP Integer Programming.ppt

Plant RO P RO Q RO R RO S Supply

A 7 5 4.5 5.5 26000

B 5 7 12 11 30000

I (New) 9 6.5 2 3.5 30000

J (New) 6 3.5 5 3 33000

K (New) 8 6 2.5 4 26000

L (New) 6.5 4.5 5 3 37000

Demand 27000 32000 23000 30000

Shipping Cost per Unit

Total Demand = 112000, while Existing Capacity = 56000.New Capacity to be added should be 56000 or more

Page 26: LP Integer Programming.ppt

Facility Location Problem• m = number of sources of supply (m = 1,2)• k = number of sources of new supply (k = 1,2,3,4)• j = number of destinations (j = 1,2,3,4)• Cij = Shipping cost of one unit from source i to destination j• Xij = Units shipped from source I to destination j• Pk = Purchase cost of plant k• Min Z = Σ Σ CijXij + Σ PkYk for all i, j and k• Subject to :• Σ Xij <= Si for all i (Supply at existing plant, I = 1,2)

• Σ Xij <= SiYifor all i (Supply at new proposed plant, i = 3,4,5,6)

• Σ Xij <= Dj for all j (Demand at destination, j = 1,2,3,4)

• Xij >= 0, Yk = 0 or 1

Page 27: LP Integer Programming.ppt

Plant RO P RO Q RO R RO S Supply

A 26000 26000

B 27000 3000 30000

I (New) 30000 30000

J (New) 33000

K (New) 3000 23000 26000

L (New) 37000

Demand 27000 32000 23000 30000 112000

Shipping Schedule

Total Demand = 112000, while Existing Capacity = 56000.New Capacity to be added should be 56000 and added with plant I and K

The cost of building or Purchasing plant I and K is 220000 + 200000 = $420000The total Minimum Cost is $ 886500. Shipping Cost = $466500

Page 28: LP Integer Programming.ppt

Traveling Salesperson Problem

• It attempts to minimize total cost, distance or time of departing location I and returning to same location I in a tour, visiting all locations once.

• It is like the transportation problem, but relatively complicated.

Page 29: LP Integer Programming.ppt

Traveling Salesperson Example

• The City Garbage collection team wants to determine the best route for their garbage trucks. There are 4 sections in the city under consideration. The time of travel (in minutes) between the various sections of the city is given.

• If location 1 is the garage from which garbage trucks leave and to which they return, formulate this problem as a traveling salesperson problem

Page 30: LP Integer Programming.ppt

From/To

1 2 3 4

1 0 8 6 5

2 8 0 3 7

3 6 3 0 9

4 5 7 9 0

Travel Time (in minutes) between locations

Page 31: LP Integer Programming.ppt

Traveling Salesperson Example

• Let Xijk = 0 or 1 for travel from start location i to end location j in journey leg k.

• There are 4 locations : 1, 2, 3, 4• In leg 1, start from node 1 and go to node 2,

node 3, node 4• In leg 4, come to node 1 from node 2, node 3,

node 4.• In leg 2, go from node 2 to node 3, node 4 or go

from node 3 to node 4 or node 2• In leg 3, go from node 2 to node 3, node 4 or go

from node 3 to node 4 or node 2

Page 32: LP Integer Programming.ppt

Leg DV 1

DV 2

DV3

DV 4

DV 5

DV 6

1 X121 X131 X141

2 X232 X242 X342 X422 X432 X322

3 X233 X243 X343 X423 X433 X323

4 X214 X314 X414

Decision Variables (DV) for each leg in a 4 node problem

Xijk = travel from start location i to end location j in journey leg k.

Page 33: LP Integer Programming.ppt

Constraints

• For every leg of journey (1, 2, 3,and 4), no of journeys = 1

• No of Visits from Node 2, 3 and 4 = 1• No of Visits to Node 2, 3 and 4 = 1• Leg 2 starts where Leg 1 ends for Node 2, 3 and

4• Leg 3 starts where leg 2 ends for Nodes 2, 3 and

4• Leg 4 starts where leg 3 ends for Nodes 2, 3 and

4

Page 34: LP Integer Programming.ppt

Problem FormulationMinimize Z1 = 8X121 + 6X131 + 5X141Minimize Z2 = 3X232 + 7X242 + 9X342 + 7X422 + 9X432 + 3X322Minimize Z3 = 3X233 + 7X243 + 9X343 + 7X423 + 9X433 + 3X323Minimize Z4 = 8X214 + 6X314 + 5X414Minimize Z = Z1 + Z2 + Z3 + Z4Subject to :X121 + X131 + X141 = 1 (Starting node is 1 or Leg 1 visits limited to 1)X214 + X314 + X414 = 1 (Ending Node is 1 or Leg 4 visits limited to 1)X232 + X242 + X342 + X422 + X322 + X432 = 1 (leg 2 visits limited to 1)X233 + X243 + X343 + X423 + X323 + X433 = 1 (leg 3 visits limited to 1)X214 + X232 + X242 + X233 + X243 = 1 (visits from node 2 are limited to 1)X314 + X322 + X323 + X342 + X343 = 1 (visits from node 3 are limited to 1)X414 + X422 + X432 + X423 + X433 = 1 (visits from node 4 are limited to 1)X121 + X322 + X422 + X323 + X423 = 1 (visits to node 2 are limited to 1)X131 + X232 + X233 + X432 + X433 = 1 (visits to node 3 are limited to 1)X141 + X242 + X243 + X342 + X343 = 1 (visits to node 4 are limited to 1)X121 = X232 + X242 (leg 1 ends where leg 2 starts)X131 = X322 + X342 (leg 1 ends where leg 2 starts)X141 = X422 + X432 (leg 1 ends where leg 2 starts)If leg 2 of trip ends at location 2,3 or 4, leg 3 of trip must start at node 2, 3 or 4X322 + X422 = X233 + X243 (Node 2)X232 + X432 = X323 + X343 (Node 3)X242 + X342 = X423 + X433 (Node 4)X323 + X423 = X214 (last leg of trip must end at location 1)X233 + X433 = X314 ( --- do ---)X243 + X343 = X414 (---- do ---)Xijk = 0 or 1 for all I,j,k

Page 35: LP Integer Programming.ppt

From/To

1 2 3 4

1 0 8 6 5

2 8 0 3 7

3 6 3 0 9

4 5 7 9 0

Travel Time (in minutes) between locations

Total Time = 6 + 3 + 7 + 5 = 21Route is location 1 to 3 to 2 to 4 to 1

Optimal Solution

Page 36: LP Integer Programming.ppt

Difficulties in Solving Integer Programming Problems

• In Integer Programming, a finite number of integer points are considered which are more than the feasible points in linear programming.

• As the number of variables (n) increase, the no of solutions are 2n in 0-1 programming.

• In pure integer programming, the number of solutions taking integer values are still more as compared to 0-1 variables in 0-1 programming.

• The computational procedures for integer programming are not as simple as that in linear programming.


Recommended