public interface ITrafficGenerator
Contract that must be fulfilled such that a traffic generator can be run
in the Time-varying traffic simulator
included within Net2Plan
.
Important: Contrary to the other simulation models, in this type of simulation events are scheduled in a period fashion by the kernel, and the generator is in charge of return only the new traffic volume for each demand.
Modifier and Type | Method and Description |
---|---|
double[] |
execute(NetPlan netPlan,
Calendar currentDate)
Processes a new event.
|
String |
getDescription()
Returns the description.
|
List<Triple<String,String,String>> |
getParameters()
Returns the list of required parameters, where the first item of each element is the parameter name, the second one is the parameter value, and the third one is the parameter description.
|
void |
initialize(NetPlan netPlan,
Map<String,String> algorithmParameters,
Map<String,String> net2planParameters)
Initializes the traffic generator (i.e. reading input parameters)
|
double[] execute(NetPlan netPlan, Calendar currentDate)
netPlan
- Current network design (including traffic demands)currentDate
- Current dateString getDescription()
List<Triple<String,String,String>> getParameters()
void initialize(NetPlan netPlan, Map<String,String> algorithmParameters, Map<String,String> net2planParameters)
netPlan
- Complete network design (including traffic demands)algorithmParameters
- A key-value map with specific algorithm parameters.net2planParameters
- A key-value map with Net2Plan
-wide configuration options