Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Long run time on creating multiple dimension variables

    Posted 03/23/18 10:08 AM

    Originally posted by: David0424


    Hi everyone 

     

    I am using the .net API of CPLEX12.6.0, and I am working on a very big model.

    I am getting some trouble with run time issue on creating high dimension variables.

    For example, I create xijkst variable which have 5 dimensions, and the program will have the long run time when initialize the x variables. The size of index: i = 130 , j = 130, k = 30 , s = 110 , t = 110

    Is there anyway to solve the run time issue? or there have another way to initialize the high dimensions variable?

    Thanks a lot.

     

    My code is as follow:

    ______________________________________________________________________

    INumVar [][][][][] X_ ijkst = new INumVar [i.Length][][][][][];

     

                for (int i = 0; i < i.Length; i++)

                {

                    x[i] = new INumVar[j.Lenght][][][];

                    for (int j = 0; j < j.Length; j++)

                    {

                        x[i][j] = new INumVar[k.Length][][];

                        for (int s = 0; s < s.Length; l++)

                        {

                            x[i][j][k] = new INumVar[s.Length][];

                            for (int t = 0; t < t.Length; t++)

                            {

                                   x[i][j][k][s] = cplex.IntVarArray(Num_Shift, 0, 1);

                            }

                        }

                    }

                }

    ______________________________________________________________________________


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: Long run time on creating multiple dimension variables

    Posted 03/23/18 10:26 AM

    That makes a total of 6134700000 variables! That number is even bigger than what can be stored in a 32bit signed integer. I guess the problem is the sheer number of variables. Even if you manage to create them all in finite time, you will probably not have enough memory to do anything useful with them.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: Long run time on creating multiple dimension variables

    Posted 03/24/18 01:48 AM

    Originally posted by: David0424


    Thanks for reply Daniel, I working on the reducing problem size right now. 

    I am thinking that is there any way to create multiple dimensions variable in another way by using .net API , because I create the variables by intuition way. 

     

    Thanks a lot


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: Long run time on creating multiple dimension variables

    Posted 04/06/18 08:24 AM

    I don't think there is another way. The problem is not the way you create them but the number of variables you create.


    #DecisionOptimization
    #MathematicalProgramming-General