In order to develop the WNW-MAGS System, we applied an 'Agile' 
analysis and design method which favours the collaboration with domain
specialists and users, as well as quick adaptations of the software
under development. We also applied classical knowledge engineering
in order to acquire domain knowledge from the specialized literature
and from domain experts (entomologists and ornithologists) after many
work sessions. We then went through an exploration phase of the field
by gathering the maximum useful information in order to understand all
the phenomena which are related to the spread of WNV. We present in
this section the conceptual architecture which is used as a basis of
the simulation system. We also present the mathematical model which was
chosen and adapted in order to compute the dynamics of the populations
involved in the transmission of the WNV. We also present a subset of
the relevant data which is used to feed the system. Finally, we present
the implantation of the system.
Based on the requirement specifications and using the conceptual model of the phenomena (see Figure 2
in section 2.2), we designed a conceptual architecture of the WNV-MAGS
system which includes all the needed system components and their
relationships . While constructing this architecture, we identified all the processes to be developed (represented as rectangles numbered as Pi in Figure 11) and all the data stores (represented as ovals numbered as Ai in Figure 11) that gather data and feed the system processes. Indeed, most of the necessary data are obtained from external databases (EPOQ , Weather data, etc.) and GIS. They are represented as 'cylinders' at the bottom of Figure 11.
Figure 11. Conceptual architecture of the system (based onEPASmethod).
Figure 12. (a) Differential equations of Wonham's mathematical model, and (b) the new equations of the proposed model.
architecture is divided into four parts. The first part (processes P1
to P4) deals with data preparation, including the extraction of data
from all the required databases. The second part (processes P5 and P6)
computes the evolution of populations using the mathematical model
presented in Section 4.2. The third part (processes P7 and P8) deals
with the interactions between the sub-populations of crows and the
sub-populations of Culex. It reflects the interactions
between the agents' roosts and the intelligent density map. The last
part (processes P9 to P12) is responsible for the management of
scenarios, as well as for the display, analyses and calibration of the
results. We used different databases (as presented in Section 4.3) in
order to initialize the populations of Culex and crows at time t0 (beginning of the simulation). We used these populations to compute the dynamics of crows, the dynamics of Culex and the interactions between the two populations while increasing the time by one step, at time t. Then, we get the new populations at time t+1 (taking
into account the state changes of the sub-populations of mosquitoes and
crows reflecting the infection spread and deaths) and the system
triggers again the same processes to simulate the joint evolution of
the two populations. The simulation results can then be displayed on
the map. Domain specialists can also calibrate the simulation using the
WNV surveillance data (that we have pre-processed). The user can
manipulate the results and create various scenarios. Then, the
simulation results can be assessed and compared.
We need to compute the evolution of the populations of Culex and
the populations of crows in order to simulate their interactions using
the geosimulation system. To this end, we selected the model proposed
by Wonham and colleagues  to compute the dynamics of the two populations. This model is based on 8 differential equations (Figure 12a) which can compute over time the evolution of the different categories of individuals (called 'compartments'): susceptible,infected, recovered and dead birds, the larvae of mosquitoes and the susceptible, exposed and infected adult
mosquitoes. We proposed some modifications in order to correct some
discrepancies that we found in the model. We also included climate
effects in the model using the work of Madder and colleagues 
as a starting point. This was a difficult task because the model was no
longer in equilibrium and this required several modifications to the
differential equations . Figure 12b presents an overview of the new equations of the proposed model. We notice that the birds equations (dSBJ/dt, dIBJ/dt, dRBJ/dt, dXBJ/dt) have an index j which
represents a different bird species that we want to include in the
simulation. Climate effects are computed using another set of equations
that is not presented in this paper. These equations modify certain
parameters in the differential equations of Figure 12b. For example vxL in the dLM/dt equation
represents the rate of progress of larvae toward the state of nymphae,
this rate depends on temperature conditions defined in a different set
of equations. The adjusted model gives satisfactory results in terms of
quality (e.g. distribution of the mosquitoes' generations). Indeed, the
pace of the established curves reflects the biological behaviours of
the studied species if we refer to the specialized literature. However,
the quantitative results (e.g. the number of larvae, eggs, emerged Culex,
dead crows, etc.) had not been conclusive with the first results of the
simulation. We corrected this problem with the calibration of the
system as presented in Section 2.4.
Preparation of data
We already mentioned that our approach takes advantage of GIS data
in order to properly locate the agents' roost in space. Indeed, we used
the Geomedia GIS software in order to handle the geo-referenced data of
the DMTI Spatial (CanMap Streetfiles) and the digital maps of INSPQ.
Using this data, we created the bitmap from which the MAGS platform
generates the simulation environment. This bitmap contains polygons
representing a list of 945 municipalities (out of a total of 1476 for
the whole province of Quebec) being part of the ecumene (inhabited part
of the studied region) of the geographical area of interest. Moreover,
this bitmap is also used by the intelligent density map presented
earlier (see Figure 3 in section 2.3).
In addition, we had to pre-process all the data needed to feed the system (see processes P1 to P4 of the conceptual architecture in Figure 11, section 4.1). We estimated the initial populations of Culex and crows at the beginning of the simulation. For the population of crows, we used the SAS statistical software and the MapInfo GIS
to compute a specific density of birds per region (number of
individuals by square kilometer). This done by estimating an average of
the sighting mentions provided by professional or amateur
ornithologists (from 1997 to 2005 and located inside the ecumene) using
the ÉPOQ database  (Table 2).
We also processed the data relative to crows' roosts (obtained through
an email survey involving expert birders or extracted from the ÉPOQ database ).
This data included the co-ordinates (latitude/longitude) as well as an
approximate number of individuals for each mentioned roost. We computed
an average of the number of individuals in the case of several records
of the same roost (same latitude and same longitude). This data is used
to characterise the roost agents (Table 3).
Moreover, we studied the literature and discussed with domain experts
in order to collect relevant information about crows' behaviours. We
used this information in order to specify some behavioural rules for
the roost agent such as the way that particles spread around the roost
to simulate the birds' daily search for food.
Table 2. Results of SAS analysis to compute an average density of crows per area by considering the mentions extracted from the ÉPOQ database (1997–2005)  and which are located inside the ecumene.
Table 3. Mentions of roosts reported by ornithologists or extracted from the ÉPOQ database (1997–2005) .
Considering the Culex population,
we computed the number of individuals of the initial population,
estimating the number of adults that emerge from the larvae laid down
in sumps (which we supposed to be the main reservoirs of mosquitoes in
urban and sub-urban areas). To this end, we developed a Visual Basic
application in order to query the geo-referenced databases in Geomedia
and to compute the total length of roads for each municipality of
interest. We then computed the number of sumps in each municipality by
using the total length of roads (Table 4).
We assumed that there is an average of one sump for each 30 linear
meters of road. This average distance conforms to the standards used by
the Ministère des transports du Québec (MTQ) when they
install sumps. However, the user of the WNV-MAGS system can modify this
value, since it can vary in relation to the considered regions such as
urban and rural areas. We also assumed that there are only 20% of sumps
containing larvae. This default value can also be modified by the user
as well as the average number of Culex adults which emerge
from a sump at the beginning of a simulation. These numbers were
obtained by consulting data provided by the SOPFIM Company  in relation to the monitoring of larval and adult Culex in certain Quebec regions during the summer of 2005.
Example of the results obtained in order to calculate the length of the
roads of the municipalities using the data of the DMTI Spatial (CanMap
Furthermore, we used a DLL which
enables us to integrate the climate data into the system. This DLL
represents one of the functionalities of the BIOSIM software .
We used it to interpolate values for temperature and precipitations at
certain precise locations on the territory, taking into account the
data of the four neighbouring weather stations and the elevation data.
This computation can be done using either real data or the Canadian Climate Normals  which are produced over several years.
Implementation of the system
After the data preparation, we implemented the system using the MAGS
platform which is developed in C++. This simulator includes several
modules performing various tasks. It contains a controller to manage
the threads of application (Processes Module), a user Interface and a
module managing the simulation environment (Environment Module). In
addition to these modules, MAGS contains a module in charge of data
display, modules to specify agents' populations and agents' behaviours,
and a module simulating particle systems. In order to simulate the
propagation of the WNV, we added a module which simulates an epizooty
(Epizootic Manager) which has been developed in a generic way in order
to be easily extended to simulate epizooties different from WNV (Figure
Figure 13. Various components of the technical system architecture (the epizootic module was added to the pre-existing MAGS components).