Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should I do if after calling extract_random_route, a Depot gets empty? #3

Open
Nikronic opened this issue Sep 25, 2019 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@Nikronic
Copy link
Owner

Nikronic commented Sep 25, 2019

The utils.functional.extract_random_route method looks for a random route then remove it and return the removed random route.

Now if a Depot has only one route, after calling this method, the route will be removed and the Depot will no longer have any Customers in it to construct a route, actually, the Depot will be an empty object.

What is the instruction to deal with this situation?

Possible behaviours:

  1. If we remove Depot itself, it means we are not using one of the provided Depots in the dataset or problem itself which means we will use less routes (less vehicles). It seems good but does not mean efficient. Note that creating a new Depot would be a new challenge for assigning new routes to a non-existance Depot.
  2. Having a empty Depot won't cost us anything in term of number of routes (vehicles) or the maximum capacity restriction. By the way, adding new routes to the Depot would be much easier so I think this option is much better to be considered. [PREFERED]
@Nikronic Nikronic added the question Further information is requested label Sep 25, 2019
@Nikronic Nikronic self-assigned this Sep 25, 2019
@Nikronic
Copy link
Owner Author

It seems no need to do anything, because insert method will update it and even in the process of cross_over, we may introduce similar situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant