Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CPLEX 12.9 - Performance, multi-objective, modeling assistance callback

247 views

Published on

CPLEX 12.9 has been released and brings exciting improvements and new features. In this session, we will present this new version:
- more performance on LP, MIP and other problem categories
- with multiobjective solve capabilities, you can express hierarchies of objectives and let CPLEX provide you the solution that optimizes the value of the various objectives in this hierarchy, controlling whether degrading an objective is allowed in order to improve on the next ones.
- with the new Modeling Assistance callback, you can filter the warnings about your model that CPLEX provides. This allows you to focus on specific parts of your problem, or specific warning types, and help you find devise better models.

Published in: Software
  • Be the first to comment

  • Be the first to like this

CPLEX 12.9 - Performance, multi-objective, modeling assistance callback

  1. 1. © 2019 IBM Corporation IBM CPLEX Optimizer 12.9 Performance, Multi-objective, Modeling Assistance callback Xavier Nodet, Program Manager, CPLEX Optimization Studio xavier.nodet@fr.ibm.com
  2. 2. © 2019 IBM Corporation2 CPLEX PERFORMANCE
  3. 3. © 2019 IBM Corporation3 0 2 4 6 8 10 12 14 0 50 100 150 200 250 300 350 400 450 500 12.1 (2009) 12.2 (2010) 12.4 (2011) 12.5.0 (2012) 12.6.0 (2013) 12.6.1 (2014) 12.6.3 (2015) 12.7.0 (2016) 12.8.0 (2017) 12.9.0 (2019) totalspeedup numberoftimeouts CPLEX MILP performance evolution ³ 10 sec ³ 100 sec ³ 1000 sec Date: Jun/2019 Testset: MILP: 4596 models Machine: Intel X5650 @ 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec (2019)
  4. 4. © 2019 IBM Corporation4 CPLEX 12.8.0 vs.12.9.0: MILP performance improvement 0 0,2 0,4 0,6 0,8 1 >1s >10s >100s 1,00 1,00 1,00 0,93 0,90 0,84 CPLEX 12.8.0 CPLEX 12.9.0 Deterministic parallel MILP (12 threads) 2109 models 696 models Time limits: 42 / 30 1.07x 1.20x1.11x 1317 models § MILP improvements summary - Presolve: 5% - Dynamic search: 3% - Heuristic manager: 3% - Cutting planes: 5% Date: Mar/2019 Testset: LP: 2318 models Machine: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec
  5. 5. © 2019 IBM Corporation5 CPLEX 12.8.0 vs.12.9.0: LP performance improvement 0 0,2 0,4 0,6 0,8 1 >1s >10s >100s 1,00 1,00 1,00 0,92 0,88 0,81 CPLEX 12.8.0 CPLEX 12.9.0 Deterministic concurrent LP (12 threads) 709 models 177 models Time limits: 6 / 3 1.09x 1.23x1.14x 388 models § LP improvements summary - Presolve - LP folding - Improved Cholesky factorization (LP barrier) - Faster LU factorization for dense problems (simplex and crossover) Date: Mar/2019 Testset: LP: 2318 models Machine: Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec
  6. 6. © 2019 IBM Corporation7 CPLEX 12.8.0 vs.12.9.0: Benders B&C improvements 0 0,2 0,4 0,6 0,8 1 >1s >10s >100s 1,00 1,00 1,00 0,64 0,55 0,42 CPLEX 12.8.0 CPLEX 12.9.0 Date: 26 October 2018 Testset: Benders MILP: 390 models Machine: Intel X5650 @ 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec Benders MILP branch-and-cut (12 threads) 314 models 127 models Time limits: 13 / 0 1.56x 2.36x1.83x 229 models § Benders improvements summary - Improved numerics for optimality cuts • Particularly effective on “Stochastic Fixed Charge Multi-commodity Network Design” models - Stronger normalization for feasibility cuts • Proposed by [Conforti and Wolsey, 2018] for generic Cut Generating LPs (CGLPs) • Particularly effective on “Network Expansion” models
  7. 7. © 2019 IBM Corporation8 WHY MULTIOBJECTIVE?
  8. 8. © 2019 IBM Corporation9 Why multiobjective? § Real life problems very often have multiple dimensions along which a solution is measured (Key Performance Indicators): - Routing: Cost vs Time - Plant planning: Production vs Delays - Personnel scheduling: Skills vs Preferences vs Fairness
  9. 9. © 2019 IBM Corporation10 Are KPIs comparable? § If KPIs can be compared: - Often expressed in the same unit (e.g. monetary) - Best solution is the one that minimizes the sum - All KPIs blended in a single objective § Easy to implement using a MIP solver § But CPLEX didn't offer support to facilitate modeling
  10. 10. © 2019 IBM Corporation11 Are KPIs comparable? § Some KPIs may be absolutely more important than others - True hierarchy between KPIs - Any improvement in one KPI is worth any degradation in lower priority KPIs § Implies large spread of coefficients in the objective § Often creates numerical issues § Default gap limit may be too large
  11. 11. © 2019 IBM Corporation12 MULTIOBJECTIVE IN CPLEX
  12. 12. © 2019 IBM Corporation13 Attributes of each KPI § Priority - Integer, default = 0 - Defines the order in which KPIs will be dealt with - If priority is the same for several KPIs, they are blended together § Weight - Floating point, default = 1.0 - Applied to the expression of the KPI - Mostly useful when blending, can also be used to reverse the direction of a KPI § Absolute and relative tolerances - Floating point, default = 0.0 - Used when there are several priorities - MIP: Define the range over which the KPI may be degraded to accommodate for better optimal values for lower-priority KPIs - LP: Allowed range for fixed reduced costs
  13. 13. © 2019 IBM Corporation14 Parameter sets § Parameters specified in the CPLEX environment apply to each multiobjective solve § To change some parameters for a single solve only, use parameter sets § Each solve may apply 0 or 1 parameter set § If no parameter set is specified, global settings apply § If a parameter set is specified, it applies on top of default settings § Global work limits specified in the CPLEX environment always apply. § Usage: - Setting a work or gap limit on an iteration - Changing algorithmic settings
  14. 14. © 2019 IBM Corporation15 Multiobjective for MILP § Blend together the objectives of same priority This defines the list of iterations § For each iteration, by decreasing priority order - If there was a previous iteration: • Apply its solution as a mipstart • Add a constraint so that previous KPI group stays at its optimal value, possibly with tolerances applied • Update global work limits, if any - If there is a parameter set for that iteration: • Set all parameter to default, except work limits • Apply parameters from the parameter set - Solve the MIP
  15. 15. © 2019 IBM Corporation16 LP FORMAT
  16. 16. © 2019 IBM Corporation17 Weights, priorities, tolerances Maximize multi-objectives first: x1 second: x2 Subject to x1 + x2 = 10 General x1 x2 End
  17. 17. © 2019 IBM Corporation18 Weights, priorities, tolerances Maximize multi-objectives first: x1 second: x2 Subject to x1 + x2 = 10 General x1 x2 End $ cplex –c "read 1.lp" "opt" "display solution variables *" [...] Multi-objective solve log . . . Index Priority Blend Objective 1 0 2 1.0000000000e+01 Multi-objective optimal [...] CPLEX> Incumbent solution Variable Name Solution Value x1 10.000000 All other variables matching '*' are 0.
  18. 18. © 2019 IBM Corporation19 Weights, priorities, tolerances Maximize multi-objectives first: x1 second: weight = 2 x2 Subject to x1 + x2 = 10 General x1 x2 End $ cplex –c "read 1.lp" "opt" "display solution variables *" [...] Multi-objective solve log . . . Index Priority Blend Objective 1 0 2 2.0000000000e+01 Multi-objective optimal [...] CPLEX> Incumbent solution Variable Name Solution Value x2 10.000000 All other variables matching '*' are 0.
  19. 19. © 2019 IBM Corporation20 Weights, priorities, tolerances Maximize multi-objectives first: x1 second: priority=-1 x2 Subject to x1 + x2 = 10 General x1 x2 End $ cplex –c "read 1.lp" "opt" "display solution variables *" [...] Multi-objective solve log . . . Index Priority Blend Objective 1 0 1 1.0000000000e+01 2 -1 1 0.0000000000e+00 Multi-objective optimal [...] CPLEX> Incumbent solution Variable Name Solution Value x1 10.000000 All other variables matching '*' are 0.
  20. 20. © 2019 IBM Corporation21 Weights, priorities, tolerances Maximize multi-objectives first: abstol=2 x1 second: priority=-1 x2 Subject to x1 + x2 = 10 General x1 x2 End $ cplex –c "read 1.lp" "opt" "display solution variables *" [...] Multi-objective solve log . . . Index Priority Blend Objective 1 0 1 1.0000000000e+01 2 -1 1 2.0000000000e+00 Multi-objective optimal [...] CPLEX> Incumbent solution Variable Name Solution Value x1 8.000000 X2 2.000000 All other variables matching '*' are 0.
  21. 21. © 2019 IBM Corporation22 atlanta-ip.lp Minimize obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296
  22. 22. © 2019 IBM Corporation23 atlanta-ip.lp Minimize obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296
  23. 23. © 2019 IBM Corporation24 atlanta-ip.lp Minimize obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296
  24. 24. © 2019 IBM Corporation25 atlanta-ip.lp Minimize obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296
  25. 25. © 2019 IBM Corporation26 atlanta-ip.lp Minimize multi-objectives obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 obj2: + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296 Multiobjective, blended. No change from original model...
  26. 26. © 2019 IBM Corporation27 atlanta-ip.lp Minimize multi-objectives obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 obj2: priority = -1 + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296 Multiobjective, hierarchical
  27. 27. © 2019 IBM Corporation28 atlanta-ip.lp Minimize multi-objectives obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 obj2: priority = -1 weight = 10000 + 0.0000302098 x133 + 0.0000278248 x134 + 0.0000321177 x135 + 0.0000311638 x136 + 0.0000569215 x137 + 0.0000182849 x138 [...] + 0.00000209408 x31291 + 0.00000278902 x31292 + 0.00000278902 x31293 + 0.00000201069 x31294 + 0.00000315039 x31295 + 0.00000153813 x31296 Multiobjective, hierarchical, scaled
  28. 28. © 2019 IBM Corporation29 atlanta-ip.lp Minimize multi-objectives obj: x1 + 2 x2 + 3 x3 + 5 x4 + 9 x5 + 17 x6 + x7 + 2 x8 + 3 x9 + 5 x10 + 9 x11 + 17 x12 + x13 + 2 x14 + 3 x15 + 5 x16 + 9 x17 + 17 x18 + x19 + 2 x20 [...] + 17 x126 + x127 + 2 x128 + 3 x129 + 5 x130 + 9 x131 + 17 x132 obj2: priority = -1 + 0.302098 x133 + 0.278248 x134 + 0.321177 x135 + 0.311638 x136 + 0.569215 x137 + 0.182849 x138 [...] + 0.0209408 x31291 + 0.0278902 x31292 + 0.0278902 x31293 + 0.0201069 x31294 + 0.0315039 x31295 + 0.0153813 x31296 Multiobjective, hierarchical, with proper scaling
  29. 29. © 2019 IBM Corporation30 Other file formats and APIs § Multiobjective is available in all file formats § APIs in C, C++, Java, .NET, Python. No MATLAB. § Info and (new) Generic callbacks are supported. No query or control callbacks. § Not for quadratic models § Can't use Benders decomposition
  30. 30. © 2019 IBM Corporation31 MODELING ASSISTANCE
  31. 31. © 2019 IBM Corporation32 Modeling assistance l detect problems in model data (small numbers, …) l detect bad modeling constructs (big-M, ...) → improve numerical robustness l Issues collected from years of CPLEX support and development l issues with problem data l issues in the model formulation l issues with parameter settings l issues during the solution process l CPLEX scans your model and looks for these issues l For each issue found a warning is printed l Set read.datacheck parameter to 2 (disabled by default)
  32. 32. © 2019 IBM Corporation33 Issues with problem data: Single precision input data Max condition number: 1.0978e+14 Percentage (number) of stable bases: 67.59% Percentage (number) of suspicious bases: 31.28% Percentage (number) of unstable bases: 0.97% Percentage (number) of ill-posed bases: 0.16% Attention level: 0.007666 CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. R1024: C0017 - C0700 - C0926 + C2957 + C5189 - C5190 - 0.0416667 C7932 = 0 definitely looks truncated/rounded A model with single precision data
  33. 33. © 2019 IBM Corporation34 Issues with problem data: Single precision input data Max condition number: 1.0978e+14 Percentage (number) of stable bases: 67.59% Percentage (number) of suspicious bases: 31.28% Percentage (number) of unstable bases: 0.97% Percentage (number) of ill-posed bases: 0.16% Attention level: 0.007666 CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. R1024: C0017 - C0700 - C0926 + C2957 + C5189 - C5190 - 0.0416667 C7932 = 0 8.7299e+06 100.00% 0.00% 0.00% 0.00% definitely looks truncated/rounded Max condition number: 1.0978e+14 Percentage (number) of stable bases: 67.59% Percentage (number) of suspicious bases: 31.28% Percentage (number) of unstable bases: 0.97% Percentage (number) of ill-posed bases: 0.16% Attention level: 0.007666 A model with single precision data
  34. 34. © 2019 IBM Corporation35 Issues with problem data: Single precision input data Max condition number: 1.0978e+14 Percentage (number) of stable bases: 67.59% Percentage (number) of suspicious bases: 31.28% Percentage (number) of unstable bases: 0.97% Percentage (number) of ill-posed bases: 0.16% Attention level: 0.007666 CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. R1024: C0017 - C0700 - C0926 + C2957 + C5189 - C5190 - 0.0416667 C7932 = 0 8.7299e+06 100.00% 0.00% 0.00% 0.00% solution time from 120 seconds definitely looks truncated/rounded Max condition number: 1.0978e+14 Percentage (number) of stable bases: 67.59% Percentage (number) of suspicious bases: 31.28% Percentage (number) of unstable bases: 0.97% Percentage (number) of ill-posed bases: 0.16% Attention level: 0.007666 90 seconds A model with single precision data
  35. 35. © 2019 IBM Corporation36 BIGM_COEF one very big coefficient in row █ █ BIGM_TO_IND constraint can be replaced by indicator █ █ BIGM_VARBOUND variable bound constraint with very large bound █ █ EPGAP_LARGE solution optimal only due to large CPX_PARAM_EPGAP █ █ █ EPGAP_OBJOFFSET solution optimal only due to large objective offset █ █ FRACTION_SCALING rows can be scaled to get exact value █ █ *_LARGE_NUM suspiciously large number █ █ *_SMALL_NUM suspiciously small number █ CANCEL_TOL non-zero less than cancel tolerance █ █ █ FEAS_TOL rhs smaller than feasibility tolerance █ █ █ OPT_TOL objective coefficient smaller than optimality tolerance █ █ █ QOPT_TOL quadratic objective coefficient smaller than optimality tolerance █ █ █ SINGLE_PRECISION single precision data █ SYMMETRY_BREAKING_INEQ chain of symmetry breaking inequalities █ █ WIDE_COEFF_RANGE wide range of coefficients █ █ KAPPA_* bad kappa values detected during solve █ █ █ █ Potential issues in problem data Potential issues in problem formulation Potential issues in parameter settings Potential issues in solve Overview of modeling assistance warnings
  36. 36. © 2019 IBM Corporation37 Modeling assistance callback l By default, CPLEX print the warnings in the log l And stops after 10 warnings of the same type l Set read.warninglimit to control the number of warnings of the same type printed l Implement a Modeling Assistance callback to control precisely what happens when an issue is detected: l Filter on the issue type l Handle the warning string appropriately for your application
  37. 37. © 2019 IBM Corporation38 Things to try...
  38. 38. © 2019 IBM Corporation39 Things to try... § Fully automated benders decomposition CPLEX> set benders strategy 3
  39. 39. © 2019 IBM Corporation40 Things to try... § Fully automated benders decomposition CPLEX> set benders strategy 3 § Modeling Assistance CPLEX> set read datacheck 2
  40. 40. © 2019 IBM Corporation41 Things to try... § Fully automated benders decomposition CPLEX> set benders strategy 3 § Modeling Assistance CPLEX> set read datacheck 2 § Multiobjective Minimize multi-objectives obj1: ... obj2: priority=-1 ... Subject To ... End
  41. 41. © 2019 IBM Corporation42 Things to try... § Fully automated benders decomposition CPLEX> set benders strategy 3 § Modeling Assistance CPLEX> set read datacheck 2 § Multiobjective Minimize multi-objectives obj1: ... obj2: priority=-1 ... Subject To ... End Thank You!
  42. 42. © 2019 IBM Corporation44 Legal Disclaimer • © IBM Corporation 2019. All Rights Reserved. • The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. • References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. • IBM, the IBM logo, CPLEX Optimizer, CPLEX Optimization Studio are trademarks of International Business Machines Corporation in the United States, other countries, or both • Intel is a trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

×