Win a copy of Functional Reactive Programming this week in the Other Languages forum!

# Network Simlulation...

Justin Fox
Ranch Hand
Posts: 802
ok we have to create a network "datastructure" so this means we can "hard-code" the network.

now in the network, there are LAN's and Bridges...

http://galaxy.cs.lamar.edu/~bsun/network/assign/assign2.pdf

if you go to the above site, the topology is shown...

ok, now this is the current code I have...

ok, each bridge has a message, and originally, say you are starting with

B1, its message is "B1,0,B1".

which means:

B1 , 0 , B1
root dist current

so basically every bridge is going to think its the root(where the root is determined by the "smallest" bridge, in this case B1.

first we have to simulate a stabalization of the network (where every bridge

knows that B1 is the root, and it's distance to B1.

then we have to formulate the minimum spanning tree so that there are no

loops.

in my code above, well in general really, i dont really know how to keep

of what node im at, and how to transmit the current "package/msg" to the

next bridge, through the LAN.

Thanks,

Justin

Steve Fahlbusch
Bartender
Posts: 605
7
Justin,

I really don't understand your statment about being able to hardcode the network (must be something that your prof told you - and if so all is well and forget the rest of this sentence), but just as a heads up - I would fail any project submitted in any of courses using that approach.

Now as to what I think you are asking each edge (ie: each single link) will have an attribute (for a given target) that will be the next hop in the spanning tree towards B1. So if say (just made this up) the smallest span from B6 to B1 is B6 -> B4 -> B1, B6 will know three things: If it can (or not) span to B1, The distance (number of hops or whatever) and the next nearest note to B1, which is B4.
[ September 27, 2006: Message edited by: Steve Fahlbusch ]