net.sf.cpsolver.ifs.example.csp
Class Test

java.lang.Object
  extended by net.sf.cpsolver.ifs.example.csp.Test

public class Test
extends Object

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.


Also, the configuration file can consist only from one parameter (named INCLUDE_REGEXP) which is processed as a regular expression of semicolon separated list of property files, for instance where {a|b|c|...} means a selection of a, b, c, .. All possible combinations are taken and for each of them an input configuration is combined from the relevant files. So, for instance, the above example will result into the following configurations: To be able to distinguish such configuration a subfolder in General.Output folder is created, its name is combined from the names which are in parenthesis. So, for instance the first bunch of tests will output into the folder: If one parameter is defined in more than one configuration files (e.g. in general.ini as well as cbs.ini) the one from the file more on the right is taken.

An example of the configurations:
File general.ini
File CSP(50,12,250,p2).ini
File std.ini
File opt.ini
File 10x1min.ini
File cbs.ini
File tabu20.ini
File rw1.ini

Version:
IFS 1.2 (Iterative Forward Search)
Copyright (C) 2006 - 2010 Tomas Muller
muller@unitime.org
http://muller.unitime.org

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not see http://www.gnu.org/licenses/.
See Also:
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

Test

public Test()
Method Detail

main

public static void main(String[] args)


Copyright © 2014 UniTime LLC. All Rights Reserved.