Island Team Revised SRS

Island Simulation
Version 1.1
Software Requirements Specification
Lainey Barb
Ralph Spence III
Ilija Zeljkovic
Michael Zeller
March 5, 2007
Table of Contents
Section
Page
1.0 Requirements for Our System ........................................................................................2
1.1 Time Scale Control ..................................................................................................2
1.2 Populations of Entities (hunter, prey, plant) ............................................................2
1.3 Natural Resources (water)........................................................................................5
1.4 2D Terrain/Map (landforms, sections) .....................................................................5
1.5 Statistics and Graphs ................................................................................................7
1.6 User Notification ......................................................................................................8
1.7 Motion ......................................................................................................................9
2.0 Architectural Diagram .................................................................................................10
3.0 Mapping of Requirements onto Architectural Diagram ..............................................11
3.1 User Interface Module ...........................................................................................11
3.2 Sections’ “Population” Module .............................................................................11
3.3 Resource (Water) Module ......................................................................................11
3.4 Animal Behavior Module ......................................................................................11
3.5 Plant “Behavior” Module .......................................................................................11
3.6 Statistics and Graph Module ..................................................................................11
3.7 Time Interface ........................................................................................................11
3.8 Simulation Visual Output Module .........................................................................11
3.9 Infrastructure Framework ......................................................................................11
3.9.1 Graphics Engine (with pop-ups) ................................................................11
3.9.2 Graph Draw Module ..................................................................................12
3.9.3 Movement Algorithms ...............................................................................12
3.10 Infrastructure Platform .........................................................................................12
3.10.1 Time Module ............................................................................................12
1
1. Requirements for Our System
1.1. Time Scale Control
1.1.1.
Users must be able to manipulate the time flow rate.
1.1.1.1. Time must be able to be paused and resumed.
1.1.1.2. Time flow rate must be able to be sped up and slowed down.
1.1.2. Time flow rate must be between real-time (clock-time) and one day per
second (statically constrained).
1.1.2.1.
Time flow rate will change in increments of one hour per second.
1.1.3. The simulation shall only display a subset of all events.
1.1.3.1.
The subset of all the events chosen for display will depend on the
time flow rate.
1.1.3.2.
Changing the time flow rate must not change what and how events
occur.
1.1.3.2.1. No events shall be lost regardless of the time flow rate.
1.1.3.2.2. The events shall be processed by the simulation in order of
occurrence.
1.2. Populations of Entities (hunter, prey, plant)
1.2.1.
Hunters must consume prey and water only.
1.2.1.1.
There must be a food consumption rate k, dependent on
population, at which each hunter consumes prey.
1.2.1.2.
There must be water consumption rate m, dependent on
population, at which each hunter consumes water.
2
1.2.1.3.
Prey and water can only be consumed if in the near vicinity of the
hunter.
1.2.2. Prey must consume plants and water only.
1.2.2.1.
There must be a food consumption rate k, dependent on
population, at which each prey consumes plants.
1.2.2.2.
There must be a water consumption rate m, dependent on
population, at which each prey consumes water.
1.2.2.3.
Plants and water can only be consumed if in the near vicinity of
the prey.
1.2.3. Plants must consume water only.
1.2.3.1.
There must be a water consumption rate k, dependent on
population, at which the plant consumes water.
1.2.3.2.
Plants can only consume water in the near vicinity of the plant.
1.2.4. Animals, plants, and water are to be represented by distinguishable icons
on the map.
1.2.4.1.
Icons must be able to be differentiated by shape, size, and color.
1.2.4.2.
The map must provide a legend for these icons.
1.2.5. The population distribution model must be able to provide a value for the
number of a particular entity in any specified section.
1.2.5.1.
This value shall be an integer in the range of 0 to n, where n is the
maximum number of animals that the island can contain.
1.2.6. Entities must behave according to their given characteristics.
3
1.2.6.1.
The characteristics shall include eating habits (the food and water
consumption rate), life-span (mortality rate), movement patterns, and
reproduction (reproduction rate).
1.2.6.2.
The characteristics for each type of entity shall simulate their
biological characteristics. For example, if the life-span of real-world
lions is 20 years, we will take accumulate this fact into our model.
1.2.7. Plants must not have any movement pattern or mobility rate.
1.2.7.1.
The only exception to this rule shall occur due to the fact that
plants must be able to reproduce, and therefore the “offspring plants”
can spread to immediately surrounding area.
1.2.7.2.
Plant reproduction rate shall be chosen according to the given
characteristics.
1.2.8. Entities must be able to be added to the island by the user. Entities must
also be able to be removed by the user if desired.
1.2.8.1.
The user shall be able to add or remove entities one at the time
only (once per mouse click).
1.2.8.1.1. The removal of entities shall be done by right-clicking on the
desired entity.
1.2.8.1.2. The adding of entities shall consist of choosing the entity type
from the entity/resource toolbar, and left-clicking on the place on
the map where you want to place the entity.
1.2.9. Plants must be eaten at a certain food consumption rate.
4
1.2.9.1.
The previously mentioned rate shall be dependent on the number
of consumers in their near vicinity.
1.3. Natural Resources (water)
1.3.1. Water must be able to be added to the island by the user. Water shall also
be able to be removed from the island by the user.
1.3.1.1.
Adding of water shall be done by choosing water from the
entity/resource toolbar, and left-clicking on the map
1.3.1.2.
Removal of water shall be done by right-clicking on the desired
icon.
1.3.2. Water consumption rate is designated by the plant or animal consuming it.
1.3.2.1.
This rate shall depend on the number of plants and animals
immediately surrounding the water.
1.3.3. Water shall be replenished by a rain model.
1.3.3.1.
Basically, water shall be replenished by a model that is
independent of island interactions, and dependent on a probability
function.
1.3.4. Water shall be represented on the map by using icons.
1.4. Terrain/Map (landforms, sections)
1.4.1. Map shall be divided into sections.
1.4.1.1.
The area of each section shall not be less than 10% smaller than
the area of the largest section.
1.4.1.2.
The boundaries between sections shall be straight lines.
5
1.4.2. Sections must have their own geography, making some uninhabitable.
1.4.2.1.
The qualification “uninhabitable” means that none of the animals
or plants will be able to come to that particular area.
1.4.3. The resources, populations of animals, and populations of plants will be
separate options that can be selected and viewed on the map together or
alone.
1.4.3.1.
When an animal is walking on top of plants, the overlay of their
icons on the map will be resolved as follows: the animal icons will
always be drawn on top the plant icons. Therefore, plant icons shall be
blocked by animal icons.
1.4.3.2.
We assume there will be no overlay of two types of animal icons
because no two animals will be able to be at the exact same spot on the
map.
1.4.4. Each section must provide a list of graphs.
1.4.4.1.
These graphs depict different statistics of the currently selected
section.
1.4.4.2.
The user must be able to select one graph from the list and view it.
1.4.5. Current population densities for sections must be displayed on the map.
1.4.5.1.
The density of an entity population must be represented by the
number of icons representing the entities present in the section.
1.4.5.2.
A legend for the meaning of the icons must be provided by the
map.
6
1.4.5.3.
Current and past densities must be able to be viewed using the
graphs provided.
1.5. Statistics and Graphs
1.5.1. Graphs must be able to display past and current statistics for the selected
section.
1.5.1.1.
Graphs must be able to include statistics for all types of entities
(hunter, prey, plant).
1.5.1.1.1. Graphs must be able to include statistics for all entities such as:
total population vs. time, deaths vs. time, and births vs. time for
the selected section.
1.5.1.1.2. Graphs must be able to include statistics that apply only to
animals such as incoming animals vs. time and outgoing animals
vs. time for the selected section.
1.5.1.1.3. User must be able to view each statistic and entity combination
separately.
1.5.1.1.4. User must be able to view a single graph with all the entities
and a particular statistic.
1.5.1.2.
A graph of the amount of water available vs. time for the selected
section must also be able to be viewed by the user.
1.5.2. When user accesses graphs, time flow must be able to be paused.
1.5.2.1.
Graphs must be able to depict the current section status at the time
of pause as well as past statuses.
7
1.5.2.2.
Time flow must be able to be resumed after exiting the graph view
mode.
1.5.3. The user shall determine the sampling rate at simulation’s start.
1.5.3.1.
The sampling rate determines the format of the graphs by
designating the time intervals on which samples are taken.
1.5.3.2.
The sampling rate must be able to be changed by the user.
1.5.3.2.1. Changing the sampling rate must be able to affect future data
readings.
1.5.3.2.2. Changing the sampling rate must not affect past data readings.
1.5.4. Graphing must be quick, on the order of 1 to 2 seconds.
1.5.4.1.
Graphs must load in 1 to 2 seconds.
1.5.4.2.
Loading a graph must be able to take the stored readings of the
selected statistic and plot them.
1.6. User Notification
1.6.1. User shall receive pop-up dialogs for monitored events.
1.6.1.1.
Simulation events (pause, exit) are always monitored
(automatically).
1.6.1.2.
Users shall be able to specify events about which they wish to be
notified.
1.6.1.3.
Specific dialogues shall appear for each user/event combination.
1.6.2. Pop-ups shall pause the island simulator when the pop-up appears.
1.6.3. Pop-ups shall resume the island simulator when the pop-up is dismissed.
1.6.4. There will be a simple generic pop-up for warning messages.
8
1.6.4.1.
These shall include only “OK” and “Cancel” buttons and display a
message.
1.6.5. There will be more complex pop-ups that can contain common elements.
1.6.5.1.
Common elements shall include text boxes, images, text label, and
incriminators.
1.6.5.2.
Common elements shall be able to be placed anywhere in the pop-
up.
1.6.5.3.
Text contained in text boxes and the values of the incriminators
needs to be able to be returned by the pop-up.
1.7. Motion
1.7.1. Animal movement shall follow a set movement pattern of two types.
1.7.1.1.
One type will be random motion which will be movement in all
directions with the same probability.
1.7.1.2.
One type will be pattern motion which will move towards a certain
goal.
1.7.1.3.
All motion is constrained so as to avoid obstacles.
1.7.2. The type of motion will be based on the hunger and thirst of the animal.
1.7.2.1.
A thirsty animal will use pattern motion which will move towards
water.
1.7.2.2.
A hungry animal will use pattern motion which will move towards
prey.
1.7.2.3.
A non-thirsty, non-hungry animal will use random motion.
9
1.7.2.4.
In the case of a thirsty and hungry animal, water will be the first
goal.
1.7.3. Animal movement shall be used by the movement algorithms provided by
the Infrastructure Team.
1.7.3.1.
These will include the algorithms for patterned, constraint-based
and random movement.
10
2.0 Architectural Diagram
User
Sees images from
Interacts with
pop-ups from
Sends input to
Receives
pop-up
responses
from
Receives output from
User
Interface
Module
Can Adjust Time Rate of
Sets the sampling Rate of and requests graphs from
Sectors
“Population”
Module
Is updated by
Time
Interface
Sends update events to
State is
stored by
Event Module
Entity Module
Resource
(Water)
Module
Animal
Behavior
Module
Plant
“Behavior
” Module
Statistics
and
Graph
Module
Gets timing information from
Defines what is displayed by
Simulation
Visual
Output
Module
Controls animal movement by using
Displays information using
Sets timing
parameters of
Displays Graphs using
Graphics
Engine (with
pop-ups)
Requests pop-ups from
Controls sampling of
Movement
Algorithms
Are consistent with
Framework
Time
Module
Platform
Infrastructure Module
11
3.0 Mapping of Requirements onto Architectural Diagram
3.1 User Interface Module
1.2.8 , 1.3.1 , 1.4.4.2 , 1.6.1 , 1.6.2 , 1.6.3
3.2 Sectors’ “Population” Module
1.2.5 , 1.4.1 , 1.4.2
3.3 Event Module
1.1.3
3.4 Entity Module
1.2.6 , 1.3.2
3.5 Resource (Water) Module
1.3.3
3.6 Animal Behavior Module
1.2.1 , 1.2.2 , 1.2.9 , 1.7.1 , 1.7.2
3.7 Plant “Behavior” Module
1.2.3 , 1.2.7
3.8 Statistics and Graph Module
1.4.4.1 , 1.4.5.3 , 1.5.1 , 1.5.2.1 , 1.5.3 , 1.5.4
3.9 Time Interface
1.1.2 , 1.5.2.2
12
3.10 Simulation Visual Output Module
1.2.4 , 1.3.4 , 1.4.3 , 1.4.5.1 , 1.4.5.2
3.11 Infrastructure Framework
3.11.1 Graphics Engine (with pop-ups)
1.6.4, 1.6.5
3.11.2 Movement Algorithms
1.7.3
3.12 Infrastructure Platform
3.12.1 Time Module
1.1.1
13