Package org.jacop.examples.fd
Class Queens
java.lang.Object
org.jacop.examples.fd.ExampleFD
org.jacop.examples.fd.Queens
It models the queens problem in different ways as well as applies
different search methods.
- Version:
- 4.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
It specifies the size of chessboard to be used in the model. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
It executes different models and search methods to solve Queens problem.void
model()
It specifies a standard way of modeling the problem.void
This model uses only primitive constraints.void
This model uses dual model to solve Queens problems.static void
It executes different models and search methods to solve Queens problem.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
-
numberQ
public int numberQIt specifies the size of chessboard to be used in the model.
-
-
Constructor Details
-
Queens
public Queens()
-
-
Method Details
-
modelBasic
public void modelBasic()This model uses only primitive constraints. -
modelChanneling
public void modelChanneling()This model uses dual model to solve Queens problems. -
model
public void model()Description copied from class:ExampleFD
It specifies a standard way of modeling the problem. -
main
It executes different models and search methods to solve Queens problem.- Parameters:
args
- first argument specifies the size of the chessboard.
-
test
It executes different models and search methods to solve Queens problem.- Parameters:
args
- first argument specifies the size of the chessboard.
-