In my third year at university I undertook a software based dissertation which involved using an agent based modeling library developed by previous students at the university to design models to simulate elephants. The project was for a pofessor in the vet school who wanted to be able to simulate how elephants would react to their environment whilst in captivity. They wanted to be able to alter the elements within an enclosure to optimise the enjoyment of the elephants.
Agent-Based Models are often used to simulate complex things that traditional models cannot due to their simplicity. This dissertation presents an agent-based model solution to a real world problem presented by a member of the vet school at the University of Nottingham. It is designed and implemented using an agent-based modelling tool-kit that was initially developed by students for their own dissertations in previous years. The report will also discuss how the tool-kit was modified and improved upon while using it for a new implementation. The implementation consists of three main parts: the graphical user interface, the agent-based model and the reporting section. The user interface is developed using JavaFX and allows the user to design an enclosure, run the model, and view the reports. The simulation uses a basic implementation of an agent-based model to represent the elephants, they are able to walk around the enclosure as well as get hungry, thirsty and tired. This allows them to interact with the enclosure that a user has designed to eat, drink and rest. The user can select what graphs they wish to include in the report which can then be generated by the system to produce a document that includes information about the simulation settings as well as all of the data about that run. The system has been evaluated to confirm that it meets the requirements and the objectives; extreme testing has been used the to assure that it is stable and functional. There is great potential for future work using the current system as a base for a project. The future projects could take a variety of directions, including further developing the model to be more accurate or performing research into how agent-based modelling could be used to model groups of animals such as a herd of elephants.
During the development of the project, many state machines of varying complexity were developed starting with the most basic state machine:
And resultig in a far more complex heirarchical state machine which represents what the model would be like in order to interact with all of the objects currently available in the system. The states have taken inspiration from a popular children’s game developed by Nintendo which simulated other animals and their basic needs. The concept is that the elephants will have levels of hunger, thirst and sleep. As the levels drop, their responses will be based upon all three levels. The one closest to 0% will be chosen to be acted upon. From there, dependent on the other states, they will either fill up that need all the way to the top, or to an acceptable level and then address a different need. Once the basic model has been achieved, there is a limitless amount of improvement that can be done to it. This is because the way that the model has been designed it would be very easy to add another need. An interesting one for example would be boredom. Science has shown that elephants can in fact get bored. This is because in the wild they are constantly moving and foraging for food, but in captivity they do not have to do these as much and so boredom can occur, leading to social distress in the enclosure. This why elephants’ behavioural enrichment is so important to zoos across the globe.
An important part of the system is the GUI. This is what the user interacts with and will allow them to use the various features of the system. It is important that the design is simple and intuitive to use so that even people who are unfamiliar with the program are able to use it. The main design principle is based on the 3-click rule [9]. It states that a user should be able to find what they are looking for within three clicks or they will become frustrated with the system. This is why once a user has logged in (Figure 5), they will be taken to a main menu (Figure 6), so that users can easily select what feature they would like to use.
Another important part of designing the GUI was how the user would interact with the designs and running the simulation. In order for the users to see the enclosure they were designing, it was decided that a canvas would be used to provide a visual indication of the objects they were adding to their enclosure. In order to make the initial implementation relatively simple, text boxes and buttons would be added next to the canvas in order to add features to the enclosure (Figure 7). To make the system intuitive to use, it made sense to make the screens similar so that once users could use one, they felt familiar with the view and the layout.
Throughout the implementation the design was altered slightly in different places. For example, as it became evident that there needed to be a screen to allow new users to be added, a settings screen was implemented and then added to the main menu. This meant that more buttons were required on the form, rather than just the original three. As well as this, a button was added in order to load an enclosure to run the simulation. This was adapted from the original design to make each of the different sections of the system accessible from the main menu to allow for easy navigation; it also made it easier to differentiate between the different functions of the program. Another alteration that was made to the original designs was to add a screen for the reporting section of the system. From the screen the users can preview the graphs of their choosing and then, should they decide to, export them to a .pdf report.