Software Architecture

Mercury is organised in three packages:

  1. agents: This is the main package containing the implementation of different agents in Mercury. The agents are developed following an object-oriented approach. Each agent type is a Class containing its memory (attributes) and Roles. The Roles are independent Classes contained within the Agents. All agent types inherit from a generic Agent class, which provides the shared functionalities of initialisation, mailbox and functionalities required to modify their behaviour through the application of Modules. Two sub-packages are located inside the agents’ package:

  • Modules:

    This package stores different modules that can be loaded into Mercury. A Module is composed of three files:

    • the Python code implementing the functionalities that need to be added and/or replaced in the different Roles,

    • a configuration file indicating which functions need to be added/replaced for which roles, and

    • an optional configuration file with any additional parameters needed for the new functionalities implemented in the module.

  • Commodities:

    Contains different objects used and manipulated by the agents, such as the definition of aircraft, alliance, slots, etc. Each one of these concepts will be represented by one or several classes.

  1. libs: The libs package contains functionalities required by Mercury, such as the implementation of the Delivery system, World builder (to create the agents at the instantiation of a simulation), Simulation manager (to manage the execution of Mercury), Case study loader, etc. Functionalities to manage the input and output of Mercury are also provided here (Input and Output managers). Finally, external libraries are also included here.

  2. config: The config package contains the configuration files of Mercury and the simulations.

About

Authorship

Up to the open-source release, all Mercury code has been written by Gérald Gurtner and Luis Delgado, to the exception of:

  • The Dynamic Cost Indexing module, written by Damir Valput

  • The GUI, written by Michal Weiszer

We also thank Tanja Bolic for many waves of testing.