|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mascoptDev.algos.networks.ApproxMinCostFlow
Provides an algorithm of approximation of fractionnal MCF by "Lagrangienne" relaxation. TIME IS OUT OF BOUND on examples of file/nfsnet.mgl and file/americain-mieux.mgl Initialize the flow with the shortest path (Bellman) in terms of the congestion cost for all requests, no constraint of capacity. while the capacity constraints isn't satisfaied, divert the flow between the most loaded paths and the least loaded paths, to use an other deviation see ApproxMinCostFlowDev. Use the congestion cost(Arc) = exp(congestion(Arc)), to use other cost see ApproxMinCostFlowStages, ApproxMinCostFlowStraight.
Field Summary | |
String |
CAPACITY_STRING_VALUE
String which is read on arc for the capacity. |
Vector |
congestion
The string which is read on a cable for the congestion. |
double |
CONGESTION_MAX
The CONGESTION_MAX represent the maximun congestionq of the network. |
Vector |
costCongestion
The string which is read on a cable for the congestion. |
static double |
EPSILON
The epsilon when diverting the flow. |
static double |
EPSILON_END
The epsilon to finish the resolution. |
Vector |
flowAllocated
The string which is read on a cable for the congestion. |
String |
INDEX
The string which is used as index on a cable. |
int |
nbArc
Number of cables |
int |
nbRequest
Number of requests |
String |
REQUEST_SIZE
The string which is read on a request for the size of request. |
int |
W
Number of wavelength per fiber. |
Constructor Summary | |
ApproxMinCostFlow(WDMNetwork n)
Constructor. |
Method Summary | |
void |
addFlow(Arc cable,
Arc request,
Double addFlow)
add flow on a cable for one request. |
int |
deCongest()
Decongest the network while the capacity constraints are satisfaying. |
void |
deCongestFlow()
Decongest the network while the capacity constraints are satisfaying. |
Double |
getCongestion(Arc a)
return the congestion of arc a |
Double |
getFlow(Arc cable,
Arc request)
Return the flow allocated at cable for request. |
Double |
getFlowAllocated(Arc a)
return the flow on arc a |
void |
printFlow()
print the flow of all arc for all requests |
void |
setCongestion(Arc a,
Double c)
set the congestion of arc a with value c |
void |
setFlow(Arc cable,
Arc request,
Double flow)
set flow on a cable for one request. |
void |
setFlowAllocated(Arc a,
Double f)
set the flow on arc a with value f |
void |
writeSolution()
Write solution on file of Network object |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Vector costCongestion
public Vector flowAllocated
public Vector congestion
public String INDEX
public String REQUEST_SIZE
public String CAPACITY_STRING_VALUE
public static double EPSILON
public static double EPSILON_END
public double CONGESTION_MAX
public int W
public int nbArc
public int nbRequest
Constructor Detail |
public ApproxMinCostFlow(WDMNetwork n)
n
- WDMNetwork
representing the network.Method Detail |
public void setFlow(Arc cable, Arc request, Double flow)
cable
- the Arc
representing the cable where change the flow.request
- the Arc
representing the request where divert the flow.flow
- the Double
representing the flow of cable for request.public Double getFlow(Arc cable, Arc request)
cable
- the Arc
representing a cable of the problem.request
- the Arc
representing a request of the problem.
public void addFlow(Arc cable, Arc request, Double addFlow)
cable
- the Arc
representing a cable of the problem.request
- the Arc
representing a request of the problem.addFlow
- the Double
representing the adding flow of cable for request.public void printFlow()
public void writeSolution()
public Double getFlowAllocated(Arc a)
a
- the Arc
representing a cable of the problem.
public void setFlowAllocated(Arc a, Double f)
a
- the Arc
representing a cable of the problem.f
- the Double
representing the Double value of the flow on apublic Double getCongestion(Arc a)
a
- the Arc
representing a cable of the problem.
public void setCongestion(Arc a, Double c)
a
- the Arc
representing a cable of the problem.c
- the Double
representing the Double value of the congestion of apublic void deCongestFlow()
public int deCongest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |