Hi dear community,
I’m trying to add this subtour elimination constraint into my AIMMS project.
sum( (k,l) | k<>l and k in SubsetofLocations and l in SubsetofLocations, y(b,k,l)) <= |SubsetofLocations| - 1
where y(b,k,l) = 1 indicating the picker will go from location k to location l while picking items in batch b.
My questions are:
- How can I generate all of the subsets that are required to be used here? I checked the TSP example on AIMMS website and it seems like these subsets are generated automatically? If it’s not, how should I set it up?
- How can I get the number of locations in a subset(the |SubsetofLocations|) when it is generated everytime?
- I want to add this as a lazy constraint with the callback function. But I’ve been quite lost about how to set it up. I know how to add it in the MainExecution (I just followed the TSP example) but I’m not quite sure about what else will I need. Should I just ignore the entire “Declaration Network” part(since I don’t need to show the routes) and copy the “CB_Lazy(ThisSession)” , “DetermineSubtours(ThisSession)”, “ResetCase” into my project?
I’m quite new to AIMMS so any help will be appreciated!