|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.example.csp.Test
public class Test
Test of Structured CSP problems. It takes one argument -- property file with all the parameters.
It allows to execute given number of tests. It also allows to define several configurations which will be executed. For instance CSP(20,15,5%..95%,5..95%), 10 runs of each configuration. All such configuration are processed in one run of Test class.
In Structured CSP, variables are divided into several kernels (some variables may remain ouside kernels).
Different constraints (in density and tightnes) are generated according to whether variables are from the same kernel or not.
Test's parameters:
Parameter | Type | Comment |
---|---|---|
General.MPP | String | Minimal perturbation problem (if true), this mj. means that initial assignment will be generated |
CSP.Seed | Long | Random number generator seed, System.currentTimeMillis() is taken if not present |
CSP.ForceSolutionExistance | Boolean | If true, generated problem will always have at least one feasible solution |
CPS.NrTests | Integer | Number of tests (for each input configuration) |
CSP.NrVariables | Integer | Number of variables |
CSP.NrVariablesMin CSP.NrVariablesMax CSP.NrVariablesStep | Integer | Range of the number variables (a set of different configurations will be generated) Use either CSP.NrVariables or these CSP.NrVariablesMin, CSP.NrVariablesMax, CSP.NrVariablesStep |
CSP.DomainSize | Integer | Number of values of every variable |
CSP.DomainSizeRatio | Double | Number of values as a ration of the number of variables. This way we can model for instance CSP(N,2N,p1,p2) problems with one configuration. Use either CSP.DomainSize or CSP.DomainSizeRatio |
CSP.Tightness | Double | Tightness of constraints outside kernels |
CSP.TightnessMin CSP.TightnessMax CSP.TightnessStep | Double | Tightness of constraints outside kernels given as a range -> respective configurations will be generated and tested |
CSP.Density | Double | Density of constraints outside kernels |
CSP.DensityMin CSP.DensityMax CSP.DensityStep | Double | Density of constraints outside kernels given as a range -> respective configurations will be generated and tested |
CSP.NrKernels | Integer | Number of kernels (Structured CSP, use 0 for "normal" CSP) |
CSP.KernelSize | Integer | Number of variables in each kernel |
CSP.KernelTightness | Double | Tightness of constraints inside a kernel |
CSP.KernelDensity | Double | Density of constraints inside a kernel |
CSP.SameProblemEachStep | Boolean | If true, each configuration will start with the same seed |
CSP.SameProblemEachTest | Boolean | If true, each test of the same configuration will start with the same seed |
General.Output | String | Output folder where a log file and tables with results. In order not to overwrite the results if executed more than once, a subfolder with the name taken from current date and time will be created in this folder and all results will go to this subfolder. |
INCLUDE_REGEXP=general.ini;{CSP(50,12,250,p2)|CSP(25,15,198,p2)}.ini;{std|opt}.ini;{10x1min}.ini;{cbs|rw1|tabu20}.ini
#Default settings common for all configurations
General.MPP=false
General.InitialAssignment=false
General.Output=output\\RandomCSP\\IFS
#Value selection heuristics
Value.Class=net.sf.cpsolver.ifs.heuristics.GeneralValueSelection
Value.WeightWeightedConflicts=0.0
Value.RandomWalkProb=0.0
Value.WeightConflicts=1.0
Value.WeightNrAssignments=0.0
Value.WeightValue=0.0
Value.Tabu=0
#Variable selection heuristics
Variable.Class=net.sf.cpsolver.ifs.heuristics.GeneralVariableSelection
Variable.RandomSelection=true
#Termination condition
Termination.Class=net.sf.cpsolver.ifs.termination.GeneralTerminationCondition
Termination.MaxIters=-1
Termination.TimeOut=-1
Termination.StopWhenComplete=true
#Solution comparator
Comparator.Class=net.sf.cpsolver.ifs.solution.GeneralSolutionComparator
#Sparse problem CSP(50,12,250/1225,p2)
CSP.NrVariables=50
CSP.DomainSize=12
CSP.Density=0.2
CSP.TightnessMin=0.10
CSP.TightnessMax=0.95
CSP.TightnessStep=0.02
CSP.Seed=780921
CSP.ForceSolutionExistance=false
CSP.SameProblemEachStep=false
CSP.SameProblemEachTest=false
CSP.NrKernels=0
#Standard problem
CSP.ForceSolutionExistance=false
#Optimization problem (minCSP)
#Value selection: use weigh of a conflict, but when there are more than one value
# with the same number of conflicts, use the one with lower value
Value.WeightValue=0.0001
Value.WeightConflicts=1.0
#Do not stop when a complete solution is found
Termination.StopWhenComplete=false
#For each configuration, execute 10 tests, each with 1 minute timeout
CPS.NrTests=10
Termination.TimeOut=60
#Use conflict-based statistics
Extensions.Classes=net.sf.cpsolver.ifs.extension.ConflictStatistics
Value.WeightWeightedConflicts=1.0
#Use tabu-list of the length 20
Value.Tabu=20
#Use 1% random walk selection
Value.RandomWalkProb=0.01
StructuredCSPModel
,
ConflictStatistics
,
GeneralValueSelection
,
GeneralVariableSelection
,
GeneralTerminationCondition
,
GeneralSolutionComparator
Constructor Summary | |
---|---|
Test()
|
Method Summary | |
---|---|
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Test()
Method Detail |
---|
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |