System Description
The simulation takes place on a grid consisting of square cells. The grid can be thought of as the area of land being simulated. It is two-dimensional, and each cell will be labeled according to an (x,y) convention. Figure 2 shows an example of the grid. The time step for the simulation is one day. Since the lifespan of insects and moths is short, multiple generations can be simulated for any one year. Because of this, a total simulation time of one year is sufficient. For each day, the weather conditions (wind speed, wind direction, temperature, and rainfall) will be generated. The weather variables are generated using mathematical functions to mimic actual weather conditions.

FIGURE 2
After determining the weather variables, the plant growth is simulated for each cell. The simulated weather information is used to determine the growth of the crops. A level of attractiveness (to the moths) can be assigned to each cell. This level of attractiveness is basically a measure of crop growth.
Once the level of attractiveness of all cells is determined for a given day, the moths are simulated. The moths are simulated for all stages of their life cycle. For each day, and for each cell, the moths are simulated as a group. The amount of plant matter the moths eat each day is calculated and affects the amount of plants available the next day. Migration is taken into account during the flight stage of the moths' lives. Variables considered when determining where the moths migrate include wind direction, wind speed, and temperature.
The breakdown of the simulation into an object-oriented class hierarchy is shown in Figure 3 . This is a general description and was changed slightly in the final simulation.

FIGURE 3