bcds.phison.sim
Class PmTraceConn<V,E>
java.lang.Object
bcds.phison.sim.PmBase<V,E>
bcds.phison.sim.PmTraceConn<V,E>
- All Implemented Interfaces:
- ProcessingModule<V,E>, WithEnvParams
public class PmTraceConn<V,E>
- extends PmBase<V,E>
The PmTraceConn module prints to System.out information
about connections as events (connection requests and releases) are
processed.
The following is printed:
- the path(s) assigned to each accepted connection. Besides the
working path, the backup path is also printed, if available.
- the rejected connection requests, if the parameter
show_conn_blocked is true.
- connection releases. If the connection was previously affected by
a failure, its failure time is printed.
- time markers, whenever an event's time is
greater than that of previous one.
- connection availability if show_conn_avail is true.
The availability computation takes into account primary and, if
assigned, also the backup path. The computation is performed through
the
NetAvail
instance exposed by the simulator.
See getEnvParams()
for the list of environment parameters of this
class.
Example: The following shows an example of what is printed
by this module when show_conn_blocked and
show_conn_avail are both true. This example assumes
that the routing algorithm in use implements one-to-one dedicated
path protection.
...
time 6
conn_request id=20 dtype=* (4->14) cap=1 wp=4-11-12-13-14 bp=4-1-2-6-8-14 A=0.999791
conn_request id=21 dtype=* (0->11) cap=4 wp=0-1-10-11 bp=0-2-1-4-11 A=0.999897
Blocked: id=22 dtype=* (13->0) cap=8 wp=null bp=null (NO_WORKING_PATH)
conn_request id=23 dtype=* (4->2) cap=7 wp=4-1-2 bp=4-11-12-10-5-2 A=0.999943
conn_request id=24 dtype=* (8->3) cap=7 wp=8-3 bp=8-7-3 A=0.999984
time 7
conn_request id=25 dtype=* (6->5) cap=5 wp=6-5 bp=6-2-5 A=0.999995
Blocked: id=26 dtype=* (13->2) cap=10 wp=null bp=null (NO_WORKING_PATH)
conn_request id=27 dtype=* (14->4) cap=1 wp=14-13-12-11-4 bp=14-8-9-10-1-4 A=0.999791
conn_release id=9
time 8
...
The tag dtype is for the demand type, cap is the requested
capacity, wp is the working path, bp is the backup
path, and A is the computed connection availability.
Method Summary |
java.lang.Object[] |
getEnvParams()
Returns the environment parameters of this class;
the prefix is "PmTraceConn.. |
void |
run(SimEvents evtype,
ConnectionInfo<V,E> rq)
Intercepts the events TIME, CONN_REQUEST and
CONN_RELEASE and generate the requested output. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PmTraceConn
public PmTraceConn()
run
public void run(SimEvents evtype,
ConnectionInfo<V,E> rq)
- Intercepts the events TIME, CONN_REQUEST and
CONN_RELEASE and generate the requested output.
The value of environment parameters are retreived in each run, that
is, they are not cached.
- Specified by:
run
in interface ProcessingModule<V,E>
- Overrides:
run
in class PmBase<V,E>
getEnvParams
public java.lang.Object[] getEnvParams()
- Returns the environment parameters of this class;
the prefix is "PmTraceConn..
- show_conn_avail (Default: false). When
true, the availability of each accepted connection is
computed and printed.
- show_blocked_conn (Default: false). When
true, information about blocked connections is displayed,
including an indication of why it did not succeed.
- Specified by:
getEnvParams
in interface WithEnvParams
- Overrides:
getEnvParams
in class PmBase<V,E>