Combinatorial optimization @ CO@Work 2020, Pawel Lichocki, 25.09.2020 htups://developers.google.com/optimization
Introduction Deep dive Benefits Challenges
Introduction Deep dive Benefits Challenges
Combinatorial optimization 3 2 8 4 6 5 3 1 6 3 5 4 1 6 4 8 7 9 9 5 8 7 9 6 2 8
Solvers 3 2 8 4 6 5 3 1 6 3 5 4 1 6 4 8 7 9 9 5 8 7 9 6 2 8 VRP CP MIP LP SAT Graph
OR-tools 3 2 8 4 6 5 3 1 6 3 5 4 1 6 4 8 7 9 9 5 8 7 9 6 2 8 VRP CP MIP LP SAT Graph
Image stabilization
Datacenter optimization
Street view
Loon
Introduction Deep dive Benefits Challenges
MIP model min/max c 0 + c T x lb ct ≤ Ax ≤ ub ct lb var ≤ x ≤ ub var x j ∈ Z, j ∈ J
Place items
Indices Variables Constants Item i = 1..I double Required(i, r) Bin b = 1..B double Available(b, r) Resource r = 1..R Constraints Objective
Indices Variables Constants Item i = 1..I place(i, b) in {0, 1} double Required(i, r) Bin b = 1..B double Available(b, r) Resource r = 1..R Constraints Objective
Indices Variables Constants Item i = 1..I place(i, b) in {0, 1} double Required(i, r) Bin b = 1..B double Available(b, r) Resource r = 1..R Constraints for item i = 1..I: ∑ b = 1..B place(i, b) = 1 for resource r = 1..R: for bin b = 1..B: ∑ i = 1..I Required(i, r) * place(i, b) ≤ Available(b, r) Objective
Redundancy
Indices Variables Constants Item i = 1..I place(i, b) in [0..Copies(i)] int Copies(i) Bin b = 1..B double Required(i, r) Resource r = 1..R double Available(b, r) Constraints for item i = 1..I: ∑ b = 1..B place(i, b) = Copies(i) for resource r = 1..R: for bin b = 1..B: ∑ i = 1..I Required(i, r) * place(i, b) ≤ Available(b, r) Objective
Fault tolerance
Indices Variables Constants Item i = 1..I place(i, b) in {0, 1} int Copies(i) Bin b = 1..B double Required(i, r) Resource r = 1..R double Available(b, r) Constraints for item i = 1..I: ∑ b = 1..B place(i, b) = Copies(i) for resource r = 1..R: for bin b = 1..B: ∑ i = 1..I Required(i, r) * place(i, b) ≤ Available(b, r) Objective
Balance
Indices Variables Constants Item i = 1..I place(i, b) in {0, 1} int Copies(i) Bin b = 1..B surplus(b) in [0, +inf) double Required(i, r) Resource r = 1..R double Available(b, r) Constraints for item i = 1..I: ∑ b = 1..B place(i, b) = Copies(i) for resource r = 1..R: for bin b = 1..B: ∑ i = 1..I Required(i, r) * place(i, b) ≤ Available(b, r) for bin b = 1..B: ∑ i = 1..I place(i, b) - ∑ i = 1..I Copies(i) / B ≤ surplus(b) Objective min ∑ b = 1..B surplus(b)
Minimize churn
Indices Variables Constants Item i = 1..I place(i, b) in {0, 1} int Copies(i) Bin b = 1..B surplus(b) in [0, +inf) double Required(i, r) Resource r = 1..R double Available(b, r) int MaxChange Constraints bool Placed(i, b) for item i = 1..I: ∑ b = 1..B place(i, b) = Copies(i) for resource r = 1..R: for bin b = 1..B: ∑ i = 1..I Required(i, r) * place(i, b) ≤ Available(b, r) for bin b = 1..B: ∑ i = 1..I place(i, b) - ∑ i = 1..I Copies(i) / B ≤ surplus(b) ∑ b = 1..B ∑ i = 1..I Placed(i, b) * (1 - place(i, b)) ≤ MaxChange Objective min ∑ b = 1..B surplus(b)
Multi-dimensional multi-packing with redundancy, fault tolerance, balancing, and reducing churn
Introduction Deep dive Benefits Challenges
Imperative vs Declarative Input Algorithm Action Input Model Solver Action
Minimalistic min/max c 0 + c T x lb ct ≤ Ax ≤ ub ct lb var ≤ x ≤ ub var x j ∈ Z j ∈ J
Modular Constraints for item i = 1..I: ∑ b = 1..B place(i, b) = Copies(i) for resource r = 1..R: for bin b = 1..B: ∑ i = 1..I Required(i, r) * place(i, b) ≤ Available(b, r) for bin b = 1..B: ∑ i = 1..I place(i, b) - ∑ i = 1..I Copies(i) / B ≤ surplus(b) surplus(b) ≤ max_surplus ∑ b = 1..B ∑ i = 1..I Placed(i, b) * (1 - place(i, b)) ≤ MaxChange
Encapsulated Input Algorithm Action
Encapsulated Input Input Input Algorithm Action Action Action
Encapsulated Input Input Model Solver Input Action Action Action
Introduction Deep dive Benefits Challenges
Meet Define Prototype
Meet Solve Collect data Define Prototype Implement Verify
Meet Solve Collect data Define Prototype Implement Verify
Meet Solve Redefine Collect data Define Prototype Implement Verify
Meet Solve Land Redefine Deploy Collect data Define Prototype Implement Monitor Verify
Meet Solve Land Maintain Redefine Deploy Collect data Define Add features Prototype Implement Monitor Verify
Meet Solve Land Maintain Redefine Deploy Collect data Define Add features Prototype Implement Monitor Verify
Meet Solve Land Maintain 1 month +1 year 3 months forever :-) Redefine Deploy Collect data Define Add features Prototype Implement Monitor Verify
Time spent Investigate Implement GET DATA DISCUSSION CODE EXPLAIN RESULTS
Thank you! CO@Work 2020, Pawel Lichocki, 25.09.2020 htups://developers.google.com/optimization
Recommend
More recommend