What should I do if after calling extract_random_route
, a Depot gets empty?
#3
Labels
question
Further information is requested
extract_random_route
, a Depot gets empty?
#3
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 theDepot
will no longer have anyCustomer
s in it to construct a route, actually, theDepot
will be an empty object.What is the instruction to deal with this situation?
Possible behaviours:
Depot
itself, it means we are not using one of the providedDepot
s 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 newDepot
would be a new challenge for assigning new routes to a non-existanceDepot
.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 theDepot
would be much easier so I think this option is much better to be considered. [PREFERED]The text was updated successfully, but these errors were encountered: