public interface ITrafficAllocationAlgorithm
Contract that must be fulfilled such that a traffic allocation algorithm can be
run in Net2Plan
.
Given the new traffic volume for every demand, the algorithm is in charge to allocate the traffic, being able to add links, to modify their capacity, to establish new routes...
Modifier and Type | Method and Description |
---|---|
String |
finish(StringBuilder output,
Calendar finishTime)
Returns an algorithm-specific report.
|
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 allocation algorithm (i.e. reading input parameters).
|
List<TrafficAllocationAction> |
processEvent(NetPlan netPlan,
double[] h_d,
Calendar calendar)
Processes a new event.
|
List<TrafficAllocationAction> processEvent(NetPlan netPlan, double[] h_d, Calendar calendar)
netPlan
- Complete network design (including traffic demands)h_d
- New traffic demand volumescalendar
- Current datevoid 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 optionsString finish(StringBuilder output, Calendar finishTime)
output
- Container for the reportfinishTime
- Current timenull
, or an empty output
to omit it)String getDescription()
List<Triple<String,String,String>> getParameters()