Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Conflict refiner when using doopl

    Posted 08/07/20 08:40 AM
    Hello, 

    We have been using the doopl library from python for the last couple of months for CP Optimizer. We had to supply huge matrices and numpy was a good choice apart from supplying an initial solution. For specific instances of the initial solution, we get the following error: 
     

    ! Starting point is not consistent with constraints

    I want to figure out what is causing this inconsistency and was looking for methods to invoke the Conflict Refiner using doopl for CP Optimizer. I tried invoking the Conflict Refiner from the opl model as well but the workflow does not initiate the conflict refiner despite forcing the initial solution on the CPO. 

    doopl invoke code:

    with create_opl_model(model=mod, data=dat) as opl:
    opl.set_input("XYZ", xyz)

    if opl.run():
         curr = opl.objective_value
         print("OBJECTIVE: " + str(curr)) 
    else:
         print("No solution!")


    1) Is there a direct way to call conflict refiner from doopl 
    2) If I am invoking .mod from doopl, where exactly in the .mod file should I have the conflict refiner and syntax for CPO? 

    I tried to search in the documentation and help - there is a lot of information available for docplex and MIP but not doopl and CPO. A possible code snippet would help.



    ------------------------------
    Thanks in advance,
    Balakrishnan
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Conflict refiner when using doopl

    Posted 08/07/20 08:44 AM
    Just want to add that I am looking for Conflict Refiner with doopl for CP Optimizer.

    ------------------------------
    Balakrishnan Ananthanarayanan
    ------------------------------



  • 3.  RE: Conflict refiner when using doopl

    Posted 08/10/20 04:02 AM
    Hi

    with doopl you can call an opl with some flow control (main).

    Plus within flow control you can iterate on the conflicts in CPo:

    https://community.ibm.com/community/user/datascience/communities/community-home/digestviewer/viewthread?MessageKey=a0c3c7ea-8afb-4bbe-96d8-63501945c816&CommunityKey=ab7de0fd-6f43-47a9-8261-33578a231bb7&tab=digestviewer#bma0c3c7ea-8afb-4bbe-96d8-63501945c816

    regards





    ------------------------------
    ALEX FLEISCHER
    ------------------------------