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 TypeFieldDescriptionintIt specifies the size of chessboard to be used in the model. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidIt executes different models and search methods to solve Queens problem.voidmodel()It specifies a standard way of modeling the problem.voidThis model uses only primitive constraints.voidThis model uses dual model to solve Queens problems.static voidIt 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:ExampleFDIt 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.
-