next up previous
Next: An example of adding Up: Extending BRITE's Java Version Previous: Passing Parameters to the

Overriding the Generate method

Like in the C++ version, the Generate method is the entry point to creating a topology Graph for all models. Generation of flat topologies is usually a three step process: 1) Placing the nodes on a plane, 2) adding edges between the nodes, and 3) assigning weights to these edges (representing bandwidth, delay and so forth). Code excerpt 10, shows as an example, the Generate method for the RouterWaxman model.


\begin{Program}
% latex2html id marker 710\footnotesize\begin{verbatim}publ...
...;
}\end{verbatim}\caption{Generate method for Router Waxman model}\end{Program}

The parent class for RouterWaxman, RouterModel implements the node placement functionality and is used unmodified by RouterWaxman. You may use the functionality provided in the existing models by deriving your model from one (or more) of these models and overriding unwanted methods.



Alberto Medina 2001-04-12