One interesting topology generator that was recently made publicly available is Inet [13] developed at the University of Michigan at Ann Arbor.
Let's imagine a scenario in which BRITE is used as a framework to develop a new topology generation model. We illustrate this scenario by incorporating a simplified version of Inet's generation model into BRITE's framework. We provide the guidelines and pseudo-code in the context of the C++ version. Adding a new model to the Java version is similar. The actual Inet generator is much more complex than what we are conveying in this example but its actual interface is concise and clean which facilitates its use as an example.
As was explained in Section 6.1, we need to consider mainly two issues: the passing of parameters and the generation functionality.
Inet basically receives the following parameters (we ignore the rest):
Therefore we create a ToyInetPar class deriving from ModelPar, as
shown in code excerpt 11.
ProgramC++ excerpt
BRITE will be instructed to generate a topology according to the new ToyInet model, by specifying the model type along with the required parameters in a configuration file as shown in Listing 6.1.
The next step is to provide a parsing routine specific for the Inet model. Such a parsing routine, built using the basic parsing facilities of BRITE, is shown in code excerpt 12.
Now we have the parameter passing done. The next step is to add the generation functionality according to the Inet model. We can do that by creating a new InetModel class derived directly from the base Model class and overriding its Generate method. This is shown in code excerpt 13.