Presentation is loading. Please wait.

Presentation is loading. Please wait.

What’s new in IBM ILOG CPLEX Optimization Studio 12.7

Similar presentations


Presentation on theme: "What’s new in IBM ILOG CPLEX Optimization Studio 12.7"— Presentation transcript:

1 What’s new in IBM ILOG CPLEX Optimization Studio 12.7
Ferenc Katai, Ph.D., Offering Manager, CPLEX optimization Studio Xavier Nodet, Development Lead, CPLEX optimization Studio IBM Big Data & Analytics © 2014 IBM Corporation

2 What’s new at a glance New features (and their consequences on performance) (automatic) Benders decomposition algorithm Variability tester for CPLEX/CPO (in the interactive) Modeling Assistance in CPLEX PWL in C, Python and file forma CP Optimizer’s new functions/features Interactive for CP Optimizer (a la CPLEX) Variability tester in the interactive File format for starting points (aka warm-start) for CP Optimizer Performance CPLEX CPO

3 Benders method

4 Benders decomposition – a short view
Benders’ decomposition method is well-known in the math programming profession since the 1962, when Jacque Benders published it. It’s a kind of 2 stage method with sub-problems and master problem It works well when the model is very block-structured and in this case the speed up can be very significant (in some cases even +20x) The problem types where Benders works/speeds up well include e.g. Especially Stochastic-related problems where there are many scenarios Facility location problems (aka network design, like LNP) In fact anything with some possibility to block-triangulation Use Novice use (switch type) where the user simply say that Benders should be performed but gives no indication about the blocks themselves. In this case CPLEX will figure out how to separate the problem and performs the Benders accordingly advanced use (familiarity with Benders, therefore more knowledge provided by the user) The user can define which variables are belonging to what stage of Benders (sub/master) thru an API

5 Principle of the Benders decomposition
Iterative approach Complete problem decomposed into a single master (MIP) problem, and a series of LP sub-problems. Master problem defined by a set of variables, and contains all the constraints that involve these variables. Given a solution of the master problem, the sub-problems allow to generate: An optimality cut that refines their contribution to the objective value, or A feasibility cut if that solution is not feasible for a sub-problem Cuts derive from duality arguments, hence the need for the sub-problems to be LPs Do we generate cuts at every node, at integer nodes? Do we generate cuts from all sub-problems each time? Master SP1 SP2 SP3 IBM Analytics © 2015 IBM Corporation

6 Typical use cases The complete model is big, but the sub-problems decompose into manageable pieces. Example: scenario-based stochastic problems No decomposition for the sub-problem, but the master and the sub-problem have a much simpler structure. Example: facility location, where Benders decomposition turns tons of variable upper bounds (99% of the constraints in the model) into simple bounds. In the complete problem: 𝑦 𝑖𝑗 ≤ 𝑥 𝑖 These constraints disappear from the master model, and appear in the sub-problem as 𝑦 𝑖𝑗 ≤ 0,1 , depending on the solution for 𝑥 𝑖 in the master problem Similar to above, when master can enumerate much faster than the complete model and yet the bounds that it provides are not much worse. Example: some network design models.

7 Annotations Annotations provide information to CPLEX that doesn’t belong to the definition of the model Example: defining the block structure for Benders decomposition algorithm All elements of a model (objective, variables, constraints) can be annotated A given annotation is defined by a name (the key), a type (for the value), and a default value For a given model element, and a given key, a single value can be attached For Benders: Key is “cpxBendersPartition” Type is long Value 0: this variable is a master variable Value k>0: this variable belongs to sub-problem k.

8 benders strategy parameter
benders strategy 1: user-specified decomposition CPLEX will use the decomposition specified as is benders strategy 2: CPLEX refines user’s decomposition The master variables are left Each sub-problem will be further decomposed if possible User can simply specify the master variables, and let CPLEX do the rest benders strategy 3: full automatic decomposition A user-specified decomposition is ignored Integer variables go into the master problem Continuous variables in a sub-problem Decompose this sub-problem if possible benders strategy 0 (default) If a decomposition was specified: refine it, and run benders algorithm Otherwise, run regular Brand-and-Bound

9 Computational results
Benders B&C compared to “regular” B&C 1.06x 1.48x 2.53x 3.07x 3.57x 5.47x 5.69x 6.40x 5.41x Stochastic Non stochastic # models # wins/losses # timeout (regular B&C / Benders B&C) > 1sec 168 130/37 76/17 152 61/80 6/4 > 10 secs 163 126/37 86 52/32 > 100 secs 149 117/32 44 30/13 Used cmpseeds.sh Date: 6 November 2016 Testset: 390 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads Timelimit: 10,000 sec

10 Performance variability

11 Performance variability: seemingly neutral changes lead to a big variation in solution time
By now a well known issue in MIP: Danna (MIP workshop, 2008) Koch et al. (Math. Prog. Comp. 2011) Fischetti and Monaci (Op. Res. 2014) Achterberg and Wunderling (Facets of Comb. Optimization, 2013) Lodi and Tramontani (INFORMS 2013 Tutorial) MIP solver ingredients Heuristics Cutting planes Branching variable selection ... Changes in platform, code, parameter settings … → may have (big) impact on any ingredient → on the whole solution process → (sometimes) hard to get robust performance

12 Performance variability exists and has massive effects
3 instances from MIPLIB2010 test set, run on 5 different random seeds model seed 1 seed 2 seed 3 seed 4 seed 5 min max max/min map14 65.41 61.77 62.82 62.35 64.96 1.06 rococoB 811.05 844.39 740.78 3.00 neos 315.22 354.19 1.71 27.40

13 Performance variability exists and has massive effects
3 instances from MIPLIB2010 test set, run on 5 different random seeds model seed 1 seed 2 seed 3 seed 4 seed 5 min max max/min map14 65.41 61.77 62.82 62.35 64.96 1.06 rococoB 811.05 844.39 740.78 3.00 neos 315.22 354.19 1.71 27.40 All solvable instances, run on 5 different seeds, max/min truncated at 1000, log scale

14 Performance variability exists and has massive effects
3 instances from MIPLIB2010 test set, run on 5 different random seeds model seed 1 seed 2 seed 3 seed 4 seed 5 min max max/min map14 65.41 61.77 62.82 62.35 64.96 1.06 rococoB 811.05 844.39 740.78 3.00 neos 315.22 354.19 1.71 27.40 All solvable instances, run on 5 different seeds, max/min truncated at 1000, log scale rough classification ≤ 2 ok 131 ]2, 4] shaky 53 > 4 bad 28

15 Performance variability exists and has massive effects
3 instances from MIPLIB2010 test set, run on 5 different random seeds model seed 1 seed 2 seed 3 seed 4 seed 5 min max max/min map14 65.41 61.77 62.82 62.35 64.96 1.06 rococoB 811.05 844.39 740.78 3.00 neos 315.22 354.19 1.71 27.40 To assess performance variability with CPLEX: new command in the interactive: tools→runseeds run one model with different random seeds surrogate for random perturbation of the model

16 CPLEX> read beasleyC3.mps
1. Read model

17 parameters set here apply to every run!
CPLEX> read beasleyC3.mps 1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) parameters set here apply to every run!

18 runs model with different random seeds default is 30 random seeds
CPLEX> read beasleyC3.mps 1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch runs model with different random seeds default is 30 random seeds each solve starts from scratch CPLEX compiles statistics for each run

19 . . . CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait

20 . . . CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Exit codes: 0 : No error Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

21 . . . CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Exit codes: 0 : No error Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

22 CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Exit codes: 0 : No error solution information, should be consistent otherwise → modeling assistance Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

23 solution effort, indicates variability
CPLEX> read beasleyC3.mps 1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Exit codes: 0 : No error solution effort, indicates variability Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

24 . . . CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Exit codes: 0 : No error Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

25 . . . CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Exit codes: 0 : No error Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

26 . . . CPLEX> read beasleyC3.mps
1. Read model CPLEX> set mip tolerance mipgap 0 CPLEX> set mip tolerance absmipgap 0 2. Set parameters (if any) CPLEX> tools runseeds 3. Launch . . . 4. Wait Statistics per run 5. Inspect results ====== runseeds statistics of 30 runs exit sol objective gap iteration node runtime dettime run code stat value (%) count count seconds ticks Failed runs Exit codes: 0 : No error Aggregated statistics Optimization status codes: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: e

27 Some example results A stable model aflow30a
objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev:

28 A model with high variability
Some example results A stable model aflow30a objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: A model with high variability gmu-35-40 objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: e std dev:

29 A model with high variability
Some example results A stable model aflow30a objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: A model with high variability objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: e std dev: A suspicious model Hurink_edata_mt06_lazy objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: standard deviation in objective → indicator for numerical problems → modeling assistance

30 Modeling asSistance

31 Modeling assistance detect problems in model data (small numbers, …)
detect bad modeling constructs (big-M, ...) → improve numerical robustness issues collected from years of CPLEX support and development issues with problem data issues in the model formulation issues with parameter settings issues during the solution process CPLEX scans your model and looks for these issues for each issue found a warning is printed enabled by parameter setting (disabled by default)

32 Modeling assistance detect problems in model data (small numbers, …)
detect bad modeling constructs (big-M, ...) → improve numerical robustness issues collected from years of CPLEX support and development issues with problem data issues in the model formulation issues with parameter settings issues during the solution process CPLEX scans your model and looks for these issues for each issue found a warning is printed enabled by parameter setting (disabled by default) CPX_PARAM_DATACHECK 0 – off input solve

33 Modeling assistance detect problems in model data (small numbers, …)
detect bad modeling constructs (big-M, ...) → improve numerical robustness issues collected from years of CPLEX support and development issues with problem data issues in the model formulation issues with parameter settings issues during the solution process CPLEX scans your model and looks for these issues for each issue found a warning is printed enabled by parameter setting (disabled by default) CPX_PARAM_DATACHECK 0 – off 1 – check for invalid data (dup indices, NaNs, ...) input & check solve

34 Modeling assistance detect problems in model data (small numbers, …)
detect bad modeling constructs (big-M, ...) → improve numerical robustness issues collected from years of CPLEX support and development issues with problem data issues in the model formulation issues with parameter settings issues during the solution process CPLEX scans your model and looks for these issues for each issue found a warning is printed enabled by parameter setting (disabled by default) CPX_PARAM_DATACHECK 0 – off 1 – check for invalid data (dup indices, NaNs, ...) modeling assistance 2 – check for common modeling issues input & check solve modeling assistance

35 Modeling assistance Quick reminder: Assessing numerics in CPLEX (for MIP)

36 Modeling assistance Quick reminder: Assessing numerics in CPLEX (for MIP) Solution quality: CPLEX> display solution quality MILP objective e+05 MILP solution norm |x| (Total, Max) e e+05 MILP solution error (Ax=b) (Total, Max) e e-11 MILP x bound error (Total, Max) e e+00 MILP x integrality error (Total, Max) e e+00 MILP slack bound error (Total, Max) e e-16

37 Modeling assistance Quick reminder: Assessing numerics in CPLEX (for MIP) Solution quality: CPLEX> display solution quality MILP objective e+05 MILP solution norm |x| (Total, Max) e e+05 MILP solution error (Ax=b) (Total, Max) e e-11 MILP x bound error (Total, Max) e e+00 MILP x integrality error (Total, Max) e e+00 MILP slack bound error (Total, Max) e e-16 Kappa statistics: track condition number of basis matrices CPLEX> set mip strategy kappa 2 CPLEX> optimize … CPLEX> display solution kappa Max condition number: e+13 Percentage (number) of stable bases: % (11908) Percentage (number) of suspicious bases: % (2966) Percentage (number) of unstable bases: % (489) Percentage (number) of ill-posed bases: % (0) Attention level:

38 Modeling assistance Quick reminder: Assessing numerics in CPLEX (for MIP) Solution quality: CPLEX> display solution quality MILP objective e+05 MILP solution norm |x| (Total, Max) e e+05 MILP solution error (Ax=b) (Total, Max) e e-11 MILP x bound error (Total, Max) e e+00 MILP x integrality error (Total, Max) e e+00 MILP slack bound error (Total, Max) e e-16 Kappa statistics: track condition number of basis matrices Max condition number: Percentage (number) of stable bases: Percentage (number) of suspicious bases: Percentage (number) of unstable bases: Percentage (number) of ill-posed bases: Attention level: usually no problem double check be concerned

39 Issues with problem formulation: big-M constraints
aTx ≤ My y binary, M huge y used to model availability of a resource y = 0 → aTx ≤ 0 y = 1 → aTx ≤ M resource not available resource available

40 Issues with problem formulation: big-M constraints
aTx ≤ My y binary, M huge y used to model availability of a resource y = 0 → aTx ≤ 0 y = 1 → aTx ≤ M resource not available resource available Typically M is much larger than ai → wide range of coefficients in the coefficient matrix causes numerical trouble

41 Issues with problem formulation: big-M constraints
aTx ≤ My y binary, M huge y used to model availability of a resource y = 0 → aTx ≤ 0 y = 1 → aTx ≤ M resource not available resource available Typically M is much larger than ai → wide range of coefficients in the coefficient matrix causes numerical trouble → use indicator constraints y = 0 → aTx ≤ 0 y = 1 → aTx ≤ M often one of the two can be expressed as bound on a variable

42 Issues with problem formulation: big-M constraints
A model with big-M constraints FALL_12_3 Max condition number: e+13 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level:

43 Issues with problem formulation: big-M contraints
A model with big-M constraints FALL_12_3 Max condition number: e+13 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1042: In constraint 'c1109', binary variable 'x257' is linked with variable 'x2079' having ratio 1e+06. c1109: x257 + x2079 ≤ 0 x257 binary, x2079 ≥ 0

44 Issues with problem formulation: big-M constraints
A model with big-M constraints FALL_12_3 Max condition number: e+13 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1042: In constraint 'c1109', binary variable 'x257' is linked with variable 'x2079' having ratio 1e+06. c1109: x257 + x2079 ≤ 0 x257 = 0 → x2079 = 0 x257 = 1 → x2079 ≤ x257 binary, x2079 ≥ 0

45 Issues with problem formulation: big-M constraints
A model with big-M constraints FALL_12_3 Max condition number: e+13 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1042: In constraint 'c1109', binary variable 'x257' is linked with variable 'x2079' having ratio 1e+06. c1109: x257 + x2079 ≤ 0 x257 = 0 → x2079 = 0 x2079 ≤ x257 binary, x2079 ≥ 0

46 Issues with problem formulation: big-M constraints
A model with big-M constraints FALL_12_3 Max condition number: e+13 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1042: In constraint 'c1109', binary variable 'x257' is linked with variable 'x2079' having ratio 1e+06. c1109: x257 + x2079 ≤ 0 x257 = 0 → x2079 = 0 x2079 ≤ x257 binary, x2079 ≥ 0 Max condition number: e+13 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: 2.2289e+13 80.15% 19.83% 0.02% 0.00% → numerics improve significantly

47 Issues with problem data: Single precision input data
CPLEX uses IEEE double precision arithmetic (quad precision in some places) not every rational number has an exact representation → round-off error will occur Consider fraction 1/k and a simple constraint ∑i in {1, ..., k} 1/k xi = 1

48 Issues with problem data: Single precision input data
CPLEX uses IEEE double precision arithmetic (quad precision in some places) not every rational number has an exact representation → round-off error will occur Consider fraction 1/k and a simple constraint ∑i in {1, ..., k} 1/k xi = 1 ∆ to exact value single double 1/k Δ Δ(∑) 1/3 9.9e-9 3.0e-8 1.9e-17 5.6e-17 1/5 3.0e-9 1.5e-8 1.1e-17 1/6 5.0e-9 9.3e-18 only 1/k in single rest in double! xi exact integer →infeasible by at least 1e-8 with single precision data →in practice often a lot worse

49 Issues with problem data: Single precision input data
xi exact integer →infeasible by at least 1e-8 with single precision data →in practice often a lot worse Obvious warning CPLEX Warning 1036: Coefficient for %s in %s looks like %d/%d in single precision → Fix data generation

50 Issues with problem data: Single precision input data
xi exact integer →infeasible by at least 1e-8 with single precision data →in practice often a lot worse Obvious warning CPLEX Warning 1036: Coefficient for %s in %s looks like %d/%d in single precision → Fix data generation But also CPLEX Warning 1047: Coefficients in %s are fractions and can be scaled with %d/%d → scale row to get exact values ∑i in {1, ..., k} 1/k xi = 1 ∑i in {1, ..., k} xi = k

51 Issues with problem data: Single precision input data
A model with single precision data ns mps.gz Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level:

52 definitely looks truncated/rounded
Issues with problem data: Single precision input data A model with single precision data Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. R1024: C C C C C C C7932 = 0 definitely looks truncated/rounded

53 definitely looks truncated/rounded
Issues with problem data: Single precision input data A model with single precision data Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. R1024: C C C C C C C7932 = 0 definitely looks truncated/rounded Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: 8.7299e+06 100.00% 0.00%

54 definitely looks truncated/rounded
Issues with problem data: Single precision input data A model with single precision data Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. R1024: C C C C C C C7932 = 0 definitely looks truncated/rounded Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: 8.7299e+06 100.00% 0.00% solution time from 120 seconds 90 seconds

55 definitely looks truncated/rounded
Issues with problem data: Single precision input data A model with single precision data Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: CPLEX Warning 1036: Coefficient for variable 'C7932' in constraint 'R1024' looks like 1/24 in single precision. Attention R1024: C C C C C C C7932 = 0 blindly changing coefficients may change feasible region → may end up solving a different model → change model generation, not model definitely looks truncated/rounded Max condition number: e+14 Percentage (number) of stable bases: % Percentage (number) of suspicious bases: % Percentage (number) of unstable bases: % Percentage (number) of ill-posed bases: % Attention level: 8.7299e+06 100.00% 0.00% solution time from 120 seconds 90 seconds

56 Issues with problem data: extreme numbers
Numbers below CPLEX default tolerances → essentially 0 → Fix numbers or tighten tolerance parameters feasibility tolerance optimality tolerance numerical emphasis ... Numbers too small for the solver (smaller than 1e-13) → essentially 0 → Fix numbers Numbers larger than CPX_INFBOUND → CPLEX will consider them as infinity → Fix numbers or, e.g., remove constraints with right-hand side > CPX_INFBOUND

57 Issues with parameter settings: relative MIP gap
best integer – best objective relative MIP gap (in CPLEX): 1e-10 + |best integer| CPX_PARAM_EPGAP: stop if relative MIP gap drops below a value

58 Issues with parameter settings: relative MIP gap
best integer – best objective relative MIP gap (in CPLEX): 1e-10 + |best integer| CPX_PARAM_EPGAP: stop if relative MIP gap drops below a value (default 1e-4) aTx* + K – (aTx' + K) aTx* – aTx' Objective: min aTx + K gap: 1e-10 + |aTx* + K| 1e-10 + |aTx* + K|

59 Issues with parameter settings: relative MIP gap
best integer – best objective relative MIP gap (in CPLEX): 1e-10 + |best integer| CPX_PARAM_EPGAP: stop if relative MIP gap drops below a value aTx* + K – (aTx' + K) aTx* – aTx' Objective: min aTx + K gap: 1e-10 + |aTx* + K| 1e-10 + |aTx* + K| K huge → gap small, independent of aTx* and aTx'

60 Issues with parameter settings: relative MIP gap
best integer – best objective relative MIP gap (in CPLEX): 1e-10 + |best integer| CPX_PARAM_EPGAP: stop if relative MIP gap drops below a value aTx* + K – (aTx' + K) aTx* – aTx' Objective: min aTx + K gap: 1e-10 + |aTx* + K| 1e-10 + |aTx* + K| K huge → gap small, independent of aTx* and aTx' modeling assistance warning CPLEX Warning 1037: Solution optimal within relative optimality tolerance of %g, but not optimal if objective offset of value %g is removed → fix K or adapt CPX_PARAM_EPGAP related CPLEX Warning 1038: Solution optimal within relative optimality tolerance of %g, but not optimal within absolute optimality tolerance of value %g

61 Issues during solve: big condition numbers
Numerical trouble while solving the problem → Can you trust the results? How much can you trust them? CPLEX tracks condition number of basis matrices in LP solve. Large number of bases with large condition number → potential numerical problems → inexact/incorrect answers Solving ns CPLEX Warning 1033: Detected 1277 suspicious condition number(s) >= 1e+07. CPLEX Warning 1034: Detected 30 unstable condition number(s) >= 1e+10. → Check/fix data, check solution quality, use numerical emphasis, tighten tolerances

62 Overview of modeling assistance warnings
Potential issues in problem data Potential issues in parameter settings Potential issues in problem formulation Potential issues in solve 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 █ █ █ █

63 Combining modeling assistance and runseeds
momentum1.mps.gz (absolute and relative MIP gap 0): runseeds on original model: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev:

64 Combining modeling assistance and runseeds
momentum1.mps.gz (absolute and relative MIP gap 0): runseeds on original model: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: fix modeling assistance warnings: big-M constraints Single precision data scaled rows wide coefficient ranges

65 Combining modeling assistance and runseeds
momentum1.mps.gz (absolute and relative MIP gap 0): runseeds on original model: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: fix modeling assistance warnings runseeds on model with all warnings fixed: objective gap iteration node runtime dettime value (%) count count seconds ticks 101 : integer optimal solution (30 times) average: std dev: → iteration count, solution time, number of nodes reduced → variability in iteration count, solution time, number of nodes reduced

66 Be careful when auto-fixing warnings
Model ns from “unstable” MIPLIB 2010 testset gives these warnings: Detected constraint with wide range of coefficients. In constraint 'R12374' the ratio of largest and smallest (in absolute value) coefficients is 2.4e+09 Coefficient for variable 'C10462' in constraint 'R12374' looks like 1/24 in single precision.

67 Be careful when auto-fixing warnings
Model ns from “unstable” MIPLIB 2010 testset gives these warnings: Detected constraint with wide range of coefficients. In constraint 'R12374' the ratio of largest and smallest (in absolute value) coefficients is 2.4e+09 Coefficient for variable 'C10462' in constraint 'R12374' looks like 1/24 in single precision. Solve original model: Max condition number: e+20 Percentage (number) of stable bases: % (0) Percentage (number) of suspicious bases: % (0) Percentage (number) of unstable bases: % (0) Percentage (number) of ill-posed bases: % (1) Attention level: CPLEX stops at root with sub-optimal solution

68 Be careful when auto-fixing warnings
Model ns from “unstable” MIPLIB 2010 testset gives these warnings: Detected constraint with wide range of coefficients. In constraint 'R12374' the ratio of largest and smallest (in absolute value) coefficients is 2.4e+09 → replace by indicator Coefficient for variable 'C10462' in constraint 'R12374' looks like 1/24 in single precision. → recompute coefficients Solve original model: Solve fixed Max condition number: e+20 Percentage (number) of stable bases: % (0) Percentage (number) of suspicious bases: % (0) Percentage (number) of unstable bases: % (0) Percentage (number) of ill-posed bases: % (1) Attention level: 3.4594e+15 0.55% (17) 93.47% (2906) 5.92% (184) 0.06% (2) CPLEX stops at root with sub-optimal solution not too bad

69 Be careful when auto-fixing warnings
Model ns from “unstable” MIPLIB 2010 testset gives these warnings: Detected constraint with wide range of coefficients. In constraint 'R12374' the ratio of largest and smallest (in absolute value) coefficients is 2.4e+09 → replace by indicator Coefficient for variable 'C10462' in constraint 'R12374' looks like 1/24 in single precision. → recompute coefficients Solve original model: Solve fixed Max condition number: e+20 Percentage (number) of stable bases: % (0) Percentage (number) of suspicious bases: % (0) Percentage (number) of unstable bases: % (0) Percentage (number) of ill-posed bases: % (1) Attention level: 3.4594e+15 0.55% (17) 93.47% (2906) 5.92% (184) 0.06% (2) CPLEX stops at root with sub-optimal solution not too bad but: fixed model gives super-optimal solutions! solutions are infeasible in original model!

70 careful! Be careful when auto-fixing warnings
Model ns from “unstable” MIPLIB 2010 testset gives these warnings: Detected constraint with wide range of coefficients. In constraint 'R12374' the ratio of largest and smallest (in absolute value) coefficients is 2.4e+09 → replace by indicator Coefficient for variable 'C10462' in constraint 'R12374' looks like 1/24 in single precision. → recompute coefficients Solve original model: Solve fixed Max condition number: e+20 Percentage (number) of stable bases: % (0) Percentage (number) of suspicious bases: % (0) Percentage (number) of unstable bases: % (0) Percentage (number) of ill-posed bases: % (1) Attention level: 3.4594e+15 0.55% (17) 93.47% (2906) 5.92% (184) 0.06% (2) CPLEX stops at root with sub-optimal solution not too bad but: fixed model gives super-optimal solutions! solutions are infeasible in original model! careful!

71 Piecewise linear

72 PWL functions in the engine
Before 12.7, piecewise linear functions were available through Concert In C++, Java, .NET, but not C, Python and file formats Version 12.7 fixes that Example of LP file format: This specifies that y = f(x), where f is defined by the two points (20, 240) and (40, 400), has a slope before the first point equal to 0.5, and a slope after the last point of 2.0. 2 400 240 Minimize [...] Subject To Pwl f: y = x 0.5 (20,240) (40,400) 2.0 End 0.5 20 40

73 ‘no check’ MIP starts

74 ‘No check’ MIP Start level
In can take time to check the validity of a MIP start, even when it indeed defines a complete feasible solution: CPLEX has to solve a fixed LP. When the model has lazy constraints, checking the MIP start has to be delayed up to the end of the root node: may hurt performance Version 12.7 introduces a new effort level: CPX_MIPSTART_NOCHECK When used, CPLEX just assumes that he solution given is complete and feasible. Behavior is undefined otherwise.

75 Other new CPO features Interactive for CP Optimizer (a la CPLEX)
File format for starting points (aka warm-start) for CP Optimizer Variability tester in the interactive

76 CPLEX MILP performance evolution
 1000 sec  100 sec A = cplex100 B = cplex110 C = cplex-cplex121f0 D = cplex-cplex122f0rc3 E = cplex-cplex124f0-bench F = cplex-cplex125f0rc7 G = cplex-cplex126f0rc2 H = cplex R0-13-g1c434b9 I = cplex R0 J = cplex R5 | A | B | C | D | E | F | G | H | I | J | | # of # of| # of Time| # of Time| # of Time| # of Time| # of Time| # of Time| # of Time| # of Time| # of Time| | eval Time| Time opt| Time opt| Time opt| Time opt| Time opt| Time opt| Time opt| Time opt| Time opt| suptime |model limit|limit geom|limit geom|limit geom|limit geom|limit geom|limit geom|limit geom|limit geom|limit geom| | hits| hits ratio| hits ratio| hits ratio| hits ratio| hits ratio| hits ratio| hits ratio| hits ratio| hits ratio| all | | | | | | | | | | | [0,10k} | | | | | | | | | | | [1,10k} | | | | | | | | | | | [10,10k}| | | | | | | | | | | 100,10k}| | | | | | | | | | | [1k,10k}| | | | | | | | | | |  10 sec Date: 6 November 2016 Testset: MILP: 3893 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec IBM Analytics © 2015 IBM Corporation

77 CPLEX 12.6.3 vs.12.7.0: LP performance improvement
LP barrier (12 threads) Time limits: 1 / 0 626 models 299 models 123 models 1.05x 1.09x 1.21x LP barrier with Xover (12 threads) Used cmpseeds.sh Time limits: 3 / 3 696 models 355 models 165 models Date: 6 November 2016 Testset: LP: 2271 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec IBM Analytics © 2015 IBM Corporation

78 CPLEX 12.6.3 vs.12.7.0: MILP performance improvement
Deterministic parallel MILP (12 threads) Time limits: 55 / 24 2048 models 1254 models 667 models MILP improvements summary Root presolve: 2% Propagation of implications in node presolve: 3% Root and node probing: 3% Node cuts (separation and filtering): 3% Heuristics: 2% Branching: 3% Used cmpseeds.sh Date: 6 November 2016 Testset: MILP: 4256 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec IBM Analytics © 2015 IBM Corporation

79 CPLEX 12.6.3 vs.12.7.0: MIQP performance improvement
Convex MIQP (12 threads) Time limits: 3 / 0 263 models 123 models 84 models MIQP improvements summary Node cuts (separation and filtering): 7% Tuning of node probing effort: 6% Used cmpseeds.sh Date: 6 November 2016 Testset: MIQP: 365 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec IBM Analytics © 2015 IBM Corporation

80 CPLEX 12.6.3 vs.12.7.0: MIQCP performance improvement
Convex MIQCP (12 threads) Time limits: 5 / 1 259 models 154 models 88 models MIQCP improvements summary (all for Outer Approximation, OA) More aggressive reliability branching: 4% Better synchronization of cone cuts in the tree: 2% Better integration between cone cuts and QCP relaxation: Repeatedly solve QCP relaxation at the root, to refine OA with cone cuts: 4% Solve QCP relaxation in the tree, to refine the OA with cone cuts: 10% Used cmpseeds.sh Date: 6 November 2016 Testset: MIQCP: 326 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec IBM Analytics © 2015 IBM Corporation

81 CPLEX 12.6.3 vs.12.7.0: Global (MI)QP performance improvement
Non-convex (MI)QP (12 threads) Time limits: 12 / 1 447 models 157 models 79 models All the improvement comes from newly added cutting planes: Cuts from Reformulation-Linearization Techniques (RLT-cuts) H. D. Sherali and A. Alameddine, “A new reformulation-linearization technique for bilinear programming problems”, Journal of Global Optimization 2, , 1992. Implemented in CPLEX within the FP7-PEOPLE-2012-ITN Marie Curie EU Project MINO, see also: P. Bonami, A. Lodi, J. Schweiger, A. Tramontani, "Solving standard quadratic programming by cutting planes", Techical Report DS4DM , 2016. Used cmpseeds.sh Date: 6 November 2016 Testset: Non-convex (MI)QP: 742 models Machine: Intel 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec IBM Analytics © 2015 IBM Corporation

82 CPO performance improvements
On integer constraint programming models: +10% On Scheduling constraint programming models: +20%

83 IBM Big Data & Analytics © 2014 IBM Corporation


Download ppt "What’s new in IBM ILOG CPLEX Optimization Studio 12.7"

Similar presentations


Ads by Google