###############################################################################
Advanced RTI System, ARTÌS			http://pads.cs.unibo.it
###############################################################################

©Copyright 2002-2017                      Gabriele D'Angelo, Michele Bracuto

University of Bologna	      Department of Computer Science and Engineering

http://pads.cs.unibo.it                                 <g.dangelo@unibo.it>

----------------------------------------------------------------------------
			Migration Wireless (wireless) - DISTRIBUTED EXECUTION
----------------------------------------------------------------------------

In this directory you can find a complete simulation model example. 
The wireless.c example models a set of wireless devices moving in a 
toroidal 2D space. The interactions between them are based on proximity.
The used synchronization algorithm is based on time-steps (timestepped).
The simulation model uses the APIs provided by GAIA/GAIA+, in this way
a migration-based adaptive PADS is implemented.

The simulation model is the same as "MODELS/MIGRATION-WIRELESS" but in
this case the execution scripts are for a distributed simulation cluster.

-------------------------------------------------------------------------------
SOURCE CODE COMPILATION:

Fist of all, it is necessary to compile the example source code, this can
be done using the provided Makefile (execute the "make" command in the 
WIRELESS directory). In case of errors, please check carefully the missing
libraries or version incompatibilities.
-------------------------------------------------------------------------------

EXECUTION:

A single main script is provided for the simulator's execution. 

run-distributed.sh
	executes a single run of the simulation and it blocks until all LPs 
	have finished

	mandatory input parameters = #SMH
	#SMH            total number of wireless devices (nodes) to simulate
					(e.g. each LP will simulate #SMH / #TOT_LP devices)
			
	The number of LPs in the simulation (#TOT_LP), the structure of the 
	distributed cluster and the host running the SImulation MAnager (SIMA)
	are described in the "hosts-distributed.txt" configuration file.
	For more information on "hosts-distributed.txt" see USAGE.TXT

	example: ./run-distributed.sh 1000
		it runs a distributed simulation composed with 1000 simulated nodes
		in the distributed TCP-based cluster described in the
		"hosts-distributed.txt" configuration file
