Decision Optimization

Decision Optimization

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

 View Only
  • 1.  How to add at most one user cut and not add CPLEX cut

    Posted Sun January 21, 2018 04:49 AM

    Originally posted by: lxysjtu


    Dear all,

     

    I am using CPLEX in C language. 

    At each node of the search tree, I want to add at most one user cut and do not add CPLEX's cuts.

    Is there any method?

     

    Thanks.

     

    Shaon


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: How to add at least one user cut and not add CPLEX cut

    Posted Sun January 21, 2018 05:28 AM

    Have you tried using a user cut callback together with CPX_CALLBACK_ABORT_CUT_LOOP? See the reference documentation here.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: How to add at least one user cut and not add CPLEX cut

    Posted Sun January 21, 2018 08:46 AM

    Originally posted by: lxysjtu


    I made a mistake in the question. I mean adding "at most" one user cut.

    I have tried using CPX_CALLBACK_ABORT_CUT_LOOP. 

    But I found CPLEX would come to the same node more than once.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: How to add at least one user cut and not add CPLEX cut

    Posted Sun January 21, 2018 03:55 PM

    Regarding CPLEX's cuts, there are parameters that you can use to turn them off. Check the parameters manual for details.

    Regarding your user cut callback, CPLEX will call it repeatedly at the same node until either the node is pruned (infeasible or provably suboptimal), the LP solution at the node is integer feasible, or your callback returns without adding anything (which is the most common reason). So to limit yourself to one cut per node, you'll need to check the node's unique identifier each time the callback is entered and compare it to the identifier the previous time the callback was called (which you will need to store). If the new identifier matches the previous one, this is a repeat call at the node, so your callback will need to exit without adding anything.

    If you are using multiple threads, you may need to take care to ensure that the storage of the node identifier inside the callback is thread-safe.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: How to add at least one user cut and not add CPLEX cut

    Posted Mon January 22, 2018 01:41 AM

    How do you detect that CPLEX invokes the cut callback for the same node more than once? If you set the *useraction_p of the callback to CPX_CALLBACK_ABORT_CUT_LOOP this should not happen.


    #CPLEXOptimizers
    #DecisionOptimization