Package org.jacop.examples.fd.qcp
Class QCP
- java.lang.Object
-
- org.jacop.examples.fd.ExampleFD
-
- org.jacop.examples.fd.qcp.QCP
-
public class QCP extends ExampleFD
It solves QuasiGroup Completion Problem (QCP).- Version:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringfilenameIt specifies the file containing the description of the problem.intnIt contains the order of the QCP being solved.java.util.List<Constraint>shavingConstraintsIt contains constraints which can be used to guide shaving.
-
Constructor Summary
Constructors Constructor Description QCP()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)It executes the program which solves the QCP in multiple different ways.voidmodel()It specifies a standard way of modeling the problem.booleansearchAllTransform()It transforms part of the problem into an extensional costraint to improve propagation and search process.booleansearchWithShaving()It performs search with shaving guided by constraints.static voidtest(java.lang.String[] args)It executes the program which solves the QCP in multiple different ways.-
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
-
filename
public java.lang.String filename
It specifies the file containing the description of the problem.
-
shavingConstraints
public java.util.List<Constraint> shavingConstraints
It contains constraints which can be used to guide shaving.
-
n
public int n
It contains the order of the QCP being solved.
-
-
Method Detail
-
model
public void model()
Description copied from class:ExampleFDIt specifies a standard way of modeling the problem.
-
searchWithShaving
public boolean searchWithShaving()
It performs search with shaving guided by constraints.- Returns:
- true if there is a solution, false otherwise.
-
searchAllTransform
public boolean searchAllTransform()
It transforms part of the problem into an extensional costraint to improve propagation and search process.- Returns:
- true if there is a solution, false otherwise.
-
test
public static void test(java.lang.String[] args)
It executes the program which solves the QCP in multiple different ways.- Parameters:
args- the first argument is the name of the file containing the problem.
-
main
public static void main(java.lang.String[] args)
It executes the program which solves the QCP in multiple different ways.- Parameters:
args- the first argument is the name of the file containing the problem.
-
-