Model
Class BottomUpHierModel
java.lang.Object
|
+--Model.Model
|
+--Model.BottomUpHierModel
- public class BottomUpHierModel
- extends Model
Constructor Summary |
BottomUpHierModel(Model r,
int numASNodes,
int groupingMethod,
int asType,
int bwInter,
float interMin,
float interMax)
|
Method Summary |
void |
AssignBW(Edge[] e)
|
Graph |
Generate()
All Models that are derived from this base Model class, must
override the Generate() method. |
void |
groupNodes(Graph g0)
Method: groupNodes(g0)
-----------------------
Assign routers in g0 an ASid according to our groupingMethod. |
java.lang.String |
toString()
All models have a string description which is returned by their
toString() method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BottomUpHierModel
public BottomUpHierModel(Model r,
int numASNodes,
int groupingMethod,
int asType,
int bwInter,
float interMin,
float interMax)
toString
public java.lang.String toString()
- Description copied from class:
Model
- All models have a string description which is returned by their
toString() method. Usually this is included when exporting the
topology generated by that model to a file.
- Overrides:
toString
in class Model
- Following copied from class:
Model.Model
- Returns:
- String
groupNodes
public void groupNodes(Graph g0)
- Method: groupNodes(g0)
-----------------------
Assign routers in g0 an ASid according to our groupingMethod.
A note on assigining IDs: we don't really create a new Node (waste of memory), we
simply increment the static int (nodeCount) in the Node class and so are guranteed a unique
ID for the AS "node" that the routers will belong to.
How Grouping is Done:
---------------------
RANDOM_PICK: For each AS node, do the following: First, determine
nodesPerAS, the number of routers that will be in this AS (according to the AssignType).
Second, randomly pick nodesPerAS routers in the router topology assign them to
this AS (and mark them as unavailable for the other ASs). Because of the way
routers are assigned to ASs, we could have (should have) disconnected or non-neighbor
routers belonging to the same AS.
RANDOM_WALK:
AssignBW
public void AssignBW(Edge[] e)
Generate
public Graph Generate()
- Description copied from class:
Model
- All Models that are derived from this base Model class, must
override the Generate() method. The Generate() method handles
all the model-specific intricacies of: 1) Placing the Nodes 2)
Interconnecting the Nodes 3) Assigning Edge weights (bandwidth,
delay etc) And other model-specific functionality.
- Overrides:
Generate
in class Model
- Following copied from class:
Model.Model
- Returns:
- Graph