Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Problem in enquirying cplex status after ending callback

    Posted 08/04/10 07:56 AM

    Originally posted by: SystemAdmin


    Dear all,

    I run a code where I add a lot of cut to a callback. cplex terminates with optimality and algorithm stops.
    I extract some statistics as well as the solver status (IloCplexStatus).

    when I try that I get:

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.


    any idea?
    Any comment is appreciated.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/04/10 11:13 AM

    Originally posted by: SystemAdmin


    Is it specifically the call to getCplexStatus that blows up the program? Have you tried catching any exceptions raised by the call?

    Also, have you ended anything between where the solver returns and where you call getCplexStatus? When I see a mysterious runtime failure, I usually think first of what in Java would be call a nullPointerException.

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/04/10 11:18 AM

    Originally posted by: SystemAdmin


    Thanks Paul,
    In fact I tried to catch but nothing is thrown in windows. But in linux it throws something like IloInvalidCall I dont remember it exactly because I got rid of it by cutting apart that part of code.

    Thanks again.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/04/10 02:11 PM

    Originally posted by: SystemAdmin


    Shahin,

    Between the call to solve() and the call to getCplexStatus(), do you do anything that might in any way alter the underlying model?

    Can you move getCplexStatus() immediately after solve() and see if the problem either goes away or shifts to a different line of code?

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/04/10 02:21 PM

    Originally posted by: SystemAdmin


    Yes, that comes immediately but the cplex object deals with callback adn terminates fine.
    The only thing is that i cannot access solver status.
    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/04/10 03:50 PM

    Originally posted by: SystemAdmin


    Can you access the "plain" status (IloCplex::getStatus)? What about the solution itself (IloCplex::getValue)? It's hard to picture why getCplexStatus would blow up if other solution-access methods do not.

    Also, did you verify in a debugger that it blows up at getCplexStatus (and not after getCplexStatus returns)? If you're relying on the fact that you print the CplexStatus and nothing is showing up, could it be that getCplexStatus and the print statement executed but then the program crashed before the print buffer was flushed?

    /Paul

    Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
    #DecisionOptimization
    #MathematicalProgramming-General


  • 7.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/05/10 05:37 AM

    Originally posted by: SystemAdmin


    these two functions worked properly.
    It is only getCPlexStatus which is strange.
    Anyway, I changed the code; not using it any more; detecting the status using the gap calaculated from inside callback. every thing is fine now.

    thanks Paul,
    #DecisionOptimization
    #MathematicalProgramming-General


  • 8.  Re: Problem in enquirying cplex status after ending callback

    Posted 08/05/10 10:19 AM

    Originally posted by: SystemAdmin


    If you still have the recalcitrant code archived somewhere, you might submit it to IBM for testing. It could be you tripped over a bug in CPLEX.

    /Paul
    #DecisionOptimization
    #MathematicalProgramming-General