Implement the Travelling salesman problem
Show older comments
Hey
I would like to implement the branch and bound algorithm to solve the TSP. For achieving this task I found good inputs at this website: https://ch.mathworks.com/help/optim/examples/travelling-salesman-problem.html
Attached you can find my script. At the moment I get following error message:
>> TSP Error using optim.problemdef.OptimizationProblem/solve options is not a valid solver. Use 'linprog' or 'intlinprog' instead.
Error in TSP (line 71) tspsol = solve(tsp,'options',opts)
Could someone help me to solve this problem? I don't know where is the fault. I have also an additional question. Is my script working with the branch and bound algorithm? I would guess so because the scripts contains constraints and subconstraints. But I'm not sure...
Best
3 Comments
John D'Errico
on 31 Mar 2018
What version of MATLAB do you have? I would conjecture that you are using an older MATLAB release, that is too old to support what you tried to do.
Stefan Zeiter
on 31 Mar 2018
Stefan Zeiter
on 31 Mar 2018
Accepted Answer
More Answers (1)
Alan Weiss
on 2 Apr 2018
0 votes
From the example that you mentioned click the "Try this example" button in MATLAB (not in your browser). This will take your MATLAB to the appropriate folder, containing the updateSalesmanPlot function, so MATLAB can find it.
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Nearest Neighbors in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!