Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  c0000005 EXCEPTION_ACCESS_VIOLATION

    Posted 05/26/15 07:51 AM

    Originally posted by: lyl523


    Hi, my model can run use the small data from the excel (D_average4c1), but  when I  increase the number of  my data from the excel(D_average4c4), the cplex can run  for a minutes, then come  across the error:c0000005 EXCEPTION_ACCESS_VIOLATION

    my model and data :

    //import data;
    
    int nbWarehouses = ...;  //j
    range warehouse = 1..nbWarehouses;
    
    int nbDemands = ...;//  i 
    range demand = 1..nbDemands;
    
    int nbInstance = ...;// k
    range instance = 1..nbInstance;
    
    int nbType = ...;  //l
    range type = 1..nbType;
    
    int D_average1[demand][instance]=...;
    int D_average2[demand][instance]=...;
    int D_average3[demand][instance]=...;
    float P[instance] = ...;
    float T[demand][warehouse]=...;
    int Q = ...;
    int t1 = ...;
    int N = ...;
    //read the data to the D
    int D[demand][instance][type];
    execute{
        for(var i in demand){
      for (var k in instance){
       D[i][k][1]=D_average1[i][k];
       D[i][k][2]=D_average2[i][k];
       D[i][k][3]=D_average3[i][k];   
      } 
     }
    }
    
    
    // decision variables
    dvar float+ x[demand][warehouse][instance][type] in 0..maxint;
    dvar float+ w[demand][instance][type] in 0..maxint;
    dvar float+ q[warehouse][type] in 0..maxint;
    dvar int y[warehouse] in 0..1;  
    
    
    
    
    //marget
    
    dexpr float shipping_obj = sum(k in instance) (P[k]*((sum(i in demand, l in type) w[i,k,l]*t1 
     + sum(i in demand,j in warehouse,k in instance,l in type) x[i,j,k,l]*T[i,j])/(sum(i in demand, l in type) D[i,k,l])));
    
    
    
    minimize shipping_obj; 
    subject to {
        constraints1:
        forall(i in demand, k in instance, l in type){
           sum(j in warehouse) x[i,j,k,l] + w[i,k,l] >= D[i,k,l];
          w[i,k,l] <= D[i,k,l];      
           //w[i,k,l] <= sum(j in warehouse) x[i,j,k,l];
          }      
      constraints2:   
        forall(j in warehouse, k in instance, l in type){
           sum(i in demand) x[i,j,k,l] <= q[j,l]; 
             }
         constraints3:
             forall(j in warehouse, l in type){
              q[j,l] <= Q*y[j];           
               }
         constraints5:
             sum(j in warehouse, l in type) q[j,l] <= Q ;
    
         constraints6:    
             sum(j in warehouse) y[j] <= N ;
    };
    
    nbInstance = 230; 
    nbType = 3;
    nbWarehouses = 11;
    nbDemands = 31;
    Q = 10000000;
    t1 = 336;
    N = 6;
     
    
    SheetConnection sheet("D_average4c1.xlsx");
    
    D_average1  from SheetRead(sheet,"'item1'!A1:HV31");
    D_average2  from SheetRead(sheet,"'item2'!A1:HV31");
    D_average3  from SheetRead(sheet,"'item3'!A1:HV31");
    P from SheetRead(sheet,"'P'!A1:HV1");
    T from SheetRead(sheet,"'T'!A1:K31");
    
     /*test the D_average4c4.xlsx
    

    nbInstance = 230;
    nbType = 3;
    nbWarehouses = 31;
    nbDemands = 155;
    Q = 10000000;
    t1 = 336;
    N = 24;
     


    SheetConnection sheet("D_average4c4.xlsx");
    D_average1  from SheetRead(sheet,"'item1'!A1:HV155");
    D_average2  from SheetRead(sheet,"'item2'!A1:HV155");
    D_average3  from SheetRead(sheet,"'item3'!A1:HV155");
    P from SheetRead(sheet,"'P'!A1:HV1");
    T from SheetRead(sheet,"'T'!A1:AE155");

    */

    I cannot find the   specific error, and  I cannot  understand the meaning of " c0000005 EXCEPTION_ACCESS_VIOLATION",my projects are  all in the attachments.

    

    

    

    

    

    

    

    

    

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: c0000005 EXCEPTION_ACCESS_VIOLATION

    Posted 05/28/15 05:57 AM

    Hi

    you get an out of memory error.

    If you rewrite your objective into

    dexpr float shipping_obj = sum(k in instance) (P[k]*((sum(i in demand, l in type) w[i,k,l]*t1
     //+ sum(i in demand,j in warehouse,k in instance,l in type) x[i,j,k,l]*T[i,j])/(sum(i in demand, l in type) D[i,k,l]
     )));

    then it works.

    So I think you should check your objective. You seem to have a parenthesis issue


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: c0000005 EXCEPTION_ACCESS_VIOLATION

    Posted 11/24/17 02:06 AM

    Originally posted by: miamoto


    i have the same problem as to "lyl523"

    i have 4 GB ram that when running the program it's usage is less than 60%.

    then i don't think that the problem is out of memory problem. 

    the engine log file is attached.

     

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: c0000005 EXCEPTION_ACCESS_VIOLATION

    Posted 11/24/17 03:47 AM


  • 5.  Re: c0000005 EXCEPTION_ACCESS_VIOLATION

    Posted 11/24/17 07:38 AM

    Originally posted by: miamoto


    i have the same problem,
    but my ram usage is always less than 60% during solving time. 

    so i my problem is not out of memory error


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: c0000005 EXCEPTION_ACCESS_VIOLATION

    Posted 11/24/17 07:51 AM

    Hi,

    have you tried to open a support ticket ?

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer