When ViSiDiA starts, the main window appears (figure 2.1). The Graphical User Interface (GUI) consists in four parts:
The contents of toolbars change depending on ViSiDiA running mode. Either you are
editing a graph, or you are visualizing a simulation. So you have access either to
edition or to simulation functionalities. And you always have access to view
functionalities.
Toolbar position cannot be changed in ViSiDiA window. However, toolbars can be detached (floated) or attached (docked) to the window. To detach a toolbar from the window, just drag it outsine the window. To attach a toolbar, use the close button in the floating toolabr window.
You can create an empty new graph, load a graph from a file or save a graph to a file.
Graph files are in GML format. When loading a graph, the file selection dialog
contains a checkbox to display or hide the selected graph (default is to display the
graph).
You can undo/redo graph operations: vertex/edge creation, suppression, movement,
merge.
From the edition menu, you can remove or duplicate selected items, complete the graph or
select all elements. If using sensors, you can randomly place sensors on support
graph.
From the simulation menu, you can specify the number of simulations (see section 2.6.3).
You can either define rewriting rules or select an algorithm/agent from a file. If using
agents, you can randomly place some agent one the graph.
From the simulation toolbar, you can start/pause/stop the simulation, and adjust its
speed.
In the view menu and toolbar, you can display graph properties (general information, or
information about selection). If a single graph element (vertex or edge) is selected (either
in edition or simulation tabs), you can manage its properties (set, add, remove), such as
label, weight, orientation, and so on.
Zoom functionalities are also available.
The menu contains a checkbox to display or hide the current graph. If the graph is
hidden, the graph panel displays some graph properties in edition mode.
From the ViSiDiA menu, you can adjust preferences, replay a previously recorded simulation (see section 2.6.4) and quit the application.
In the edition tab, left click to add a new vertex. Drag with left button pressed to add an
edge.
Right click on vertices and edges to select/unselect them. Drag with right button pressed
to select all items in a rectangular area.
Drag with middle button pressed to move graph elements. If first click in on a selected
element, all selected elements move. If first click is on an unselected vertex, this vertex
moves. If first is not on a graph element, the whole graph will move. Note that moving a
vertex implies moving its incident edges.
If you move a vertex on another vertex, the vertices will be merged, and their incident
edges are recomputed.
You can remove selected items with either DELETE or BACKSPACE key.
In a simulation tab, you can right click on vertices and edges to select/unselect
them.
The secondary toolbar in edition tab lets you both define the simulation mode and create
a new simulation tab.
There are eight simulation modes, based on a combination of three choices:
When you have created a graph, select the simulation mode and click the "New
simulation" button. If you use fixed processes, a new simulation tab appears.
For the particular case of mobile processes (sensors), you must first define a support
graph for sensors and click the "Set support graph" button to validate, then place sensors
on this support graph, and finally click the "New simulation" button. If you click the "Set
support graph" without defining a graph, ViSiDiA suggests using a regular grid as a
support graph.
Suppose a graph as illustrated in figure 2.2, and start a new message-passing simulation with fixed processes and local network.
From the "Simulation" menu, select an algorithm using the proposed file dialog. An algorithm is a compiled Java class. The file dialog contains a short description of each algorithm (figure 2.3). Open the "Spanning_Tree_RDV" algorithm. The algorithm will be copied to each vertex.
Right-click on a vertex to select it. Click the "Graph properties" button in view toolbar or menu. Change the vertex label to "A". Start the simulation (figure 2.4). On the left side of the window, you can choose the kind of messages to be displayed.
Click the "Statistics" button in the left side of simulation window to visualize the number
of sent messages.
The number of messages is displayed for each simulation (figure 2.5), in case
of multiple (repeated) simulation (see section 2.6.3). Note that if the selected
algorithm has no termination detection, statistics will be useless since the
number of messages will grow up indefinitely. In the previous example, the
"Spanning_Tree_RDV" algorithm has no termination detection. An appropriate
algorithm is "Spanning_Tree_ID_With_Termination".
Suppose the same graph as illustrated in figure 2.2, and start a new mobile agent
simulation with fixed processes and local network.
Select one or more vertices. From the "Simulation" menu, select an agent using the
proposed file dialog. An agent is a compiled Java class.
Repeat for other agents or vertices in the same graph if needed, then start the simulation
(figure 2.6).
Using the buttons on the bottom-left side while the simulation is running, you can:
You can display statistics about the mobile agent simulaiton, using the "Statistics" button in the left side of simulation window.
Message-passing and mobile agent simulation is available using mobile processes (sensors). First define a support graph (either loading an existing graph or using a regular grid), then place sensors on this support graph (figure 2.8).
Select an algorithm or agents as described in the previous sections, then start the simulation. The sensors start moving. If two sensors are close enough, they are linked by an edge and can exchange messages or agents (figure 2.9). The sensor communication distance can be set in the ViSiDiA/Preferences menu.
Rewriting rules can be defined thanks to the graphical interface, enabling the user to
draw an algorithm only with the mouse. Rules execution can be visualized with agents or
message passing. This depends on the simulation mode you chose in the graph
editor.
A dialog appears when clicking the command Define rewriting rules in the
Simulation menu.
From this dialog, you can create a new set of rules, or load a previously saved rewriting
rule system.
To create a new set of rules:
On figure 2.10, one of the three rules used to create a spanning tree with termination detection is presented. This rule means :
If u is a node of label "A" with a neighbor of label "A" with a marked edge between them, and u has no neighbor of label "N" with an unmarked edge ("Context 1"), then u can take the label "F". In fact, there is another forbidden context hidden under the "Context 2" tab.
From Visidia menu, you can adjust preferences relative to graph (figure 2.11), colorpalette (figure 2.12) or sensors (figure 2.13).
Vertices, edges and agents have specific properties, such as labels, weights, etc. You
can adjust these predefined properties and add new ones by selecting one item
(vertex, egde or agent) then clicking the Info button in top toolbar. Different
types of properties are available : Boolean, String, Double, Integer. Each new
property can be displayable, which means that it can be visualized on the graph.
Figure 2.14 gives an example of setting an edge properties. Three properties are specific
to edges and cannot be removed (oriented, label, weight). The user has added two other
properties (comment, nbTransfers) which are both displayable, but only nbTransfers is
displayed on the graph.
You can decide to run a same simulation several times in a raw. You must specify the number of simulations from the corresponding entry in Simulation menu before clicking the Start button for the first time.
You can save a simulation to a file in order to replay it at a later time. You must click the Record button in left toolbar to choose a record file before clicking the Start button for the first time.
To be written.