sim_dist_groups
index
u:\f\project - pongsim\pongsim850\sim_dist_groups.py

Simulator for distribution algorithms for fully distributed user groups 
Based on the PONGsim framework
 
Version: 1.50
 
Nicklas Beijar, nbeijar@netlab.tkk.fi
Networking Laboratory, Helsinki University of Technology
 
######################################################################
 
Simulator for distribution algorithms for fully distributed user groups
 
Copyright (c) 2005-2007 Nicklas Beijar
 
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
 
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
 
######################################################################
 
To do:
- Everything

 
Modules
       
math
os
pongsim
pongsim_floodindex_app
pongsim_floodsearch_app
pongsim_resources
pongsim_ri_app
pongsim_topologygenerator
random
time

 
Classes
       
pongsim.Simulation
GroupSimulation

 
class GroupSimulation(pongsim.Simulation)
     Methods defined here:
close(self)
Close the simulator and write the report.
eachevent(self)
Check whether the simulation should end.
generate_topology(self, nodes)
Generate the topology connecting nodes together according to the chosen scenario.
init(self)
Initiate the user-part of the simulation.
startdatacollection(self, dummy)
Start collecting the statistics.

Methods inherited from pongsim.Simulation:
__init__(self)
Initialize the simulation
 
This function is called when the simulation is being initialized. 
Override this function to implement your simulator.
abort(self)
end(self)
makeworld(self)
Return a World for the simulation.
 
Called before init(). This function CAN be overrided to define other types of Worlds
messagereport(self, simtime, sent, node1, node2, message)
Analyses a sent of received message.
output(self, s)
pause(self)
postprocess(self)
Perform postprocessing and analyzing data.
 
This function is called when the user clicks the postprocess button. It is a suitable place
to process the results from the simulation. 
Override this function to implement your simulator.