Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Difference between add methods defined in log.opl and ilog.cplex

  • 1.  Difference between add methods defined in log.opl and ilog.cplex

    Posted 05/03/19 05:16 PM

    Originally posted by: open_ball


    Hi, 

    I took BendersATSP as a reference and coded a small Benders implementation in Java OPL Interface, but when I call the "add" method,  it gives me the following warning "The method add(IloConstraint) in the type IloCplex.LazyConstraintCallback is not applicable for the arguments (IloRange, int)".

    Now, when I look at the method, I observed something. Add method is defined in ilog.opl with only IloConstraint. However, in ilog.cplex it requires one additional parameter to be passed.


    IloConstraint ilog.opl.IloCplex.LazyConstraintCallback.add(IloConstraint cut) throws IloException

    IloRange ilog.cplex.IloCplex.LazyConstraintCallback.add(IloRange arg0, int arg1) throws IloException


    So when I use OPL interface, I am not able to pass  IloCplex.CutManagement.UseCutForce parameter into my add method. Is there a solution for this? or a better question, is this an issue for my implementation?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Difference between add methods defined in log.opl and ilog.cplex

    Posted 05/07/19 09:24 AM

    Correct. At the moment you cannot supply a cut management argument to the ilog.opl.IloCplex.LazyConstraintCallback.add(). This should not be a problem since the default is "force" and that is reasonable for lazy constraints.


    #CPLEXOptimizers
    #DecisionOptimization