SWIM: Small World In Motion


Modeling Human Mobility

Readme file for SWIM-NetworkSimulator 2.0 - 2010

Download the simulator from here.

Compile: g++ -O3 -o simulate *.cpp

Execute: ./simulate

The simulator reads input from the config.txt file, and generates output file "trace.txt" within the same directory.

The meet and leave events are divided into two types:

One can chose whether to use both types of meet/leave events or just one type by parsing the trace.txt output file.

Description of the config.txt file

The config file is made of a series of lines. Every line starting with a semicolon (;) and blank lines are ignored. Lines recognized and used by the simulator are of the following form:

name value

where "name" denotes a given parameter's name whereas "value" is the associated value that will be used when the simulator will be run. The number of space characters that separates a "name" from its value can be an arbitrary number. There exists for type of values:

List of parameters within the config file:

Nodes[real] node number;
NodeRadius [real] node communication range;
SimulationSeconds [int] simulation duration in seconds;
CellDistanceWeight [real] alpha parameter of SWIM;
NodeSpeedMultiplier [real] nodes' speed equals the distance to be covered times this parameter. usually it's set to 1;
WaitingTimeExponent [real] exponent of the power-law of the waiting time distribution;
WaitingTimeUpperBound [real] upper bound of the waiting time distribution;
BucketsPerSide [int] bucket number per network area side. It is used just for performance improvements. E.g. if set to 10 there will be used 100 buckets. If set to 0, bucketing is disabled.
ShowOnlyMeetAndLeave [bool] if set to 1 prints out only MEET/LEAVE events. If set to 0 prints all types of events (including arrivals and leaving from cells).
SaveTraceFile [bool] If set to 1 saves output on "trace.txt" file.
TraceFileName [string] name of the trace file. Usually "trace.txt".
ShowTrace [bool] 1 to print trace on stdout, 0 otherwise.
ShowProgress [bool] 1 to print simulation progress on stderr, 0 otherwise.
ProgressStep[int] simulation progress granularity: if set to 15 info on progress will be printed on 15%, 30% etc.