Command Specification

Last modification on 2019-02-03


This document provides an overview to the use of commands in Ecosim. There is currently only a set of small yet essential commands ready to be implemented, however this is prone to change and expand during the course of development.

Key Terms and Concepts

agent_idAn argument which corresponds to an agent group stored in the config file
AttributesParameters which dictate an agents behaviour
BufferWhere references to agents selected by a previous command are stored ready to be used for a future command
ConfigThe file read at startup, which contain a collection gene groups, which consist of agent id and attributes associated with them.
GeneNon changing attributes associated with an agent
SizeAn argument to represent the magnitude of area centered around an x and y co ordinate
XAn argument which represents a position in the x axis of the simulation
YAn argument which represents a position in the y axis of the simulation


As a modular approach is being taken with the construction of the program, the decision to separate key binds and commands has been taken. This way, key bindings are simply shortcuts to a command, rather than being hardcoded into the software. This leave room for easy expansion at a later date. The user is also able to enter commands manually into the command prompt at the bottom of the user interface.

Commands are a way for the user to interface with the simulation whilst it is running, allowing them to modify the environment, adding, removing or changing agents. Some commands require arguments to specify details such as the location where their action should occur, whilst others do not. Below is a list of all the primary commands which will be implemented.


Command NameDescriptionArguments
ChangeChange agents within the bounds of the square defined by the x, y and size arguments to agents corresponding to the agent_id specified by the config filex, y, size, agent_id
DeleteDelete agents within the bounds of the square defined by the x, y and size argumentx, y, size
InsertInsert new agents with attributes from the corresponding id in config file, specified with agent_id, at x, y position x, y, agent_id
PastePaste the agents currently in the buffer at the x and y positionNone
QuitExit the simulationNone
PauseToggle between playing and pausing the simulationNone
ReloadReload simulation from the config fileNone
YankCopy the agents within bounds of the square defined by the x, y and size arguments into the bufferx, y, size