Last modification on 2019-02-03
IntroductionThis 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_id||An argument which corresponds to an agent group stored in the config file|
|Attributes||Parameters which dictate an agents behaviour|
|Buffer||Where references to agents selected by a previous command are stored ready to be used for a future command|
|Config||The file read at startup, which contain a collection gene groups, which consist of agent id and attributes associated with them.|
|Gene||Non changing attributes associated with an agent|
|Size||An argument to represent the magnitude of area centered around an x and y co ordinate|
|X||An argument which represents a position in the x axis of the simulation|
|Y||An 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.
|Change||Change 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 file||x, y, size, agent_id|
|Delete||Delete agents within the bounds of the square defined by the x, y and size argument||x, y, size|
|Insert||Insert new agents with attributes from the corresponding id in config file, specified with agent_id, at x, y position||x, y, agent_id|
|Paste||Paste the agents currently in the buffer at the x and y position||None|
|Quit||Exit the simulation||None|
|Pause||Toggle between playing and pausing the simulation||None|
|Reload||Reload simulation from the config file||None|
|Yank||Copy the agents within bounds of the square defined by the x, y and size arguments into the buffer||x, y, size|