Closed Abdulla-mubharak closed 4 years ago
Hi @Abdulla-mubharak, sorry for my late reply (you may already solve the question by yourself?). You may possibly misunderstand the meaning of "demand" (which means my naming scheme would be bad 😅). "Demand" is actually a "load" that consumes the capacity of a vehicle. For example, if a node has 2 demands, it consumes two units of a vehicle's loading capacity when the vehicle visits the node. "Zero demand" means "there is no load that would consume the capacity of a vehicle even if it visited the node". Therefore, setting 0 demand to a node does not mean a routing engine eliminates the node from a solution, rather it means a vehicle can visit the node with no additional capacity consumption.
The simple answer to your question is just eliminate nodes you want to prevent vehicles from visiting from a problem setting in the first place. Nodes that should not be visited should be removed from the problem itself (all of weight matrix, demands and time windows) at first.
respected skatsuta,
I tried giving demand zero for all the nodes still it is mapping vehicles to those nodes how can I prevent it from mapping any vehicle to the node with 0 demand. kindly help me it will be of great help