Update cvrptw_ployt.py
Fix np.size(capacity) check in Vehicle class constructor to compare it with self.number (not itself)
This commit is contained in:
@@ -382,7 +382,7 @@ class Vehicles():
|
||||
|
||||
if np.isscalar(capacity):
|
||||
capacities = capacity * np.ones_like(idxs)
|
||||
elif np.size(capacity) != np.size(capacity):
|
||||
elif np.size(capacity) != self.number:
|
||||
print('capacity is neither scalar, nor the same size as num!')
|
||||
else:
|
||||
capacities = capacity
|
||||
|
||||
Reference in New Issue
Block a user