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.
© 2017 IBM Corporation
CPLEX Optimization Studio 12.8
INFORMS 2017, Houston
Xavier Nodet, Program Manager, CPLEX Optimizat...
© 2017 IBM Corporation2
CPLEX Optimization Studio 12.8:
Available from 2017-12-08
§ Download-and-Go
§ docplex shipped with...
© 2017 IBM Corporation3
Download-and-Go
§ Monthly subscription, single user, for development
usage:
- Download the Free Tr...
© 2017 IBM Corporation4
docplex shipped with COS
§ Python modeling API for CPLEX and CP Optimizer
§ Open-source
§ Can be d...
© 2017 IBM Corporation5
Platform support
© 2017 IBM Corporation7
Platform support
§ OPL and the IDE on Mac OS
§ The engines were already available on zLinux
§ Now ...
© 2017 IBM Corporation8
Evaluating variability in OPL
© 2017 IBM Corporation9
0
5
10
15
20
0
50
100
150
200
250
300
350
400
450
11.0 (2007) 12.1 (2009) 12.2 (2010) 12.4 (2011) ...
© 2017 IBM Corporation10
This image cannot currently be displayed.Combinatorial (integer)
This image cannot currently be d...
© 2017 IBM Corporation11
CPLEX – The generic callback
User feedback
• Empty callback is
not the same as
no callback
• Some...
© 2017 IBM Corporation12
CPLEX – The generic callback
§ A single callback function
§ Invoked in different contexts
§ Query...
© 2017 IBM Corporation13
l THREAD_DOWN
l LOCAL_PROGRESS
l GLOBAL_PROGRESS
l CANDIDATE
l THREAD_UP
l RELAXATION
Invoked whe...
© 2017 IBM Corporation14
CPLEX – The generic callback
int callback (CPXCALLBACKCONTEXTptr context, CPXLONG contextid, void...
© 2017 IBM Corporation15
CP Optimizer – Refactored C++ API
§ Class IloCP handled two different categories of services:
- T...
© 2017 IBM Corporation16
CP Optimizer – Refactored C++ API
§ Class IloCP now has only the top-level services
§ Class IloCP...
© 2017 IBM Corporation17
CP Optimizer – Refactored C++ API
§ 12.7.1:
ILCGOAL1(MyGen, IlcIntVarArray, x) {
IloCP cp = getCP...
© 2017 IBM Corporation18
CP Optimizer – Bounds on the value of the optimal solution
! ------------------------------------...
© 2017 IBM Corporation19
CPLEX – New parameters for sub-MIPs control
§ CPXPARAM_MIP_ SubMIP_Scale
Present value for type o...
© 2017 IBM Corporation20
CPLEX – Modeling Assistance – New warnings
§ Modeling Assistance was introduced last year in 12.7...
© 2017 IBM Corporation21
CPLEX– Recording calls to the C API
§ Reproducing an issue during a solve is ’easy’:
run the SAV ...
© 2017 IBM Corporation22
Summary
§ Performance in CP Optimizer and CPLEX, as always
§ OPL and IDE on Mac OS, with runseeds...
© 2017 IBM Corporation24
Legal Disclaimer
• © IBM Corporation 2017. All Rights Reserved.
• The information contained in th...
© 2017 IBM Corporation25
CPLEX – Info callbacks in Benders (12.7.1)
§ Benders decomposition algorithm introduced last year...
CPLEX Optimization Studio 12.8 - What's New
CPLEX Optimization Studio 12.8 - What's New
Upcoming SlideShare
Loading in …5
×

CPLEX Optimization Studio 12.8 - What's New

1,242 views

Published on

CPLEX Optimization Studio 12.8 offers performance improvements, OPL and the IDE on MacOS, a new callback framework for CPLEX, a refactored C++ API for CP Optimizer, and many other features.

Published in: Software
  • Be the first to comment

  • Be the first to like this

CPLEX Optimization Studio 12.8 - What's New

  1. 1. © 2017 IBM Corporation CPLEX Optimization Studio 12.8 INFORMS 2017, Houston Xavier Nodet, Program Manager, CPLEX Optimization Studio
  2. 2. © 2017 IBM Corporation2 CPLEX Optimization Studio 12.8: Available from 2017-12-08 § Download-and-Go § docplex shipped with COS § OPL and IDE on MacOS, OPL on zLinux § OPL and the IDE – Evaluating variability § CPLEX - performance § CP Optimizer - performance § CPLEX – New callback framework § CP Optimizer – Refactored C++ API § CP Optimizer – Bounds on the value of the optimal solution § CPLEX – New parameters for sub-MIPs control § CPLEX – New warnings in Modeling Assistance § CPLEX – Recording calls to the C API
  3. 3. © 2017 IBM Corporation3 Download-and-Go § Monthly subscription, single user, for development usage: - Download the Free Trial from Marketplace - Purchase the subscription, receive an API key - Enter your key in the IDE (Preferences> OPL > Engine API key), or as environment variable CPLEX_STUDIO_KEY § Upon solve, the engine checks your key § At most once a day § ‘Offline mode’ for 2 weeks at most https://ibm.co/2xV3zfJ CPLEX Optimization Studio Marketplace
  4. 4. © 2017 IBM Corporation4 docplex shipped with COS § Python modeling API for CPLEX and CP Optimizer § Open-source § Can be downloaded from Anaconda, or pip install docplex. § Now shipped with COS § Install via [installdir]/python/docplex/setup.py
  5. 5. © 2017 IBM Corporation5 Platform support
  6. 6. © 2017 IBM Corporation7 Platform support § OPL and the IDE on Mac OS § The engines were already available on zLinux § Now adding OPL (oplrun, not the IDE) § Facilitates deployment of models on the Z platform CPLEX CP Optimizer docplex OPL IDE Windows ✔ ✔ ✔ ✔ ✔ Linux ✔ ✔ ✔ ✔ ✔ Mac OS ✔ ✔ ✔ ✔ ✔ AIX ✔ ✔ ✔ ✔ pLinux ✔ ✔ ✔ zLinux ✔ ✔ ✔ ✔ z/OS ✔
  7. 7. © 2017 IBM Corporation8 Evaluating variability in OPL
  8. 8. © 2017 IBM Corporation9 0 5 10 15 20 0 50 100 150 200 250 300 350 400 450 11.0 (2007) 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) totalspeedup numberoftimeouts CPLEX MILP performance evolution ³10 sec ³100 sec ³1000 sec Date: 14 October 2017 Testset: MILP: 4068 models Machine: Intel X5650 @ 2.67GHz, 24 GB RAM, 12 threads, deterministic Timelimit: 10,000 sec
  9. 9. © 2017 IBM Corporation10 This image cannot currently be displayed.Combinatorial (integer) This image cannot currently be displayed.Scheduling CP Optimizer – Performance improvements
  10. 10. © 2017 IBM Corporation11 CPLEX – The generic callback User feedback • Empty callback is not the same as no callback • Some callbacks not flexible enough • ... Experience of CPLEX developers • Limited usability • Some callbacks not used by anybody • ... Create a new callback framework “Artificial” limitations for backward compatibility • Callbacks default to single-threaded mode • Callbacks disable dynamic search • Supports everything currently in CPLEX • Addresses feedback gathered over the last >20 years • No issues with backward compatibility • Support new and legacy framework for some versions (but don't allow mixing)
  11. 11. © 2017 IBM Corporation12 CPLEX – The generic callback § A single callback function § Invoked in different contexts § Query-only callback, or empty callback, or no callback: no change in CPLEX behavior § No disabling of Dynamic Search or other features: +25% performance on difficult models § In GLOBAL_PROGRESS context, the information reported is globally valid § Invocations from this context are serialized § In all other contexts, information is local to the thread invoking the callback § As CPLEX runs some algorithms speculatively, information may not be globally valid § And CPLEX may have to ignore the information submitted by the user § Callback invocations may happen in parallel
  12. 12. © 2017 IBM Corporation13 l THREAD_DOWN l LOCAL_PROGRESS l GLOBAL_PROGRESS l CANDIDATE l THREAD_UP l RELAXATION Invoked when CPLEX has found a new candidate integer feasible solution. Callback may reject that solution (with or without cuts). Monitor thread-local progress Invoked when CPLEX has an optimal solution to a node relaxation available Invoked when CPLEX activates a new thread only a limited set of actions is supported allows user to initialize thread-local callback data Counterpart to THREAD_UP Monitor global solution progress Callback contexts: CPLEX – The generic callback
  13. 13. © 2017 IBM Corporation14 CPLEX – The generic callback int callback (CPXCALLBACKCONTEXTptr context, CPXLONG contextid, void *user) { switch (contextid) { case CPX_CALLBACKCONTEXT_RELAXATION: CPXDIM cols = *(CPXDIM)user; double* ind = malloc(sizeof (double) * cols); double* x = malloc(sizeof (double) * cols); CPXXcallbackgetrelaxationpoint(context, x, 0, cols – 1); for (j = 0; j < cols; ++j) { ind[j] = j; x[j] = round(x[j]); } CPXXcallbackpostheursoln(context, cols, ind, x, CPXCALLBACKSOLUTION_CHECKFEAS); free(x); break; case CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS: CPXXcallbackgetintinfo(context, CPXCALLBACKINFO_FEASIBLE, &feasible); if ( feasible ) CPXXcallbackgetdblinfo(context, CPXCALLBACKINFO_BEST_SOL, &primal); else primal = INF; CPXXcallbackgetdblinfo(context, CPXCALLBACKINFO_BEST_BND, &dual); printf (“Current bounds: %f, %fn”, dual, primal); break; } return 0; } CPXDIM cols = CPXXgetnumcols(env, lp); CPXXcallbacksetfunc(env, lp, CPX_CALLBACKCONTEXT_RELAXATION | CPX_CALLBACKCONTEXT_GLOBAL_PROGRESS, callback, &cols); CPXXmipopt(env, lp); LProunding heuristic progress display callbackfunctionregister
  14. 14. © 2017 IBM Corporation15 CP Optimizer – Refactored C++ API § Class IloCP handled two different categories of services: - Top-level, outside the search process, such as • Extracting a model • Getting a solution • Changing parameters - ”In-search” • Goals • Constraints • Propagators • Choosers • Evaluators § Each category was only valid when the other category was not § These two categories are now split
  15. 15. © 2017 IBM Corporation16 CP Optimizer – Refactored C++ API § Class IloCP now has only the top-level services § Class IloCPEngine has the ”in-search” services § In 12.7.1: IloIntVarArray x(env, 100, 0, 1); IloModel model(env); // ... create model .. IloCP cp(model); cp.solve(); IloInt total = 0; for (IloInt i = 0; i < 100; i++) total += cp.getIntVar(x[i]).getValue(); § In 12.8, no need to get the IlcIntVar: [...] total += cp.getValue(x[i]);
  16. 16. © 2017 IBM Corporation17 CP Optimizer – Refactored C++ API § 12.7.1: ILCGOAL1(MyGen, IlcIntVarArray, x) { IloCP cp = getCP(); IlcInt choice = IlcChooseFirstUnboundInt(x); if (choice < 0) return 0; return IlcAnd(MyInst(cp, x[choice]), this); } ILOCPGOALWRAPPER1(MyGoal, cp, IloIntVarArray, x) { return MyGen(cp, cp.getIntVarArray(x)); // 'cp' is of type IloCP } § 12.8: ILCGOAL1(MyGen, IlcIntVarArray, x) { IloCPEngine cp = getCPEngine(); IlcInt choice = IlcChooseFirstUnboundInt(x); if (choice < 0) return 0; return IlcAnd(MyInst(cp, x[choice]), this); } ILOCPGOALWRAPPER1(MyGoal, cp, IloIntVarArray, x) { return MyGen(cp, cp.getIntVarArray(x)); // 'cp' is of type IloCPEngine }
  17. 17. © 2017 IBM Corporation18 CP Optimizer – Bounds on the value of the optimal solution ! ---------------------------------------------------------------------------- ! Best Branches Non-fixed W Branch decision 0 11 - ! Gap = n/a (lower bound = 18) ! Using temporal relaxation. 0 11 1 - ! Gap = n/a (lower bound = 24) * 26 8 0.02s 1 - ! Gap = 7.69230% (lower bound = 24) 26 37 6 1 F on opttask(1)(1) ! Gap = 0.00000% (lower bound = 26) ! ---------------------------------------------------------------------------- ! Search completed, 1 solution found.
  18. 18. © 2017 IBM Corporation19 CPLEX – New parameters for sub-MIPs control § CPXPARAM_MIP_ SubMIP_Scale Present value for type of scaling used for sub-MIPs: 0 (default is 0) -1 = no scaling 0 = equilibration scaling 1 = aggressive scaling § CPXPARAM_MIP_ SubMIP_StartAlg Present value for algorithm to solve initial relaxation for sub-MIPs: 0 (default is 0) 0 = automatic 1 = primal simplex 2 = dual simplex 3 = network simplex 4 = barrier 5 = sifting § CPXPARAM_MIP_ SubMIP_SubAlg Present value for algorithm to solve subproblems for sub-MIPs: 0 (default is 0) 0 = automatic 1 = primal simplex 2 = dual simplex 3 = network simplex 4 = barrier 5 = sifting
  19. 19. © 2017 IBM Corporation20 CPLEX – Modeling Assistance – New warnings § Modeling Assistance was introduced last year in 12.7 § set read datacheck 2, aka CPXPARAM_Read_DataCheck equal to 2 § CPLEX and CP Optimizer display warnings § May show sources of numerical difficulties, inefficiencies, in the model § New warning: coefficients in a row or column having extremely close (but not equal) absolute values
  20. 20. © 2017 IBM Corporation21 CPLEX– Recording calls to the C API § Reproducing an issue during a solve is ’easy’: run the SAV file in the Interactive § Not so easy for issues related to API calls: need the source code, the build environment, the databases, etc. § CPLEX can now record all API calls, at the C level § This works with all APIs and connectors: they all use the C API § Set CPXPARAM_Record to 1 § CPLEX records calls and all the necessary data in file cplexnnnnnnnn.db. § This file can be sent to IBM Support to facilitate investigations
  21. 21. © 2017 IBM Corporation22 Summary § Performance in CP Optimizer and CPLEX, as always § OPL and IDE on Mac OS, with runseeds § Refactorings in CPLEX and CP Optimizer Latest news about CPLEX Optimization Studio http://ibm.co/2wv70gR Thank You! Don’t forget to try Benders!
  22. 22. © 2017 IBM Corporation24 Legal Disclaimer • © IBM Corporation 2017. 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.
  23. 23. © 2017 IBM Corporation25 CPLEX – Info callbacks in Benders (12.7.1) § Benders decomposition algorithm introduced last year in 12.7 § E.g. set benders strategy 3 for fully automated decomposition § Info callbacks available for Benders since 12.7.1 (April 2017) § But please use the new generic callback instead!

×