Kuifje02/vrpy

Example of CVRP Distribution and Collection: node load clarification

rioaurachman opened this issue · 6 comments

Hello, Thank you for this good python library

I did the example of CVRP Distribution and Collection
like in this link https://github.com/Kuifje02/vrpy/blob/master/examples/cvrpsdc.py

and then it give this solution

print(prob.node_load):

{1: {7: 4, 'Sink': 4}, 2: {1: 0, 4: 3, 3: 4, 15: 11, 11: 9, 12: 9, 'Sink': 9}, 3: {8: 7, 6: 10, 2: 10, 5: 10, 'Sink': 10}, 4: {13: 0, 14: 2, 16: 8, 10: 8, 9: 8, 'Sink': 8}}

especially i evaluate the 3rd vehicle
3: {8: 7, 6: 10, 2: 10, 5: 10, 'Sink': 10},

But i think this is not the node load. I think this number is the acummulation load

ilustrasi VRPY CVRP DC

I think the load of node will be 8,5,5,5 (load in the vehicle in each node, that will show us wether capacity not exceeded)

I create a video to tell my idea
https://youtu.be/EXN5HWE6crQ

Thank you very much, your work in this library is very great

Thank you for your feedback. You are correct, in the context of simultaneous distribution and collection, the node load is the accumulated load. Since vehicles can load and/or unload, the node load can either decrease or increase.

oh ok. Is there any command or method to show the load on vehicle in every node?

thank you very much

Hmm, you have a good point. I think the method is missing, and it is indeed an important one. I will look into it.

As a first approach, I am pretty sure that the actual node load equals the vehicle capacity, minus the accumulated load. In the above example:

  • vehicle capacity = 15
  • accumulated load = [7, 10, 10, 10]
  • load (as per your computations) = [8, 5, 5, 5]

We have 15-7 = 8, 15-10 = 5.

There is mapping between the load and the accumulated load. If the accumulated load satisfies capacity constraints, then necessarily the actual load is also feasible.

Ok thank you very much

reopening to add test and for clarification