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:
Muhammad Musa
2020-04-26 13:33:46 +05:00
committed by Mizux
parent b4e7fb507e
commit e9c76490a4

View File

@@ -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