Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Efficient Construction of Indexed Parameter

    Posted Fri October 28, 2011 04:50 PM

    Originally posted by: UDOPS


    The following statement is a huge resource consumer, easily the highest memory consumer in my profiler diagnostic. Any thoughts on making it less resource hungry? If I break it up into pieces will the net resource consumption go down?

    occheadway NBOccBlockNet = [<i,t> :
    <card({r | <r,a,b,c,d,1> in BlockTransit<i,t> } union {r | <r,a,b,c,d,1> in SolutionTransit<i,t> }), //count of trains occcupying this block instance
    card({r | <r,e,f,g,h,1> in BlockPending1<i,t>} union {r | <r,e,f,g,h,1> in BlockSolutionPending1<i,t>})+
    card({r | <r,i,j,k,l,1> in BlockPending2<i,t>} union {r | <r,i,j,k,l,1> in BlockSolutionPending2<i,t>})> //count of trains in headway shadow
    | <i,t> in BlockNet: Pbhttp://1].headwayoff!=1;
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Efficient Construction of Indexed Parameter

    Posted Sat October 29, 2011 09:08 AM

    Originally posted by: UDOPS


    Additional comment: A lot of memory and resources are consumed building the sets for this calculation. Is the memory used in the calculation, or the storage of the result? If I calculated this in a prior model run, wrote it to disk, and then read it in again on this model run, would I reduce my memory consumption on the second run?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Efficient Construction of Indexed Parameter

    Posted Tue November 01, 2011 02:14 PM

    Originally posted by: SystemAdmin


    > A lot of memory and resources are consumed building the sets for
    >this calculation. Is the memory used in the calculation, or the
    > storage of the result? If I calculated this in a prior model run,
    > wrote it to disk, and then read it in again on this model run,
    > would I reduce my memory consumption on the second run?

    Assuming that a significant amount of memory and time is being spent in the calculations of 'NBOccBlockNet' variable, and that it does not change between iterations, it may be a good idea to write it to disk (using IloOplOutputFile) and read it in subsequent iterations.

    With regards to making the step more efficient, without the knowledge of the involved structures, this is hard to guess. If you could give us a more complete sample (and place it between {code} tags so as to preserve the format), I could look into this further.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer