Get MASyV at Fast, secure and Free Open Source software downloads

About MASyV

MASyV, which stands for Multi-Agent System Visualization, was developed to facilitate the visualization of cellular automata, or agent-based or individual-based models, without the need for the user to actually implement a graphical user interface (GUI). The software employs a client-server architecture with the server providing I/O and supervisory services to the client simulation. The MASyV package consists of a GUI server, masyv, a non-graphical command-line server, logmasyv, and a message passing library, libmasyv, which provides functions to be used by the client to communicate with the server.

The MASyV framework allows the user to write a simple two-dimensional multi-agent client program in C, create the desired accompanying images for the agents with a paint program of his/her choice (e.g. GIMP), and get their client to talk to the server using the functions provided in the message passing library. The flexible GUI of MASyV, masyv, offers data logging and visualization services, and also offers the possibility to record the simulations to a wide range of video formats for maximum portability in sharing the results of the simulations with collaborators. The GUI, masyv, is built using GTK+ widgets and functions. For better graphics performance, the display screen widget, which displays the client simulation, makes use of GtkGLExt's OpenGL extension which enables GTK+ widgets to rapidly render scenes using OpenGL's graphics acceleration capabilities. Capture of the simulation to a movie file requires that gstreamer and the desired compression codecs be installed.

For non-graphical batch runs, the user can instead use the command-line version of the server, logmasyv, without having to make any changes to their multi-agent client code. The utility logmasyv can be used to run the client simulations on large computer grids and over a wide range of computer platforms as it only requires that a C compiler be available. This facilitates the exploration of the parameter landscape of the client simulation, without the CPU overhead cost incurred by the graphical services. Communication between the server program (either masyv or logmasyv) and the client simulation is done locally through a Unix domain socket stream.

The MASyV package comes with a few pre-programmed client modules like: "ma_ants" (ant colony laying and following pheromone), "ma_tubule" (organization of the oscillating electrons in the potential well of the beta-tubulin), "ma_immune" (localized viral infection taking place in tissue), and other such simulations. Although those simulations might not be what you need, they are good examples of how to write a client module and how to use the message passing library. The MASyV package also contains a Hello World client simulation "ma_hello" which demonstrates how to implement a new client simulation and how to make use of the message passing library. You can also Get Help on various aspects of MASyV.


[ma_sqr_ants] [ma_immune] recording a movie


Using MASyV's GUI, masyv, it is possible to capture the simulation as a movie, encoded via gstreamer, to one of the following formats:

  • Raw
  • Theora (Ogg) Multimedia
  • Apple QuickTime
  • Windows Media Video
Below are a few example movies in Windows Media Video v1 format

Sample animations

Client modules

MASyV comes with a few pre-programmed clients listed below. If you have written a client and would like it to be added to this list and to the MASyV package, please let me know.



    Implementation on an hexagonal grid of the ant simulation presented in Watmough and Edelstein-Keshet (1995). It illustrates the early formation of trail networks by a colony of pheromone laying ants.


    A simple 1-D cellular automaton as studied extensively by Wolfram. A great example of a simple simulation from which to learn how to use the message passing library to talk to the UI.


    Lattice gas simulation of gas diffusion. Litteraly: little grey squares moving randomly on a grid with absorbing boundary conditions. Also a great example of a simple simulation from which to learn how to use the message passing library to talk to the UI.



    A Hello World MASyV client. Perfect for learning how to write a client (see also Getting Help).


    This is a simulation of a viral infection taking place in an organ where the target cells are tightly packed and do not move such that each sit of the CA grid represents an organ cell. Immune cells then move randomly on the grid, patrolling the tissue, and take action when they encounter an expressing or infectious cell. This particular model was used in (Beauchemin et al 2005) to model a viral infection with influenza A, and in (Beauchemin 2006). As such, the model has it is has been parametrized for the specific case of influenza A and as such each site of the grid represents a lung epithelial cell. For more details about this model and its application to influenza A, see Beauchemin et al. (2005) and Beauchemin (2006).


    The Ising spin model.


    A simulation of the organization of electrons within the β-tubulin that make up a microtubule. This module will be used to assess whether quantum effects can cause the electrons to self-organize.


Last modified: July 22, 2008, 13:08.