Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  program crash with makeBranch

    Posted 02/23/19 07:27 PM

    Originally posted by: Lessi


     

    Hi, I add those lines of code to do own branching; where yFull[pos] is an unfixed binary variable. However, my program crashes. Could you suggest to me what is the source of the problem?  
     

                this->makeBranch(yFull[pos], 1, IloCplex::BranchDown, this->getObjValue());
                this->makeBranch(yFull[pos], 0, IloCplex::BranchUp, this->getObjValue());

               return ;

     

    Thank you,


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: program crash with makeBranch

    Posted 02/24/19 06:10 AM

    To suggest anything we would need more details about the crash. What do you mean by "crash"? Do you get a memory protection fault? Does it stop due to an uncaught exception? Does a failed assertion stop the program?


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: program crash with makeBranch

    Posted 02/24/19 04:35 PM

    Originally posted by: Lessi


     

    You can find the code where the crash happens: https://ideone.com/dRFDP0


    I select an unfixed variable to branch (line 70-72), and I do branching on this variable (line 90-95) and (line 148-153)

     

    the program stopped and I think it is an uncaught exception. It created a very big file with dump information.

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: program crash with makeBranch

    Posted 02/25/19 12:09 AM

    What is the exception you get? Which line throws the exception? Can you use a try-catch-block and dump the exception message? If the exception occurs during the callback then it is best to have this try-catch inside the callback.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: program crash with makeBranch

    Posted 02/25/19 08:28 AM

    Originally posted by: Lessi


     

    Thank you, Daniel, I checked the log and it is the exception that I got. Let me find where is the source of this issue.

     

    X& IloArray::operator[] (IloInt i) : Out of bounds operation: index superior to size of array
    fixcost1: /home/vuducmin/Softwares/concert/include/ilconcert/iloenv.h:2234: X& IloArray<X>::operator[](IloInt) [with X = IloExtractable; IloInt = long int]: Assertion `(i < _impl->getSize()) || (ILOSTD(cerr) << "X& IloArray::operator[] (IloInt i) : Out of bounds operation: index superior to size of array" << ILOSTD(endl), ilo_stop_assert())' failed.
    srun: error: cp2313: task 0: Aborted (core dumped)
    srun: Terminating job step 1095554.0

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: program crash with makeBranch

    Posted 02/26/19 04:16 AM

    Originally posted by: Lessi


     

    Hi Daniel,

     

    Can a program crash when a branching I made is infeasible? e.g. assigning a variable to 1 makes a branch infeasible? I suppose that for variables that are fixed by CPLEX, then no "hard" constraints have been violated (except usercut & lazy constraints that will be checked later), is it right?

     

    Thanks,

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: program crash with makeBranch

    Posted 03/10/19 01:58 AM

    Doing a branch that fixes a variable to an infeasible value is perfectly fine. This happens all the time during branching. This is when you see an "infeasbible" as objective value of a node in the log.

    Note that the assertion failure you reported above is not related to something CPLEX does. It is a bug in your code. You are trying to access an array beyond its bounds.


    #CPLEXOptimizers
    #DecisionOptimization