|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--anthill.antsim.impl.RangeExperiment
Class RangeExperiment
is a simple implementation of
Experiment
which repeat the execution of a single
scenario a certain number of times and returns a single
Stats object containing a summary of the statistics for all the
executions.
Field Summary | |
protected boolean |
debug
If true, methods for the analysis of experiment footprint are invoked |
protected Factory |
factory
Factory used to instantiate objects |
protected int |
iterations
Number of times a scenario is evaluated |
protected int |
maxvalue
|
protected int |
minvalue
|
protected java.lang.String |
name
|
static java.lang.String |
ROUND_NUMBER_ID
The identifier of the counter used in a Stats object to
count the number of repetitions of the scenario evaluation in a
experiment. |
protected Scenario |
scenario
Scenario on which evaluate the experiment |
protected int |
scenarioVersion
Version identifier of the scenario; when init params change, the version increase |
protected int |
step
|
Constructor Summary | |
RangeExperiment(Factory factory,
java.lang.String name,
int minvalue,
int maxvalue,
int step)
Instantiates a new experiment by setting the given number of times by which a scenario has to be evaluated. |
|
RangeExperiment(Factory factory,
java.lang.String name,
int minvalue,
int maxvalue,
int step,
int iterations)
Instantiates a new experiment by setting the given number of times by which a scenario has to be evaluated. |
|
RangeExperiment(Factory factory,
java.lang.String name,
int minvalue,
int maxvalue,
int step,
int iterations,
boolean debug)
Instantiates a new experiment by setting the given number of times by which a scenario has to be evaluated. |
Method Summary | |
void |
clear()
Restores the object to its initial state. |
Stats[] |
evaluate()
Perform the evaluation of the current ant algorithm. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ROUND_NUMBER_ID
Stats
object to
count the number of repetitions of the scenario evaluation in a
experiment.protected Factory factory
protected java.lang.String name
protected int maxvalue
protected int minvalue
protected int step
protected int iterations
protected boolean debug
protected Scenario scenario
protected int scenarioVersion
Constructor Detail |
public RangeExperiment(Factory factory, java.lang.String name, int minvalue, int maxvalue, int step)
factory
- the factory to be used to create scenarios
FIXME Comment argument namespublic RangeExperiment(Factory factory, java.lang.String name, int minvalue, int maxvalue, int step, int iterations)
factory
- the factory to be used to create scenarios
FIXME Comment argument namespublic RangeExperiment(Factory factory, java.lang.String name, int minvalue, int maxvalue, int step, int iterations, boolean debug)
factory
- the factory to be used to create scenarios
FIXME Comment argument namesMethod Detail |
public Stats[] evaluate()
Stats
array containing the statistics collected during the
simulation.
In this implementation, a single Stats
object is created
and is used to collect statistics for all scenario executions
performed by this Experiment
.
evaluate
in interface Experiment
public void clear()
clear
in interface Clearable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |