Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Memory error during column generation

    Posted 01/29/14 02:08 PM

    Originally posted by: GokhanCeyhan


    Hi,

    I got the following error during the run of my branch and price algorithm.

    First-chance exception at 0x7563812f (KernelBase.dll) in example.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0023d074..
    First-chance exception at 0x7563812f (KernelBase.dll) in example.exe: Microsoft C++ exception: IloMemoryException at memory location 0x0023d0ac..
    First-chance exception at 0x00cf84bc in example.exe: 0xC0000005: Access violation writing location 0x60c57000.
    Unhandled exception at 0x00cf84bc in example.exe: 0xC0000005: Access violation writing location 0x60c57000.

    During the run, the memory usage increases up to 90% after some time and this error occurs. I free the memory from unused arrays(IloRangeArray, IloNumArray...) but cannot think of any other reason. What might be the reason for this error? Thanks in advance...


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Memory error during column generation

    Posted 01/30/14 02:09 AM

    std::bad_alloc is thrown when there is no more memory available. Is it expected that your program may run of of memory, maybe because the model or the search tree get very big? If it is expected then you should double check that you handle this exception correctly. If hitting the memory limit is not expected then you have a memory leak and need to track that down. A typical reason for a memory leak when using C++ Concert is to a forgotten call to end() for Ilo* objects.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Memory error during column generation

    Posted 01/30/14 02:31 AM

    Originally posted by: GokhanCeyhan


    Thanks a lot Daniel.

    It may be expected when the problem size is very large but I try to solve a relatively small problem. I use end() method for every Ilo* object but what about IloNumVarArray. (e.g. IloNumVarArray dec) Is it enough to call dec.end() or should I call end() for every element in the array like dec[i].end?

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Memory error during column generation

    Posted 02/18/14 01:23 AM

    IloNumVarArray::end() will only release the array itself. It will not release the IloNumVar instances that were stored in that array. To release those instances as well use IloNumVarArray::endElements().


    #CPLEXOptimizers
    #DecisionOptimization