Class Test

  extended by net.sf.cpsolver.ifs.example.rpp.Test

public class Test
extends Object

RPP test. It takes one argument -- property file with all the parameters. It allows to execute given number of tests. The problem is loaded from prolog-based text files. For description of RPP problem see RPPModel.

Description of the input problem files can be found at Each input problem (e.g., has the following structure:

Stating that the first rectangle (named rect1) has size 2x1 and its valid position are with x between 0 and 38, y between 0 and 13, and so on.
MPP instances contain an extra file with the solution (e.g., gen22.solution), with the following structure Which means that the first rectangle (named rect1) is to be placed at [17,5], second at [24,4] and so on.
There is also a file (e.g., gen22.mpp) describing which input placements are to be prohibited (not that if the input placement is prohibited, it means that also all values with the same X or Y coordinate are prohibited). It has the following structure: Stating that for instance in the first test with 4 perturbations the rectangles rect44, rect80, rect127 and rect153 will have their initial value prohibited.

Test's parameters:
Parameter Type Comment
General.MPP String Minimal perturbation problem (if true), this mj. means that initial assignment will be generated
RPP.NrTests Integer Number of tests to be executed for each input instance
Integer In case of MPP: minimal, maximal number and increment of input perturbations. An instance is loaded and tested for each given number of input perturbations.
Integer In case of initial problem: minimal and maximal number of the input problem. An instance is loaded and tested for each given number from RPP.Min to RPP.Max.
Integer Width and height of the placement area.
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 rpp80.ini
File mpp22.ini
File 5min.ini
File cbs.ini
File tabu20.ini
File rw1.ini

IFS 1.2 (Iterative Forward Search)
Copyright (C) 2006 - 2010 Tomáš Müller

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
See Also:
RPPModel, ConflictStatistics, GeneralValueSelection, GeneralVariableSelection, GeneralTerminationCondition, GeneralSolutionComparator

Constructor Summary
Method Summary
static void main(String[] args)
          RPP test.
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)
RPP test.

args - the command line arguments