I saw online that you can write a traveling salesman problem as a linear expression and compute it using software like CPLEX for java.
I have 1000 cities and need to find a short distance. I plan to split these 1000 cities into clusters of 100 cities and run a linear programming algorithm on these individual clusters.
The question I have is how exactly do I represent this as a linear expression.
So, I have 100 cities, and I'm sure everyone knows how TSP works.
I literally don't know how I can write linear constraints, goals, and variables that satisfy the TSP.
Can someone explain to me how this is done, or send me a link that clearly explains this, because I understand a lot and can not find anything.
EDIT:
A bit of additional information I found:
We put cities with numbers from 0 to n and define a matrix:

Will this give the following matrix for 5 cities?

Limitations:
i) Each city must come from one other city
ii) From each city, fly to the same city
iii) The route is not divided into separate islands.
Again, this makes all the sense to me, but it's still hard for me to write these constraints as a linear expression. Apparently, this is a fairly simple matrix.
Thanks for any help!