Decision Optimization

 View Only
  • 1.  Monitoring the progress of IBM docplex solver

    Posted Thu October 21, 2021 01:23 PM
    Hi,

    I am working on a supply chain optimization project for my client which involves docplex solver optimizing more than 100000 constraints, which takes about 15 minutes to optimize. Currently when the solver is optimizing we have no idea what the progress of the solver is or what constraints it is trying to solve until the optimization is complete. While the docplex solver is optimizing the constraints and the different variables, is there any way to view the progress of the solver and print some of the important decisions made inside the solver? I want this information so that we know why the solver is making decisions the way it makes the decision.


    ------------------------------
    Shresht Shetty
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Monitoring the progress of IBM docplex solver

    Posted Thu October 21, 2021 02:20 PM
    You should have a look at the docplex ProgressListener: https://ibmdecisionoptimization.github.io/docplex-doc/mp/docplex.mp.progress.html
    It is a class which can provide progress, when a solution is found,...
    An example of implementation is the TextProgressListener

    If you need to get into deeper CPLEX details, then you should look at implementing your own callback. Some examples here: https://github.com/IBMDecisionOptimization/docplex-examples/tree/master/examples/mp/callbacks

    ------------------------------
    Vincent Beraudier
    ------------------------------



  • 3.  RE: Monitoring the progress of IBM docplex solver

    Posted Sun October 24, 2021 06:40 PM
    Thank you Vincent, the KPIListener is useful to me. Something as an example that I want to implement is, lets consider there are 100 rostered members to do a task, but lets say that if the 100 members are not enough to do a task or if some of the members are not qualified to do the task, the solver would roster extra members or roster someone with better qualifications. So what I'm trying to do is trying to view these kind of important decision making steps taken by the solver by using Listeners or callbacks as you mention. However, I'm still quite new to using cplex so not exactly sure how to proceed. Would you have any recommendation as to which callbacks to use or some other methods to achieve this?

    --------------------
    Shresht Shetty
    -------------------

    ------------------------------
    Shresht Shetty
    ------------------------------



  • 4.  RE: Monitoring the progress of IBM docplex solver

    Posted Tue November 02, 2021 10:04 AM
    I'm not sure I understand your needs.

    CPLEX algorithm will find the optimal solution to your problem if any.
    For this, it will look for feasible solutions:
    it will find a first solution then will refine by accepting solutions which improves the gap.

    The KPI listener is listening to this solution acceptation.
    (So you can get all the decisions that were taken by CPLEX, but not the reasons why it did it.)
    The KPIs are aggregations of some of the problem, but of course, if you want the full solution, you can get it easily.

    This is the mechanism we use in our DO stack in the various UIs to follow the progress (gap, objective, kpis), to stop,...

    The listeners are helper classes based the callbacks api which provide more fine grained control and information.

    ------------------------------
    Vincent Beraudier
    ------------------------------