|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antsim.impl.ExperimentImpl
This class contains a simple implementatin of the Experiment interface, that can be used to quickly test the behavior of an ant species by repeating the scenario a certain number of times. When evaluated, returns an array of statistics objects; each element of the array contains the statistics related to one repetition.
Field Summary | |
protected Factory |
factory
Factory object used to read configuration parameters and classes |
protected boolean |
footprint
If true, methods for the analysis of experiment footprint are invoked |
static String |
PAR_ITERATIONS
String name of the parameter used to determine the number of iterations to be executed. |
static String |
PAR_REPETITIONS
String name of the parameter used to determine the number of repetitions to be executed. |
static String |
PROP_FOOTPRINT
String name of the Java property used to determine whether the the analyisis of the footprint is activated. |
protected int |
repetitions
Number of repetions of this experiment. |
protected Scenario |
scenario
Scenario on which evaluate the experiment |
Fields inherited from interface antsim.Experiment |
NAME |
Constructor Summary | |
ExperimentImpl(Factory factory,
String name)
Instantiates a new time experiment. |
Method Summary | |
void |
clear()
Restores the object to its initial state. |
Object |
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 String PROP_FOOTPRINT
public static final String PAR_REPETITIONS
public static final String PAR_ITERATIONS
protected int repetitions
protected boolean footprint
protected Factory factory
protected Scenario scenario
Constructor Detail |
public ExperimentImpl(Factory factory, String name)
factory
- the factory to be used to read configuration arguments
and to create other configurable objectsname
- the name that is associated to this instance in the
configuration fileMethod Detail |
public void clear()
clear
in interface Clearable
public Object 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |