public class Test extends Object
RPPModel
.
objects([
object(
name( rect1 ),
size( [ 2, 1 ] ),
valid_positions( [ 0-38, 0-13 ] )
),
object(
name( rect2 ),
size( [ 2, 1 ] ),
valid_positions( [ 0-38, 0-13 ] )
),
...
object(
name( rect200 ),
size( [ 2, 1 ] ),
valid_positions( [ 0-38, 7-13 ] )
)
] ).
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.
assigned([[rect1X,[17]], [rect1Y,[5]], [rect2X,[24]], [rect2Y,[4]], ... [rect200X,[37]], [rect200Y,[10]]]).
Which means that the first rectangle (named rect1) is to be placed at [17,5],
second at [24,4] and so on.
perturbation( 1, 0, [] ).
perturbation( 2, 0, [] ).
...
perturbation( 1, 2, [44,127] ).
perturbation( 2, 2, [80,153] ).
...
perturbation( 1, 4, [44,80,127,153] ).
perturbation( 2, 4, [48,67,138,170] ).
...
Stating that for instance in the first test with 4 perturbations the
rectangles rect44, rect80, rect127 and rect153 will have their initial value
prohibited. 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 |
Rpp.Min Rpp.Max Rpp.Step |
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. |
Rpp.Min Rpp.Max |
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. |
Rpp.ProblemWidth Rpp.ProblemHeight |
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. |
INCLUDE_REGEXP=general.ini;{rpp85|rpp90|rpp95|mpp22}.ini;{5min}.ini;{cbs|rw1|tabu20}.ini
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:
${General.Output}\rpp85_5min_csb\25-Feb-05_191136If 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.
#Default settings common for all configurations
General.MPP=false
General.InitialAssignment=false
General.Output=output\\RPP\\IFS
#Value selection heuristics
Value.Class=org.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=org.cpsolver.ifs.heuristics.GeneralVariableSelection
Variable.RandomSelection=true
#Termination condition
Termination.Class=org.cpsolver.ifs.termination.GeneralTerminationCondition
Termination.MaxIters=-1
Termination.TimeOut=-1
Termination.StopWhenComplete=true
#Solution comparator
Comparator.Class=org.cpsolver.ifs.solution.GeneralSolutionComparator
File rpp80.ini
#RPP instances with 200 objects and the placement area filled to 80% in average
General.Input=input\\rpp\\80
Rpp.ProblemWidth=40
Rpp.ProblemHeight=14
#Use 10 problem instances (this means problem files gen1.pl, gen2.pl,... gen10.pl will be taken), each run 10 times
Rpp.Min=1
Rpp.Max=10
Rpp.NrTests=10
File mpp22.ini
#RPP MPP instance 22 (with 200 objects and the placement area filled to 80% in average)
# files gen22.pl (input problem), gen22.solution (initial solution) and gen22.mpp (input perturbations) are to be taken
General.Input=input\\rpp-mpp\\gen22
Rpp.ProblemWidth=40
Rpp.ProblemHeight=14
# 0, 4, 8, .. 200 input perturbations to be used
Rpp.Min=0
Rpp.Max=200
Rpp.Step=4
File 5min.ini
#5 minute time limit for each run
Termination.TimeOut=300
File cbs.ini
#Use conflict-based statistics
Extensions.Classes=org.cpsolver.ifs.extension.ConflictStatistics
Value.WeightWeightedConflicts=1.0
File tabu20.ini
#Use tabu-list of the length 20
Value.Tabu=20
File rw1.ini
#Use 1% random walk selection
Value.RandomWalkProb=0.01
RPPModel
,
ConflictStatistics
,
GeneralValueSelection
,
GeneralVariableSelection
,
GeneralTerminationCondition
,
GeneralSolutionComparator
Constructor and Description |
---|
Test() |