|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--antsim.impl.ScenarioImpl
Class ScenarioImpl
is a simple implementation of
interface Scenario
in which a predefined set of
resources is inserted in the network and then a certain number
of requests are performed and simulate. Initial resources are
generated and distributed in the network using a
ResourceGenerator
object; at runtime, requests
are generated using a RequestGenerator
object.
Field Summary | |
protected ScenarioAnalyzer |
analyzer
Scenario analyzer used to display information about the behavior of the ant algorithm. |
protected Factory |
factory
Factory used to instantiate objects |
protected int |
finalRounds
Final rounds to be performed; during this phase, requests are not generated and statistics are computed |
protected int |
initRounds
Initialization rounds to be performed; during this phase, requests are generated and statistics are not computed |
protected ResponseMonitor |
monitor
Response monitor to evaluate response time |
static String |
PAR_FINALROUNDS
String name of the parameter used to determine |
static String |
PAR_INITROUNDS
String name of the parameter used to determine |
static String |
PAR_REGULARROUNDS
String name of the parameter used to determine |
protected Peernet |
peernet
Peernet on which the genetic code will be evaluated |
protected int |
regularRounds
Regular rounds to be performed; during this phase, requests are generated and statistics are computed |
protected RequestGenerator |
requestGenerator
Request generator used to generate run-time requests |
protected ResourceDistribution |
resourceDistribution
Resource distribution used to distribute initial resources |
protected ResourceSet |
resourceSet
Set containing the initial resources |
protected Stats |
stats
Stats |
Fields inherited from interface antsim.Scenario |
NAME |
Constructor Summary | |
ScenarioImpl(Factory factory,
String name)
Instantiates a new ScenarioImpl. |
Method Summary | |
void |
analyze(Stats stats)
Analyze the scenario object by displaying information about it. |
void |
clear()
Restores the object to its initial state. |
void |
evaluate()
Perform the evaluation of this scenario object by simulating it. |
void |
setStats(Stats stats)
Set the statistics object which will be used throughout the scenario evaluation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PAR_INITROUNDS
public static final String PAR_REGULARROUNDS
public static final String PAR_FINALROUNDS
protected int initRounds
protected int regularRounds
protected int finalRounds
protected Factory factory
protected Stats stats
protected Peernet peernet
protected ResourceSet resourceSet
protected ResourceDistribution resourceDistribution
protected RequestGenerator requestGenerator
protected ResponseMonitor monitor
protected ScenarioAnalyzer analyzer
Constructor Detail |
public ScenarioImpl(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 void setStats(Stats stats)
setStats
in interface Scenario
stats
- the object used to collect statisticspublic void evaluate()
run()
method
is executed. Statistics about the simulated execution of the
code are collected in the Stats
object specified
through method setStats()
.
evaluate
in interface Scenario
public void analyze(Stats stats)
ScenarioAnalyzer
.
analyze
in interface Scenario
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |