CSCI 573 Linear and Mixed Integer Programming Sven

  • Slides: 24
Download presentation
CSCI 573 Linear and Mixed Integer Programming Sven Koenig

CSCI 573 Linear and Mixed Integer Programming Sven Koenig

Linear Programming (LP) A cement manufacturer produces two types of cement: A and B.

Linear Programming (LP) A cement manufacturer produces two types of cement: A and B. They cannot make more than 1600 kilograms a day due to a shortage of transport vehicles. A sales contract forces them to produce at least 500 kilograms of cement B per day. It takes 0. 48 (0. 24) minutes to make a kilogram of cement A (B) and the plant operates 8 hours a day. The profit is $4 ($3) per kilogram of cement A (B). How many kilograms of cement A and B should they make to maximize their profit?

Linear Programming (LP) A = produced kg’s of cement A per day B =

Linear Programming (LP) A = produced kg’s of cement A per day B = produced kg’s of cement B per day Maximize 4 A + 3 B Subject to n n A + B ≤ 1600 B ≥ 500 0. 48 A + 0. 24 B ≤ 480 A ≥ 0, B ≥ 0

Almost Linear Programming (LP) A cement manufacturer produces two types of cement: A and

Almost Linear Programming (LP) A cement manufacturer produces two types of cement: A and B. They cannot make more than 1600 bags a day due to a shortage of transport vehicles. A sales contract forces them to produce at least 500 bags of cement B per day. It takes 0. 48 (0. 24) minutes to make a bag of cement A (B) and the plant operates 8 hours a day. The profit is $4 ($3) per bag of cement A (B). How many bags of cement A and B should they make to maximize their profit?

Appendix Linear Programming (LP) A manufacturer produces animal feed with 2 active ingredients and

Appendix Linear Programming (LP) A manufacturer produces animal feed with 2 active ingredients and a filler ingredient. One kg of feed mix must contain 90 g of nutrient A, 50 g of nutrient B, 20 g of nutrient C and 2 g of nutrient D. The ingredients have the following nutrient values and costs. What should be the amount of ingredients in one kg of feed mix to minimize cost? (The filler ingredient costs nothing. ) A B C D $/kg Active Ingredient 1 (g/kg) 100 80 40 10 40 Active Ingredient 2 (g/kg) 200 150 20 --- 60

Appendix Linear Programming (LP) A = kg of ingredient 1 per kg of feed

Appendix Linear Programming (LP) A = kg of ingredient 1 per kg of feed mix B = kg of ingredient 2 per kg of feed mix Minimize 40 A + 60 B Subject to n n n A+B≤ 1 100 A + 200 B ≥ 90 80 A + 150 B ≥ 50 40 A + 20 B ≥ 20 10 A ≥ 2 A ≥ 0, B ≥ 0

Appendix Linear Programming (LP) Feasible region (all of these points satisfy the constraints) Solution

Appendix Linear Programming (LP) Feasible region (all of these points satisfy the constraints) Solution (a point in the feasible region that minimizes the objective function) Exact solution: A = 0. 3667 B = 0. 2667

Appendix Linear Programming (LP) LPs can be solved in polynomial time. In practice, one

Appendix Linear Programming (LP) LPs can be solved in polynomial time. In practice, one often uses variants of the simplex method (which is not guaranteed to run in polynomial time but often runs very fast).

Appendix Mixed Integer Programming (MIP) What if there is a fixed cost of $15

Appendix Mixed Integer Programming (MIP) What if there is a fixed cost of $15 if any of active ingredient 2 is used?

Appendix Mixed Integer Programming (MIP) A = kg of ingredient 1 per kg of

Appendix Mixed Integer Programming (MIP) A = kg of ingredient 1 per kg of feed mix B = kg of ingredient 2 per kg of feed mix X = 1 if B > 0, 0 otherwise Minimize 40 A + 60 B + 15 X Subject to n n n n A+B≤ 1 100 A + 200 B ≥ 90 80 A + 150 B ≥ 5 40 A + 20 B ≥ 20 10 A ≥ 2 B≤X A ≥ 0, B ≥ 0, X ≥ 0 X is integer

Appendix Mixed Integer Programming (MIP) What if they need to satisfy only three of

Appendix Mixed Integer Programming (MIP) What if they need to satisfy only three of the four nutrient constraints?

Appendix Mixed Integer Programming (MIP) A = kg of ingredient 1 per kg of

Appendix Mixed Integer Programming (MIP) A = kg of ingredient 1 per kg of feed mix B = kg of ingredient 2 per kg of feed mix X 1 = 1 if constraint 1 is satisfied, 0 otherwise X 2 = … Minimize 40 A + 60 B + 15 X Subject to n n n n A+B≤ 1 100 A + 200 B ≥ 90 X 1 80 A + 150 B ≥ 5 X 2 40 A + 20 B ≥ 20 X 3 10 A ≥ 2 X 4 X 1 + X 2 + X 3 + X 4 ≥ 3 A ≥ 0, B ≥ 0, 1 ≥ X 1 ≥ 0, 1 ≥ X 2 ≥ 0, 1 ≥ X 3 ≥ 0, 1 ≥ X 4 ≥ 0 X 1, X 2, X 3 and X 4 are integer

Appendix Mixed Integer Programming (MIP) MIPs can likely not be solved in polynomial time

Appendix Mixed Integer Programming (MIP) MIPs can likely not be solved in polynomial time (solving them is NP-hard). Viewing MIPs as LPs and rounding variables to the closest integer can result in large errors. In practice, one often uses CPLEX, industrial-strength software that can solve LPs and MIPs.

Appendix Source for LP and MIP Material This problem and many more examples can

Appendix Source for LP and MIP Material This problem and many more examples can be found in the OR Notes by J. E. Beasly at people. brunel. ac. uk/~mastjjb/jeb/or/contents. html

An AI Problem Assume that there are N robots in the plane at initial

An AI Problem Assume that there are N robots in the plane at initial locations R 1, …, RN. There are M target locations T 1, …, TM in the same plane. Each target has to be visited by at least one robot. The robots do not need to return to their initial locations. Write a mixed integer program that determines which robot should visit which target locations and in which order if the team objective is to minimize the sum of the travel distances of all robots.

An AI Problem Multi-robot routing problems can be solved optimally with Mixed Integer Programming

An AI Problem Multi-robot routing problems can be solved optimally with Mixed Integer Programming (MIP) methods, such as CPLEX: Index sets and constants: VR = Set of robot vertices VT = Set of target vertices c(i, j) = Path cost from vertex i to vertex j Variables: xij = Is vertex j visited by some robot directly after vertex i? (1 = yes, 0 = no)

An AI Problem Multi-robot routing problems can be solved optimally with Mixed Integer Programming

An AI Problem Multi-robot routing problems can be solved optimally with Mixed Integer Programming (MIP) methods, such as CPLEX: (C 1) (C 2) (C 3)

An AI Problem Multi-robot routing problems can be solved optimally with Mixed Integer Programming

An AI Problem Multi-robot routing problems can be solved optimally with Mixed Integer Programming (MIP) methods, such as CPLEX: (C 1) Each target vertex is entered exactly once (C 2) Each (robot or target) vertex is left at most once (C 3) There are no subtours (= cycles)

An AI Problem Objective only

An AI Problem Objective only

An AI Problem Objective and constraint C 1 only (a possible solution, not necessarily

An AI Problem Objective and constraint C 1 only (a possible solution, not necessarily the optimal one)

An AI Problem Objective and constraints C 1 and C 2 only (a possible

An AI Problem Objective and constraints C 1 and C 2 only (a possible solution, not necessarily the optimal one)

An AI Problem Objective and constraints C 1, C 2 and C 3 (a

An AI Problem Objective and constraints C 1, C 2 and C 3 (a possible solution, not necessarily the optimal one)

An AI Problem The number of subtour elimination constraints (C 3) is exponential in

An AI Problem The number of subtour elimination constraints (C 3) is exponential in the number of targets. Only small multi-robot routing problems can be solved optimally with MIP methods, even after tuning them (for example, by using cutting plane techniques).

An AI Problem See page 5 of “Simple Auctions with Performance Guarantees for Multi-Robot

An AI Problem See page 5 of “Simple Auctions with Performance Guarantees for Multi-Robot Task Allocation” by Lagoudakis et al. (IROS 2004) idm-lab. org/bib/abstracts/Koen 04 i. html