Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  lazy constraint

    Posted 09/14/12 12:19 AM

    Originally posted by: gtli


    Hi, I am using lazy constraints on a problem by including codes like cplex.addLazyConstraint(ax>=b).
    I ran exactly the same codes with cplex 12.2 and 12.4. The results are quite different where 12.2 gave me much better bounds.
    I understand that other stuff you have changed might also influence the performance, but I noticed in an earlier post mentioning that 12.4(12.3) may have fixed some lazy constraint problem from 12.2, does it mean that the 12.2 version may give me the wrong(invalid) result at all? or is it just different performance?

    2. I want to get the values of the candidate incumbent solution in my lazy constraint callback. By using getValues(sol,x) in the callback, I get the values of the relaxation solution, which should be integers if the candidate solution is obtained by solving the relaxation. What about the solutions got from primal heuristics? Are the heuristics all turned off so I don't worry about it?

    Thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: lazy constraint

    Posted 09/19/12 03:03 AM

    Originally posted by: SystemAdmin


    > gtli wrote:
    > Hi, I am using lazy constraints on a problem by including codes like cplex.addLazyConstraint(ax>=b).
    > I ran exactly the same codes with cplex 12.2 and 12.4. The results are quite different where 12.2 gave me much better bounds.
    > I understand that other stuff you have changed might also influence the performance, but I noticed in an earlier post mentioning that 12.4(12.3) may have fixed some lazy constraint problem from 12.2, does it mean that the 12.2 version may give me the wrong(invalid) result at all? or is it just different performance?
    >
    In 12.4 lazy constraint are only considered when integer solutions are encountered. In 12.2 they were also considered when CPLEX was looking for cuts. Does it help to also add the lazy constraint as cuts?
    > 2. I want to get the values of the candidate incumbent solution in my lazy constraint callback. By using getValues(sol,x) in the callback, I get the values of the relaxation solution, which should be integers if the candidate solution is obtained by solving the relaxation. What about the solutions got from primal heuristics? Are the heuristics all turned off so I don't worry about it?
    >
    Heuristics are not turned off. If a primal heuristic finds a solution then the lazy constraint callback is invoked and getValues() will return the values for the heuristic solution.
    Is there a reason you want to distinguish between solutions from integral nodes and solution from heuristics?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: lazy constraint

    Posted 09/26/12 11:50 AM

    Originally posted by: yli41


    Thank you very much! It does help to explain the difference in the results.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: lazy constraint

    Posted 09/30/12 08:35 PM

    Originally posted by: gangulo


    I may be interested in distinguishing solutions that come from primal heuristics and integral nodes, in both Callable Library and Concert. Is that possible in Cplex 12.4?

    Thanks!
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: lazy constraint

    Posted 10/01/12 05:34 AM

    Originally posted by: SystemAdmin


    There is no function or flag to distinguish these two cases (we already have a user wish for that). However, if the callback is invoked with a heuristic solution then all integral variables will be fixed.
    So in your callback you can scan through all integral variables. If for all of them the local lower and upper bounds coincide then the callback is almost certainly invoked for a heuristic solution. Otherwise it is invoked for an integral node.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: lazy constraint

    Posted 10/02/12 02:48 PM

    Originally posted by: gangulo


    Thanks Daniel!
    #CPLEXOptimizers
    #DecisionOptimization