Package org.jacop.examples.fd
Class TSP
java.lang.Object
org.jacop.examples.fd.ExampleFD
org.jacop.examples.fd.TSP
It models Travelling Salesman Problem (TSP).
- Version:
- 4.8
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
It executes the program to solve this Travelling Salesman Problem.void
model()
It specifies a standard way of modeling the problem.boolean
It uses MaxRegret variable ordering heuristic to search for a solution.Methods inherited from class org.jacop.examples.fd.ExampleFD
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
-
Field Details
-
varsMatrix
IntVar[][] varsMatrix
-
-
Constructor Details
-
TSP
public TSP()
-
-
Method Details
-
model
public void model()Description copied from class:ExampleFD
It specifies a standard way of modeling the problem. -
searchMaxRegretForMatrixOptimal
public boolean searchMaxRegretForMatrixOptimal()It uses MaxRegret variable ordering heuristic to search for a solution.- Returns:
- true if there is a solution, false otherwise.
-
main
It executes the program to solve this Travelling Salesman Problem.- Parameters:
args
- no argument is used.
-