Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Vehicle Routing Problem with Time Windows

    Posted 12/10/18 01:07 AM

    Originally posted by: Ouput


    Help me please !!! It has error about unsupported array slot index


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Vehicle Routing Problem with Time Windows

    Posted 12/10/18 09:49 AM

    Hi,

    I see

    x[0][j][v]

    but x is

    dvar boolean x[i in Customers][j in Customers][v in Vehicles]; 

    with customers being

    range Customers = 1..c;

    So you should fix that.

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Vehicle Routing Problem with Time Windows

    Posted 12/10/18 11:19 AM

    Originally posted by: Ouput


    Hi,

    Thanks for your help. But I can not understand your idea, I fix like the attach file

    It still that error :'( and  I want define x[0][j][v] from depot so I let the depot is point 0


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Vehicle Routing Problem with Time Windows

    Posted 12/10/18 11:41 AM

    Ok then you have to change the range for the array x

    Plus, in

    ct10: forall(d in Drivers, v in Vehicles, t in Workdays, i in Customers)
             r[d][t] >= u[n+1][v][t] - tw[i].e - M*(1-y[d][v]);

    you use n+1 but this leads to an out of bound since n+1 is not in nodes

    regards

     

    https://www.linkedin.com/pulse/making-decision-optimization-simple-alex-fleischer/


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: Vehicle Routing Problem with Time Windows

    Posted 12/12/18 12:06 PM

    Originally posted by: Ouput


    Hi,

    So I change all depot equal to 0. It still has that error. Please help me. The objective of my is Minimize travel cost, penalty for late loading cost and penalty costs incurred for late servicing, I have one central depot and distribution for 50 customers, I have 20 trucks with capacity is 2 tons, each driver has an 8 hours working day and each customer has fix time windows. I think my constraint missing something


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 6.  Re: Vehicle Routing Problem with Time Windows

    Posted 12/13/18 04:41 AM

    Hi,

    in your .dat you have

    cost=[[7 6 8 15 10]
     [6.3 5.4 7.2 13.5 9]
     [8.4 7.2 9.6 18 12]
     [6.3 5.4 7.2 13.5 9]
     [6.3 5.4 7.2 13.5 9]];

     

    whereas in .mod

    float Ct[Nodes][Nodes]=...;  

    You should use the same identifiers in .mod and .dat

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 7.  Re: Vehicle Routing Problem with Time Windows

    Posted 02/05/19 11:31 PM

    Originally posted by: Ouput


    Please help me. I try with new code and the code just choose vehicle number 2 and 3 


    #DecisionOptimization
    #OPLusingCPLEXOptimizer