well this seems to be an issue...
"demand_evaluator" returns a positive integer at each pickup location (aka loading) and a negative integer at each delivery location. " --- what is the simplest way to make this logic?
if I have a demand pickup list like:
data["demand"] = [6, 2, 5, 9]
should I also make a demand delivery list like:
data["delivery"] = [-6, -2, -5, -9]
I should then combine them in an appropriate order according to each location's index.
if pickups_deliveries relationship is like this:
data['pickups_deliveries'] = [
[1, 8],
[2, 7],
[3, 5],
[4, 6],
]
then the dmand_evaluator returns data based on this list (aka pickup_delivery_list):
[6, 2, 5, 9, -5, -9, -2, -6]
def demand_evaluator(self, from_index):
"""Returns the demand of the current node"""
from_node = self._manager.IndexToNode(from_index)
return self.
pickup_delivery_list [from_node]
would this be ok? is there easier/simpler approach to do so? many thanks