Hey everyone,
I'm working on a vehicle routing problem (VRP) project where the routing will involve more than one company, and customers may have orders from more than one company. So, the idea would be for the companies to collaborate with each other, and the customer would receive just one delivery.
Given the larger set of available companies, I need to use in my constraints subsets that contain only the companies used for each customer. For example, if I have three companies, A, B, and C, how can I create a set with only companies A and B for customer I, another set with companies A and C for customer J, another set with only company B for customer K, and so on?
My idea was to create a binary parameter, 1 when the customer requests that company and 0 otherwise. But can I write this parameter in the set definition? I thought about using if and else, but I'm having trouble because the parameter depends on two variables (customer and company) and the company set only on one (company).
I'm counting on your help and am available for any questions.
Thank you!