Decision Optimization

Decision Optimization

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

 View Only
  • 1.  CPLEX callback doubt

    Posted 10/13/15 10:06 AM

    Originally posted by: prasr29


    Dear Sir,

                   I am using Cplex concert technology in C++. I am facing a weird error when I add new arguments to the callback function. Initially my callback had 3 arguments, i made it as ILOMIPINFOCALLBACK4 and added one more argument and reflected that change in main program also, but it is showing some error which says "expected a ;" , also when callback is called in the main program using cplex.use it shows the error "too many arguments" for the newly added variable there.  Can you guide me how to get rid of this error. Thank you.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPLEX callback doubt

    Posted 10/13/15 10:54 AM

    Could you show us the offending code?

    My (very wild) guess is that you missed the fact that for each argument to the callback you have to pass 2 parameters to the macro: the type and the name of the new argument.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: CPLEX callback doubt

    Posted 10/14/15 03:12 AM

    Originally posted by: prasr29


    Hi Daniel,

                    Thanks for the reply. Here are the snapshots of before and after the code i have written: Before is ILOMIPINFOCALLBACK3 while after is ILOMIPINFOCALLBACK4. Now in the after picture you can see that at the place where the callback is defined , there is an error which shows as red lines underlining the statement. When the cursor is pointed at that statement "expected a ;" message appears on the screen. Thank you

    after adding the extra variable


    #DecisionOptimization


  • 4.  Re: CPLEX callback doubt

    Posted 10/14/15 04:25 AM

    Originally posted by: Laci Ladanyi


    You forgot a "," after the sol_cut1 argument...


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: CPLEX callback doubt

    Posted 10/15/15 01:48 AM

    Originally posted by: prasr29


    Thank you !!!


    #CPLEXOptimizers
    #DecisionOptimization