0

Hello and thank you for your time! (English is not my first language, so I hope for your understanding)

I have a problem with modeling the following VRP in IBM ILOG CPLEX:

  1. There is a finite park of wagons (about 1300 units) and a certain number of orders (about 2500).
  2. Each order has its own time window, and time to complete, and income from completing.
  3. Each wagon can complete >= 0 orders.
  4. Some orders may remain uncompleted.
  5. Empty transitions (from order to order) has the time to complete and the cost of the transition.
  6. Some empty transitions are banned (e.g., from order's loading point to order's 5 point)
  7. Some wagons can't fulfill some orders.

Objective -> maximize revenue (income from completed orders - cost of empty transitons)

I have solved this problem for 1-6 conditions, but I can't handle condition 7.

Both: CP and CPLEX engines are allowed to use.

Below I attach an example of the source data with comments.

I will be happy to get full model, or example of such a model, or any advices and references, Thank you in advance!

P.S. You are welcome to change data structure and names. It's also possible to have groups of wagons, which are not allowed for the certain order, instead of having a matrix for each pair.

// number of wagons
wagons = 3;

// number of orders
orders = 4;

// income of each order
orderIncome = [20000 10000 20000 2500];

// duration of each order
orderDuration = [55 70 65 110];

// end of time window for each order
orderWindowEnd = [100 250 100 300];

// matrix of size (orders x wagons), where 0 means wagon j can NOT take order i
WagonToOrderBan =  [
    [0 1 1]
    [0 1 0]
    [1 0 1]
    [1 1 0]
 ];

// matrix of size (orders x orders ), where 0 means empty transition between
// order i to order j is NOT allowed
OrderToOrderBan = [
    [1 1 1 0]
    [1 0 1 1]
    [1 1 0 1]
    [1 1 1 1]
];


// transition from order to order cost
emptyRate = [
    [550 1100 1100 300]
    [550 1150 500 900]
    [1200 600 800 350]
    [1200 600 750 300]
    [840 1200 200 350]
];

//  длительность порожнего рейса
emptyDuration= [
    [55 110 115 30 195]
    [55 115 50  95 160]
    [120 60 85 185 35]
];
eightlay
  • 423
  • 2
  • 9

1 Answers1

0

You say that you can't model constraint 7 but it does not seem the most difficult to formulate. What is your model for constraints 1 to 6? If you want to use CP Optimizer scheduling modeling (if the number of wagons and order is not too high), you could look at the OPL sched_setup.mod example (not a routing but a scheduling problem on machines=wagons with setup times and forbidden transitions) … But if orders can be fulfilled by several wagons this completely changes the problem. You could also have a look at sched_trolley2 for an example of a trolley used to transport items (in the context of a workshop). And also, if each wagon will perform only a few moves (2 or 3, the ratio of orders on wagons is 2500/1300), maybe a better model can be to decide, from the point of view of the wagons, what are the 2 or 3 orders that are served … Cheers,

  • Thank you for answer! I can easily model this whole problem for small amount of wagons / orders by creating dvar int tensor of size [wagons][orders][orders]. But 125 RAM is not enough when it comes to real problem with 2500/1300 orders/wagons. Also thank you for references (but i couldn't find sched_trolley2). Your last suggestion is interesting, but currently I can't see the path to model this :( – eightlay Feb 17 '21 at 09:22