ExamplesJaCoP
Class Queens

java.lang.Object
  extended by ExamplesJaCoP.Example
      extended by ExamplesJaCoP.Queens

public class Queens
extends Example

It models the queens problem in different ways as well as applies different search methods.

Author:
Radoslaw Szymanek

Field Summary
 int numberQ
          It specifies the size of chessboard to be used in the model.
 
Fields inherited from class ExamplesJaCoP.Example
cost, search, store, vars
 
Constructor Summary
Queens()
           
 
Method Summary
static void main(java.lang.String[] args)
          It executes different models and search methods to solve Queens problem.
 void model()
          It specifies a standard way of modeling the problem.
 void modelBasic()
          This model uses only primitive constraints.
 void modelChanneling()
          This model uses dual model to solve Queens problems.
 void modelFields()
          It uses a model based on fields to model Queens problem (rather inefficient model).
static void test(java.lang.String[] args)
          It executes different models and search methods to solve Queens problem.
 
Methods inherited from class ExamplesJaCoP.Example
creditSearch, getSearch, getSearchVariables, getStore, printMatrix, search, searchAllAtOnce, searchAllOptimal, searchLDS, searchMasterSlave, searchMaxRegretOptimal, searchMiddle, searchMostConstrainedStatic, searchOptimal, searchSmallestDomain, searchSmallestMedian, searchSmallestMiddle, searchSmallestMin, searchWeightedDegree, searchWithMaxRegret, searchWithRestarts, shavingSearch
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberQ

public int numberQ
It specifies the size of chessboard to be used in the model.

Constructor Detail

Queens

public Queens()
Method Detail

modelBasic

public void modelBasic()
This model uses only primitive constraints.


modelChanneling

public void modelChanneling()
This model uses dual model to solve Queens problems.


modelFields

public void modelFields()
It uses a model based on fields to model Queens problem (rather inefficient model).


model

public void model()
Description copied from class: Example
It specifies a standard way of modeling the problem.

Specified by:
model in class Example

main

public static void main(java.lang.String[] args)
It executes different models and search methods to solve Queens problem.

Parameters:
args - first argument specifies the size of the chessboard.

test

public static void test(java.lang.String[] args)
It executes different models and search methods to solve Queens problem.

Parameters:
args - first argument specifies the size of the chessboard.