Patrolling Ants for Network (PAN)
Manual
First of all we have to define a network we going to work on. You can load it
from file choosing in menu File|Load or you can define it in next
two steps
1) define network topology:
i) custom topology: choose File|Run Graph Editor, build the graph,
choose File|Import Graph in Simulator Window and then
Simulation Parameters Window will appear (proceed to 2);
ii) choose File|Run Network Wizard - new window will appear, were
you can choose load graph from file or use a few standard graph topologies, or
random graph of some type (in most cases the distribution is not uniform), when
you press OK, if all information you typed is valid,
Simulation Parameters Window will appear
2) define ants placement and network properties.
Simulation Parameters Window: here you can define:
i)Ants of which kind will be used (standard and custom);
ii) Ants placement: random, or you can left click a node to increase ants
number in it, or right click to decrease.
iii) what is probability that edge broken.
When you finish press OK and if all information is valid, you are
ready to simulate. In every moment during simulation you can choose in menu
File|Save to save a network (initial configuration).
Simulation.
You can control simulation process with buttons/menu:
- Step/(Simulation|Step) - perform one step of simulation;
- Run/(Simulation|Run) - automatic run;
- Stop/(Simulation|Stop) - stops automatic run;
- Restart/(Simulation|Restart) - returns the network to initial
state;
- ---/(Simulation|Delay) - set delay (in milliseconds) between two
consistent steps in automatic run (default is 3 seconds);
- ---/(Simulation|Log File) - shows window with log information.
The information depends on what kind of ant are running, for standard ants:
every line represents state of network after one step (first line - initial
state, second line - state after first step...), where state is placement of
all ants ("ab9" - first ant in node a, second in node b, ...). In this window
you have button Save to save it to file;
Visualization.
Nodes with ants will be represented as appropriated number of ants (if there is
more then 5 it will be represented as two ants with 3 points between).If node
still were not visited it will be green otherwise it will be blue. Under each
node you will see his name. Broken edges are red, normal are black.
EdgeAnt: for every node next edge to be traversed has green color.
VAW: every node has size respectively to his weight, there is node weight
written near node name in braces.
Writing custom Ant
You should write class which extends das.simulation.Ant and
may write class extending das.simulation.PANNode class. For
exact instructions how to write thay see documentation for this classes.