Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Multi period CVRP

    Posted 09/25/17 09:48 AM

    Originally posted by: Guerlain


    I have a problem with my VRP 

    the beginning and the end of the tour must be in the supplier depot so I should have something like this in every tour (1-3-..-5-1) but I've usually something like this (1-5-..2-1) and (6-4-6) could you please help me the code is bellow.


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Multi period CVRP

    Posted 09/25/17 03:34 PM

    I cannot tell which (if any) constraints in your model are responsible for subtour elimination.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Multi period CVRP

    Posted 09/25/17 04:45 PM

    Originally posted by: Guerlain


    In my model the subtour elimination constraints are :

    forall(i,j in 2..n: j!=i, t in 1..t, k in Vehicles)
    u[i][k][t]- u[j][k][t]+((n-1)* x[<i,j>][k][t])<= Cap_Veh[k][t] - Transf[j][k][t]; 
     
    forall(i in 2..n, t in 1..t, k in Vehicles)
    1 <= u[i][k][t] <= n-1;

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Multi period CVRP

    Posted 09/25/17 05:34 PM

    If the first constraint above is supposed to be the Miller-Tucker-Zemlin subtour elimination constraint, bear in mind that in M-T-Z the right hand side of the constraint is one less than the coefficient of the arc crossing variable (your x). So with x multiplied by n-1 on the left, the right side should be n-2. If Cap_Veh[k][t] - Transf[j][k][t] comes out greater than that, it will allow a subtour to sneak in.


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Multi period CVRP

    Posted 09/26/17 06:44 AM

    Originally posted by: Guerlain


    Thanks now it work perfectly Smile


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Multi period CVRP

    Posted 03/28/18 10:11 AM

    Originally posted by: sophieTSP


    I am trying to solve an extention of the traveling salesman problem and I do not know how to write on OPL cplex, the constraint of elimination of the subtours, I treat the TSP probabilist, (of the customers with present pi). decision with three variables, i, j for clients and k for the scenario:

    the subtraction elimination constraint for the classical traveling salesman  problem is as follows: at xij's place, i have xijk now

    // Subtour elimination constraints.
         forall (s in subtours)
             sum (i in cities: s.subtour [i]! = 0)
                x [minl (i, s.subtour [i]), maxl (i, s.subtour [i])]
                <= s.size-1;
               
      };
      how could I add the 3rd index on this constraint?


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Multi period CVRP

    Posted 03/29/18 12:11 AM

    Is this related to your question here? I think I may have covered your question in one of my replies. I think that because in each snapshot you have a different set of cities, you will have to consider a different set of subtours for each snapshot. I have posted some code there that does this. Please come back if that does not answer your question.


    #CPLEXOptimizers
    #DecisionOptimization