Package org.jacop.examples.fd
Class TSP
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.TSP
-
public class TSP extends ExampleFD
It models Travelling Salesman Problem (TSP).- Version:
- 4.8
-
-
Constructor Summary
Constructors Constructor Description TSP()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
It executes the program to solve this Travelling Salesman Problem.void
model()
It specifies a standard way of modeling the problem.boolean
searchMaxRegretForMatrixOptimal()
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 Detail
-
varsMatrix
IntVar[][] varsMatrix
-
-
Method Detail
-
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
public static void main(java.lang.String[] args)
It executes the program to solve this Travelling Salesman Problem.- Parameters:
args
- no argument is used.
-
-