CS 1323 Honors, Fall 1996
Team Project B
What to Hand In
Due Wednesday, October 9, 4:29pm, FH303
Program Organization Chart
exhibiting the interactions between major program
your team writes for this project
in which you issue the command "main" -
This causes the Hugs system to produce the
value of the variable "main", defined in
for the project.
This leads to an interactive session in which
Hugs asks for the simulation parameters, then
displays a summary of the simulation results using
your function "displayRabbitCoyotePopulationTrajectory".
of team meetings
Define a function
constructed by displayChart,
combined with appropriate information from other functions
defined in Individual Project 4,
this function must deliver a string
the trajectory of the rabbit/coyote populations predicted by
the Lotka-Volterra model for the given period, coefficients,
and initial populations.
- displayRabbitCoyotePopulationTrajectory ::
Int -> Int -> Int -> [Float] -> [Float] -> String
- Arguments (in the order in which they appear in invocations):
- width :: Int - width of lines to be displayed in picture
- height :: Int - number of lines to be displayed in picture
- period :: Int - number of months to simulate
- [i, s, e, g] :: [Float] - coefficients of Lotka-Volterra model
- [r0, c0] :: [Float] - initial rabbit and coyote populations
Some combinations of coefficients lead to cyclic populations,
others to extinction of one or both species. Here are some
coefficients and initial populations that lead to a cycle:
- [i, s, e, g] = [0.04, 0.1, 0.002, 0.03]
- [r0, c0] = [1000, 10]
- The program must be organized as a collection of modules.
Each module will be in a separate file, the name of which
is the name of the module, plus the ".lhs" extension.
For example, a module named "EcologyEquations" would reside
in a file named "EcologyEquations.lhs". (Note that module
names start with capital letters.)
- The Main module for this project is provided for you and
resides in the file
This is the file you load, via Hugs,
to run the ecology simulation. It imports the module
EcologyEquations to get access to the function
- The module EcologyEquations exports two functions:
rabbitCoyotePopulationTrajectory. It imports
the DrawingUtilities module to get access to the
makeChart and displayChart functions.
- The module DrawingUtilities exports two functions:
makeChart and displayChart.
the NumericUtilities module to get access to the digitize
The function updatePicture
is defined in this module, but not exported.
- Any module may import the
modules to get access to functions needed from those modules.
- In each team project, certain team members will
These assignments will rotate
with each successive project. For this project,
the assignments are
Team Organization document
outlines the duties associated with these assignments
- leader - second team member listed on roster
- recorder - third member on roster
- librarian - fourth member on roster
- collector - fifth member on roster
(or first, if no fifth exists)
- Use the software each of you
developed for Individual Project 4 to complete the team
project. Do not redefine those functions.
You may use those defined in the
solution to Project 4
on the CS1323 Honors Web site if any of those available to
you from the work of your team members did not meet the
requirements of Project 4.
- You will need to modify the files
you created for Project 4
to meet the required
In particular, you will need to incorporate your definitions
- As usual, follow the standards required in the
Project Style Guide.