Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Single Depot Vehicle Routing Problem

    Posted Fri June 18, 2021 11:56 AM

    Hello everyone,

    I have a problem with a model for a single depot vehicle routing problem. Every time I run the model I get the solution 0E0. Can you tell me what's wrong with the model and why it doesn't work?

    {int} V = ...; //Set of nodes Customers + Depots

    {int} K = ...; //set of vehicles k

    float Distance [V][V]= ...;

    float Capacity [K] = ...;

    float Demand [V] = ...;

    dvar boolean X [V][V][K];

    dvar float u[V];

    int n = ...;

    minimize

    sum (i in V, j in V, k in K )

    X[i][j][k] * Distance[i][j];

    subject to {

    // 16

    forall(j in V)

    sum (i in V, k in K)

    X[i][j][k] == 1;

    // 17

    forall (i in V)

    sum (j in V, k in K)

    X[i][j][k] == 1;

    // 18

    forall (k in K, h in V)

    sum (i in V) X[i][h][k] - sum (j in V) X[h][j][k] == 0;

    //19

    forall (k in K)

    sum (i in V, j in V)

    Demand[i] * X[i][j][k] <= Capacity[k];

    //21 -24

    forall(k in K)

    sum (j in V)

    X[1][j][k] <= 1;

    //Subtour elimination

    forall (k in K, i in 1..n, j in 1..n: i!=j)

    u[i] - u[j] + n*X[i][j][k] <= n-1;

    }






    #DecisionOptimization
    #Support
    #SupportMigration


  • 2.  RE: Single Depot Vehicle Routing Problem

    Posted Fri June 18, 2021 11:58 AM

    This is the dat file I am using.

    V = {1, 2, 3, 4}; //set of all nodes

    K = {1, 2}; // set of trucks

    n= 4;

    Distance = [

    [0, 15, 10, 30],

    [15, 0, 24, 23],

    [10, 24, 0, 36],

    [30, 23, 36, 0]

    ];

    Capacity = [100, 120]; // capacity of vehicle k

    Demand = [0, 30, 50, 40]; // demand for product of customer i






    #DecisionOptimization
    #Support
    #SupportMigration


  • 3.  RE: Single Depot Vehicle Routing Problem

    Posted Fri June 18, 2021 10:06 PM

    If you are expecting a different objective, add a constraint to reflect your expectation and see whether the model is still feasible. If the model becomes infeasible, conflict refiner should tell you which constraints are conflicting with your expectation.






    #DecisionOptimization
    #Support
    #SupportMigration