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 |
---|---|
java.lang.String |
finish(java.lang.StringBuilder output,
java.util.Calendar finishDate)
Returns an algorithm-specific report.
|
void |
finishTransitory(java.util.Calendar currentDate)
Performs some transitory-finished action.
|
java.lang.String |
getDescription()
Returns the description.
|
java.util.List<Triple<java.lang.String,java.lang.String,java.lang.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,
TimeVaryingNetState netState,
java.util.Map<java.lang.String,java.lang.String> algorithmParameters,
java.util.Map<java.lang.String,java.lang.String> net2planParameters)
Initializes the allocation algorithm (i.e. reading input parameters).
|
java.util.List<TrafficAllocationAction> |
processEvent(NetPlan netPlan,
TimeVaryingNetState netState,
double[] h_d,
java.util.Calendar currentDate)
Processes a new event.
|
java.util.List<TrafficAllocationAction> processEvent(NetPlan netPlan, TimeVaryingNetState netState, double[] h_d, java.util.Calendar currentDate)
netPlan
- Network plannetState
- Current network stateh_d
- New traffic demand volumescurrentDate
- Current datevoid initialize(NetPlan netPlan, TimeVaryingNetState netState, java.util.Map<java.lang.String,java.lang.String> algorithmParameters, java.util.Map<java.lang.String,java.lang.String> net2planParameters)
netPlan
- Network plannetState
- Current network statealgorithmParameters
- A key-value map with specific algorithm parameters.net2planParameters
- A key-value map with Net2Plan
-wide configuration optionsjava.lang.String finish(java.lang.StringBuilder output, java.util.Calendar finishDate)
output
- Container for the reportfinishDate
- Current timenull
, or an empty output
to omit it)void finishTransitory(java.util.Calendar currentDate)
currentDate
- Current datajava.lang.String getDescription()
java.util.List<Triple<java.lang.String,java.lang.String,java.lang.String>> getParameters()