Decision Optimization

Decision Optimization

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

 View Only
  • 1.  User cut callback without macro (C++)

    Posted Sat March 16, 2013 02:29 PM

    Originally posted by: Trino


    Hi all,

    I'm using the macro ILOUSERCUTCALLBACKn to create a callback in concert C++. Everything worked fine until I needed to create another callback of the same type. From what I could tell I can't use this macro more than once, even if the n is different, so I guess I'll have to find an alternative.

    Is there another way to implement these callbacks without the macro and without having to implement the cutcallback class for each of them?
    Thanks,
    Trino.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: User cut callback without macro (C++)

    Posted Sat March 16, 2013 02:56 PM

    Originally posted by: SystemAdmin


    Why do you think you can use the macro only once?
    You can use it multiple times to define multiple classes. You just need to pass a different name argument (first argument) to the macro so that the classes have different names.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: User cut callback without macro (C++)

    Posted Sat March 16, 2013 03:16 PM

    Originally posted by: Trino


    Oh, I dind't know that the first argument was the name of the resulting class, my bad. Thanks
    #CPLEXOptimizers
    #DecisionOptimization