Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  control callbacks and cores

    Posted 03/20/17 09:21 PM

    Originally posted by: srinit34


    if we use control callbacks, is it the same as solving the problem on a single CPU_CORE?  or do we lose more than that ?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: control callbacks and cores

    Posted 03/22/17 04:27 AM

    It is not the same. If control callbacks are present then CPLEX switches to single threaded execution by default. This however can be changed by explicitly setting the number of threads.

    Moreover, for technical reasons using control callbacks disables some MIP features (for example dynamic search), so it is not the same as solving with a single thread and without control callbacks.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: control callbacks and cores

    Posted 03/22/17 04:45 PM

    Originally posted by: srinit34


    Hi Daniel

    Thanks for clarifying.  Other than the disabled features like dynamic search, a few more questions just on the threads:

     

    1) what is the api call for setting # of threads

    2) how to choose the best number of threads to use

    3) on a single core, does it matter if we have 1 thread or several threads ?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: control callbacks and cores

    Posted 03/23/17 01:33 AM
    1. To change/set the number of threads you set parameter CPX_PARAM_THREADS (see here for details about parameters).
    2. Usually the more threads the better. There are some corner cases in which CPLEX performs better with fewer threads, for example if your models solve very quickly. Usually the default choice "number of threads = number of cores" is a good one. It is not a good idea to use more threads than cores with CPLEX.
    3. If you set CPX_PARAM_THREADS>1 on a single core machine then CPLEX will use more threads than there are cores. This is usually a bad idea. On a single core I would definitely stick with one thread.

    #CPLEXOptimizers
    #DecisionOptimization