Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  OPL callback

    Posted 02/04/17 02:17 AM

    Originally posted by: EnricoG77


    Hi guys,

      I am trying to use the callback in OPL, but I am not sure that is possible. If so, please let me know how to do. I would like to implement the cutting plane method without use C++/Java, I am wondering if the script in OPL does the job.

     

    Best,

    Enrico


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: OPL callback

    Posted 02/06/17 10:51 AM

    It is not possible to write a callback in OPL script.

    If you are able to generate all your cuts up front the you can use the addUserCuts() method of the IloCplex scripting class. Dynamic separation of cuts is not possible.

    A rather cumbersome emulation of this that is possible in OPL script would be the following:

    1. Relax the model to LP
    2. Solve
    3. Get the solution, find violated cuts and add them as constraints (or cuts) to the model
    4. Goto 2

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: OPL callback

    Posted 02/12/17 06:12 AM

    Hi

    you may find an example tsp.mod at examples/opl/models/TravelingSalesmanProblem

    There you will see how to add new constraints and solve again

    regards


    #CPLEXOptimizers
    #DecisionOptimization