Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

Datastructures used in column generation

  • 1.  Datastructures used in column generation

    Posted 03/17/16 05:10 PM

    Originally posted by: abhzap


    Hi All,

         I have looked through the cutstock.java example and was curious as to why only array [] are used. Is there a reason that dynamic datastructures such as ArrayList is not used for storing handles to constraints and variables? For e.g.  IloRange[]   Fill = new IloRange[_amount.length]; is what is used in the cutstock.java example. What about something like ArrayList<IloRange> Fill = new ArrayList<IloRange>(); ?

        Any insight will be helpful and much appreciated.

    Thanks,

    abhzap

     

     

     

     

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Datastructures used in column generation

    Posted 03/21/16 02:23 AM

    There are two main reasons for this:

    1. The example was written a long time ago. Back then Java did not have generics.
    2. The CPLEX API is based on arrays, there are no overloads that take collection arguments.

    Thus, if you feel that collections/generics fit better for your application, then by all means use them!


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Datastructures used in column generation

    Posted 03/23/16 04:15 PM

    Originally posted by: abhzap


    Thanks Daniel,

                   That was really helpful.

     

     


    #CPLEXOptimizers
    #DecisionOptimization