the weighted average constraint
play

The Weighted Average Constraint Alessio Bonfietti - PowerPoint PPT Presentation

The Weighted Average Constraint Alessio Bonfietti <alessio.bonfietti@unibo.it> Michele Lombardi <michele.lombardi2@unibo.it> DEIS, University of Bologna Main Topic Paper topic: a global constraint for weighted average expressions P n


  1. The Weighted Average Constraint Alessio Bonfietti <alessio.bonfietti@unibo.it> Michele Lombardi <michele.lombardi2@unibo.it> DEIS, University of Bologna

  2. Main Topic Paper topic: a global constraint for weighted average expressions P n − 1 i =0 W i · V i average([ W i ] , [ V i ] , Y ) ↔ Y = P n − 1 i =0 W i Equivalent for integer variables: P n − 1 ! i =0 W i · V i average([ W i ] , [ V i ] , Y ) ↔ Y = round P n − 1 i =0 W i

  3. Motivation Context: workload dispatching for high performance computing Server room Multi-core Platforms

  4. Motivation Context: workload dispatching for high performance computing § Jobs arrive in batches § Jobs are assigned to different machines/cores § Local scheduling (by the OS) § Obj: maximize worst core efficiency Mapped Jobs ... Avg power ... temperature efficiency

  5. Motivation Context: assignment problems with balancing issues customer (size = demand) facility (size = capacity) Single Source Capacitated Facility Problem § Assign customers to facility § Meet capacity constraints ...with Fair Travel Times § Balance the average travel time per facility

  6. Which Model? Modeling Choices: § Assignment variables: n = #customers/jobs m = #facilities/cores X i ∈ { 0 ..m − 1 } ∀ i = 0 . . . n − 1 § For each facility/core k : P n − 1 i =0 ( X i = k ) · power i POWER = By abstracting a little bit: P n − 1 i =0 ( X i = k ) P n − 1 i =0 W i · v i Y = P n − 1 i =0 ( X i = k ) · ttime i P n − 1 i =0 W i TTIME = P n − 1 i =0 ( X i = k )

  7. Which Model? P n − 1 i =0 W i · v i How do we model this expression? Y = P n − 1 i =0 W i § Fixed denominator P n − 1 i =0 W i · v i spread and deviation Y = sum constraint! to improve filtering w § Just post it! n − 1 n − 1 X X Likely weak propagation... W i · v i = Y · W i i =0 i =0

  8. Which Model? P n − 1 i =0 X i · v i How do we model this expression? Y = P n − 1 i =0 X i § Otherwise, we need a new global constraint: average([ W i ] , [ V i ] , Y ) Here it is!

  9. Filtering Spring equivalent: average as a bar pulled by metal spring § Weights W i = spring thickness, Values v i = anchor points

  10. Filtering Spring equivalent: average as a bar pulled by metal spring Y V = [ − 3 , 1 , 1 , 3] [0,3] W 0 = [0 , 3] [0,3] [1,2] W 1 = [1 , 3] W 2 = [1 , 2] [1,3] W 3 = [0 , 3] dark light -3 -2 -1 0 1 2 3 § Assumption 1: fixed values (adapted to variable V i ) § Assumption 2: continuous domains (adapted to integer domains)

  11. Pruning the Average Variable Y upper bound = right-most position for the bar § Minimize all weights § Scan W i from right to left [0,3] [0,3] [1,2] [1,3] -3 -2 -1 0 1 2 3

  12. Pruning the Average Variable Y upper bound = right-most position for the bar § Minimize all weights UB = 1.8 § Scan W i from right to left [0,3] § Maximize W i if: [0,3] v i > current avg [1,2] § Repeat the process [1,3] § WC complexity: O(n) + O(n log(n)) for the ordering -3 -2 -1 0 1 2 3

  13. Pruning the Weight Variables W i upper bound = largest thickness so that the Y boundaries are not crossed Y in [-1.80,-0.25] [0,3] [0,3] [1,2] [1,3] -3 -2 -1 0 1 2 3

  14. Pruning the Weight Variables W i upper bound = largest thickness so that the Y boundaries are not crossed § Maximize W i if: Y in [-1.80,-0.25] v i ≤ max( Y ) [0,3] § Minimize W i if: [0,3] v i > max( Y ) [1,2] § UB if v i > max( Y ) max slack [1,3] § LB if v i < max( Y ) configuration -3 -2 -1 0 1 2 3 Y MS

  15. Pruning the Weight Variables W i upper bound = largest thickness so that the Y boundaries are not crossed § Maximize W i if: Y in [-1.80,-0.25] 2.846 v i ≤ max( Y ) [0,3] § Minimize W i if: [0,3] v i > max( Y ) [1,2] § UB if v i > max( Y ) max slack [1,3] § LB if v i < max( Y ) configuration By solving: num( Y MS ) + (max( W i ) − min( W i )) · v i ≤ max( Y ) den( Y MS ) + (max( W i ) − min( W i )) -3 -2 -1 0 1 2 3 Y MS

  16. Pruning the Weight Variables W i upper bound = largest thickness so that the Y boundaries are not crossed § Maximize W i if: Y in [-1.80,-0.25] 2.846 v i ≤ max( Y ) [0,3] § Minimize W i if: [0,3] v i > max( Y ) [1,2] § UB if v i > max( Y ) max slack [1,3] § LB if v i < max( Y ) configuration § WC complexity: O(n) -3 -2 -1 0 1 2 3 Y MS

  17. Incremental Filtering Problems of this class can grow pretty large: § Thermal Aware Workload Dispatching: 120 to 480 jobs § Fair Capacitated Facility Location: 50 customer, 16-50 locations Incremental filtering can save a lot of computation time § Rules for the fixed values case § Particularly effective for {0,1} weights

  18. Incremental Filtering for the Y Variable Store: § num(Y UB )/den(Y UB ) § Index of the last maximized W i UB = 1.8 [0,3] [2,3] [1,2] [1,3] -3 -2 -1 0 1 2 3

  19. Incremental Filtering for the Y Variable Store: § num(Y UB )/den(Y UB ) § Index of the last maximized W i When a weight changes: [0,3] [2,3] [1,2] [1,3] -3 -2 -1 0 1 2 3

  20. Incremental Filtering for the Y Variable Store: § num(Y UB )/den(Y UB ) § Index of the last maximized W i cur avg = 0.429 When a weight changes: [0,3] § Update current avg [2,3] [1,2] [1,3] -3 -2 -1 0 1 2 3

  21. Incremental Filtering for the Y Variable Store: § num(Y UB )/den(Y UB ) § Index of the last maximized W i cur avg = 0.429 When a weight changes: [0,3] § Update current avg [2,3] [1,2] [1,3] -3 -2 -1 0 1 2 3

  22. Incremental Filtering for the Y Variable Store: § num(Y UB )/den(Y UB ) § Index of the last maximized W i UB = 0.5 When a weight changes: [0,3] [0,3] § Update current avg [2,3] [2,3] § Maximize new W i § No more than n shifts [1,2] [1,2] § No more than n × [1,3] [1,3] dom size updates § WC complexity O(n × dom size) -3 -3 -2 -2 -1 -1 0 0 1 1 2 2 3 3

  23. Experimental Results Experiments on: § Capacitated Facility Location (max worst case average travel time) § Thermal aware workload dispatching: max worst case efficiency Benchmarks: § Problem #1: Single Source instances by Beasley in the OR-Library § Problem #1: custom (publicly available) instances Solution method (goal: testing constraint propagation): § Random restarts with fixed threshold § Random variable and value selection Compare with competitor approaches

  24. Results for Capacitated Facility Location Decomposed)Average) 0.0%& CAP6X& !20.0%& CAP7X& !40.0%& CAP9X& CAP10X& !60.0%& CAP12X& CAP13X& !80.0%& !100.0%& 1& 3& 5& 10& 30& 60&

  25. Results for Thermal Aware Dispatching Decomposed)Average) 0.00%& M1&120& !20.00%& M1&240& !40.00%& M1&480& M2&120& !60.00%& M2&240& M2&480& !80.00%& !100.00%& 1& 3& 5& 10& 30& 60&

  26. Results for Thermal Aware Dispatching Decomposed)Average) 8.00%& 6.00%& 4.00%& M1&120& 2.00%& M1&240& 0.00%& M1&480& !2.00%& M2&120& !4.00%& M2&240& !6.00%& M2&480& !8.00%& !10.00%& 1& 3& 5& 10& 30& 60&

  27. Conclusion Main results § A global constraint for weighted average expressions § Useful for allocation problems with balancing components § (Incremental) Filtering algorithms Future work directions § Apply incremental filtering ideas from the sum constraint § More application scenarios § Devise constraints for other classical inputs to machine learning models

  28. Thanks! Questions? Funded by a DEIS, University of Bologna grant

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend