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

Simulator for clustered search algorithms in unstructured peer-to-peer networks
Based on the PONGsim framework
 
Version: 8.10
 
Nicklas Beijar, nbeijar@netlab.tkk.fi
Networking Laboratory, Helsinki University of Technology
 
######################################################################
 
Simulator for search algorithms in unstructured peer-to-peer networks
 
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:
- Commenting

 
Modules
       
math
os
pongsim
pongsim_average
pongsim_clustered_app
pongsim_maketable
pongsim_resources
pongsim_topologygenerator
random
string

 
Classes
       
pongsim.Simulation
ClusteringSimulation

 
class ClusteringSimulation(pongsim.Simulation)
    ####################################################################
###   C l u s t e r i n g S i m u l a t i o n
####################################################################
 
  Methods defined here:
close(self)
Close the simulator and write the report.
eachevent(self)
Check whether the simulation should end.
generate_cluster_topology(self, clusternodes)
Generate the topology connecting clusters together according to the chosen scenario.
init(self)
Initiate the user-part of the simulation.
old_close(self)
Close the simulator and write the report.
postprocess(self)
Perform postprocessing and analyzing data.
startdatacollection(self, dummy)
Start collecting the statistics.
writetables(self, inpath, outpath, file, fileprefix, columns, rows)

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)