# Solving a TSP using lazy constraints

## Exploring the differences between the AIMMS WebUI and WinUI through a series of examples

• Dear Marcel,
now I got it with the subtour elimination constraints. The CVRP example was very helpful. But now two errors are shown to my and I don’t know how to solve this problems. The errors are:
1. The element ‘0’ in set “Kminus_i_gleich0” is not in its range set “Set_of_all_nodes”.
2. The element ‘0’ in set “Set_of_all_nodes_i_gleich0” is not in its range set “Set_of_all_nodes”.

But I defined the Set_of_all_nodes like that:
Definition:ElementRange(0,Numberofcars)
where Numberofcars is a Parameter
I defined Kminus_i_gleich0 like that:
Subset of Set_of_all_nodes
Definition::ElementRange(0,0)
I defined Set_of_all_nodes_i_gleich0 like that:
Subset of Set_of_all_nodes
Definition::ElementRange(0,0)

So I don’t understand why 0 isn’t in the range of Subset_of_all_nodes although I defined it like that. Thank you a lot in advance for your help!
Best regards,
Mareike

• I am not sure what is going on; to find out I would need your project. It seems that the sets Kminus_i_gleich0 and Set_of_all_nodes_i_gleich0 only contain one element, namely 0. Instead of that set you can also represent that element directly, e.g. x(‘0’), or use an element parameter.