Developing an Agent-Based Model for Haplodrassus ruﬁpes (Araneae: Gnaphosidae), a Generalist Predator Species of Olive Tree Pests: Conceptual Model Outline †

: Olive growing has been facing major sustainability challenges due to intensiﬁcation, resulting in an increased use of pesticides and fertilizers and, consequently, in the depletion of natural resources and loss of biodiversity and landscape values. This has created an urgent need to develop models for managing complex agroecosystems that integrate factors affecting food quality, sustainability and biodiversity, providing a supporting technique to understand the consequences of agricultural management for ecosystem services. We are developing an advanced agent-based simulation (ABS) applied to olive groves to model the effects of farming practices on the abundance of olive pest predators. ABS is a modeling technique where agents represent animals (predator arthropods, in our case) acting in their environment. Our model is based on an ABS system developed by Aarhus University, the ALMaSS, which comprises highly detailed farm management and spatial structures to construct dynamic landscapes where agents operate. In this work, we present the conceptual model for one of the selected species, Haplodrassus ruﬁpes (Araneae: Gnaphosidae).


Introduction
The dissemination of intensive agricultural practices and land use dedicated to monocultures are tendencies spreading across the Portuguese rural landscape.This type of agriculture involves the use of large amounts of pesticides, fertilizers and water, causing the degradation and depletion of soil and groundwater, the loss of biodiversity and a decrease in landscape values.This represents a major challenge to the sustainability of the olive sector in the long term.Agent-based simulation (ABS) is a computer tool that can be applied to agroecosystem science in order to predict the behavior of animal species exposed to multiple stressors [1,2], including those derived from the intensification of agriculture.In this modeling technique, agents represent animals operating in their environment.To develop such a model, (1) the life history of the animal is delineated, (2) a conceptual model is outlined based on that life history and (3) the conceptual model is coded into a system that allows simulations.In this paper, we present the applied methodologies of the development of an agent-based conceptual model for Haplodrassus rufipes (Araneae: Gnaphosidae), and early stage results, using the ALMaSS framework, for the study period 2011 and 2012, applied to olive groves to model the effects of farming practices on the abundance of H. rufipes.
H. rufipes is a generalist twilight predator, part of a group of predator arthropods that inhabit olive groves and constitute complementary control agents against olive tree pests [3].Its main habitat is soil under stones, where it finds refuge, feeds and breeds [3].H. rufipes development has different stages, from the egg to adult stage.At the end of each growing period, called an instar, the entire cuticle is replaced by a new one through a process called molting.From hatching until reaching adulthood, H. rufipes passes 2 + n instars, two inside the eggsac, (observed in the laboratory for H. rufipes, and also based on research of [4], for Haplodrassus signifier), a silken case containing the eggs, usually placed under stones and guarded by the mother, and n outside the eggsac, as a spiderling, until it finally becomes an adult.

Study Area
The study area (Figure 1) consists of a square 10 km 2 landscape window, located in the northeast of Portugal.The climate is temperate with rainy winters and hot and dry summers, according to the Köppen classification [5].Daily records of air temperature, soil temperature and precipitation measured during the study period (2011 and 2012) at the meteorological station operated by the Instituto Português do Mar e da Atmosfera (IPMA), represented by a yellow circle in Figure 1, are shown in Figure 2. Land cover consists mainly of olive orchards, temporary crops and pastures.Forests also represent an important part of the land cover in the study area, mostly in the southeastern region.Urban areas are less represented, with a part of the city of Mirandela appearing in the southwestern corner of the study area.
applied to agroecosystem science in order to predict the behavior of animal species ex posed to multiple stressors [1,2], including those derived from the intensification of agr culture.In this modeling technique, agents represent animals operating in their environ ment.To develop such a model, (1) the life history of the animal is delineated, (2) a con ceptual model is outlined based on that life history and (3) the conceptual model is code into a system that allows simulations.In this paper, we present the applied methodologie of the development of an agent-based conceptual model for Haplodrassus rufipes (Araneae Gnaphosidae), and early stage results, using the ALMaSS framework, for the study perio 2011 and 2012, applied to olive groves to model the effects of farming practices on th abundance of H. rufipes.
H. rufipes is a generalist twilight predator, part of a group of predator arthropods tha inhabit olive groves and constitute complementary control agents against olive tree pest [3].Its main habitat is soil under stones, where it finds refuge, feeds and breeds [3].H rufipes development has different stages, from the egg to adult stage.At the end of eac growing period, called an instar, the entire cuticle is replaced by a new one through process called molting.From hatching until reaching adulthood, H. rufipes passes 2 + instars, two inside the eggsac, (observed in the laboratory for H. rufipes, and also based o research of [4], for Haplodrassus signifier), a silken case containing the eggs, usually place under stones and guarded by the mother, and n outside the eggsac, as a spiderling, unt it finally becomes an adult.

Study Area
The study area (Figure 1) consists of a square 10 km 2 landscape window, located i the northeast of Portugal.The climate is temperate with rainy winters and hot and dr summers, according to the Köppen classification [5].Daily records of air temperature, so temperature and precipitation measured during the study period (2011 and 2012) at th meteorological station operated by the Instituto Português do Mar e da Atmosfer (IPMA), represented by a yellow circle in Figure 1, are shown in Figure 2. Land cove consists mainly of olive orchards, temporary crops and pastures.Forests also represent a important part of the land cover in the study area, mostly in the southeastern region.Ur ban areas are less represented, with a part of the city of Mirandela appearing in the south western corner of the study area.

The ALMaSS Framework
The model for H. rufipes was developed under the framework of the Animal, Landscape and Man Simulation System (ALMaSS) [1].This framework combines ABS for animals with a dynamic landscape simulation, allowing one to observe how the changing landscape, due to climate and farm management events, affects key animal species.In this study, the landscape map is the study area showed in Figure 1, a 10 × 10 km area, where to each vegetation patch a geographic information system (GIS) polygon is assigned.The framework has a spatial resolution of 1 m, and a selectable time step, which in this case is 1 day.It responds to daily climate variable inputs and farm management events (a set of farm events that happen in each GIS polygon of the landscape), that act on the landscape and on the agent-based models of animals.

Methodology for the Development of the Conceptual Model for H. rufipes
Features, values, simplifications and assumptions of the conceptual model for H. rufipes were set according to data collected from the literature about this spider species and other Haplodrassus or Gnaphosidae species, and also through laboratory experiments and field observations.The literature review was especially oriented to (a) the understanding of the life history of H. rufipes, which allowed us to establish the life stages and the respective functions of: (1) development, (2) mortality, (3) overwintering, (4) movement and (5) reproduction, and (b) the collection of data for the variables that influence H. rufipes life history.
Climate series for the years 2011 and 2012 were provided by IPMA in an hourly format and pre-processed and converted to a daily format using R [6].Daily temperatures were obtained by calculating the average of the 24 hourly measurements of each day, and daily precipitation was obtained by calculating the sum of the same data.

Conceptual Model for H. rufipes
Figure 3 shows a scheme of the main features of the model being built for H. rufipes.The life stages considered for each individual were (1) egg, (2) spiderling and (3) adult.Individuals entered the next life stage if they did not die first.Only female individuals were considered, because they are the ones that limit the size of next generation of individuals.Figure 3 also shows the functions that apply to the individual in each life stage.These functions depend on variables including daily soil temperature (T-°C), because this is a spider that lives on the soil surface and topsoil (0-0.3 m), daily precipitation (Pmm), refuge (a categorical variable expressing the abundance of stones of each GIS polygon in the landscape), food availability (a categorical variable expressing the abundance

The ALMaSS Framework
The model for H. rufipes was developed under the framework of the Animal, Landscape and Man Simulation System (ALMaSS) [1].This framework combines ABS for animals with a dynamic landscape simulation, allowing one to observe how the changing landscape, due to climate and farm management events, affects key animal species.In this study, the landscape map is the study area showed in Figure 1, a 10 × 10 km 2 area, where to each vegetation patch a geographic information system (GIS) polygon is assigned.The framework has a spatial resolution of 1 m, and a selectable time step, which in this case is 1 day.It responds to daily climate variable inputs and farm management events (a set of farm events that happen in each GIS polygon of the landscape), that act on the landscape and on the agent-based models of animals.

Methodology for the Development of the Conceptual Model for H. rufipes
Features, values, simplifications and assumptions of the conceptual model for H. rufipes were set according to data collected from the literature about this spider species and other Haplodrassus or Gnaphosidae species, and also through laboratory experiments and field observations.The literature review was especially oriented to (a) the understanding of the life history of H. rufipes, which allowed us to establish the life stages and the respective functions of: (1) development, (2) mortality, (3) overwintering, (4) movement and (5) reproduction, and (b) the collection of data for the variables that influence H. rufipes life history.
Climate series for the years 2011 and 2012 were provided by IPMA in an hourly format and pre-processed and converted to a daily format using R [6].Daily temperatures were obtained by calculating the average of the 24 hourly measurements of each day, and daily precipitation was obtained by calculating the sum of the same data.

Conceptual Model for H. rufipes
Figure 3 shows a scheme of the main features of the model being built for H. rufipes.The life stages considered for each individual were (1) egg, (2) spiderling and (3) adult.Individuals entered the next life stage if they did not die first.Only female individuals were considered, because they are the ones that limit the size of next generation of individuals.Figure 3 also shows the functions that apply to the individual in each life stage.These functions depend on variables including daily soil temperature (T-• C), because this is a spider that lives on the soil surface and topsoil (0-0.3 m), daily precipitation (P-mm), refuge (a categorical variable expressing the abundance of stones of each GIS polygon in the landscape), food availability (a categorical variable expressing the abundance of food of each GIS polygon in the landscape, and dependent only on farm management events) and farm management events.
Biol.Life Sci.Forum 2021, 4, 45 4 of 9 of food of each GIS polygon in the landscape, and dependent only on farm management events) and farm management events.

Development
Development rates, r (day −1 ), of the individuals at egg and spiderling life stages are dependent on T. We used the linear day-degree model, as referred to in [7] to express these rates: where Td is the lower temperature threshold for development (°C) and K is the duration of the stage, a measure of the physiological time required for the completion of a developmental process, in day-degrees (dd) (Table 1).The upper threshold for development was not considered because it was assumed that this spider is adapted to the climate of the study area, being able to regulate the heat to which its eggs are subjected by placing them under stones where they develop correctly [8]. 1 Laboratory experiment: the eggsac takes 20 days to develop at a controlled temperature of 21 °C. 2  Assumption: if two instars inside the eggsac take 20 days to develop at a controlled temperature of 21 °C, we consider a linear relation between the number of days and number of instars.We also consider it reasonable that a spider should undergo three instars outside the eggsac before reaching adulthood.This way, three instars outside the eggsac would take 30 days developing at 21 °C.
Spiderling development rate was dependent on the categorical variable food availability, assigned to each GIS polygon.The development rate was multiplied by a factor related to the food availability category (Table 2).Food was considered as a non-limited item for the spider, because it is a generalist and does not depend only on prey biomass where T d is the lower temperature threshold for development ( • C) and K is the duration of the stage, a measure of the physiological time required for the completion of a developmental process, in day-degrees (dd) (Table 1).The upper threshold for development was not considered because it was assumed that this spider is adapted to the climate of the study area, being able to regulate the heat to which its eggs are subjected by placing them under stones where they develop correctly [8]. 1 Laboratory experiment: the eggsac takes 20 days to develop at a controlled temperature of 21 • C. 2 Assumption: if two instars inside the eggsac take 20 days to develop at a controlled temperature of 21 • C, we consider a linear relation between the number of days and number of instars.We also consider it reasonable that a spider should undergo three instars outside the eggsac before reaching adulthood.This way, three instars outside the eggsac would take 30 days developing at 21 • C.
Spiderling development rate was dependent on the categorical variable food availability, assigned to each GIS polygon.The development rate was multiplied by a factor related to the food availability category (Table 2).Food was considered as a non-limited item for the spider, because it is a generalist and does not depend only on prey biomass (which is a function of crop growth, represented by leaf area index and biomass metrics).H. rufipes can eat food available in the soil, especially under stones, when there is less food available on the vegetation (e.g., prey, nectar, blackscale honeydew, etc.) because of farm management and/or climate occurrences.This way, we classify the food availability into two categories: excellent, corresponding to no farm management events, and high, corresponding to when tilling, pesticide and fertilizer application and harvest occur.Mortality is a stochastic function reflecting actions that arise from the landscapeabiotic conditions and farm management-and from interaction with other species or developmental problems-biotic conditions.
To these factors different probabilities of spider mortality were assigned, based on reasonable assumptions subjected to further tuning (Table 3) which are implemented when each of them occurs.Abiotic mortality is related to extreme events-insufficient soil water content and floods.Note that mortality associated with low and high temperatures was not considered because this spider is well adapted to the low temperatures that occur in the study area, and its behavior of living under stones allows it to cope with high temperatures.
Farm management mortality was related to farming operations such as tilling, application of pesticides and fertilizers, and consequences of harvest.In addition, a set of specific mortality probabilities for each of the actions occurring in the different types of crops, particularly different types of olive groves, is developed.Pesticide application was considered to influence the mortality of spiders to a lesser extent as compared to fertilizer application or consequences of harvest.This is because, hypothetically, the spider is protected under stones from toxicity by contact.However, there was the possibility of ingestion of prey that were killed by pesticides.This possibility will be further appraised.
Biotic mortality was related to failures during the molting process (for spiderlings), parasitism and predation.
Failures during the molting process can occur when spiderlings molt.As the molting process takes less than the time step of the model (1 day), it was not considered for modeling.However, the associated mortality probability was run at the end of the spiderling life stage (when development finishes).
Parasitism and predation were included in a mortality category called daily mortality.Daily mortality was different when the spiders are active and when they overwinter.Although adults are considered immobile during egg development, they have daily mortality as active spiders (opposite to overwintering) because they walk during the twilight and return to the same place.

Overwintering
H. rufipes overwinters during the period of the year when temperature and food supplies are low.During this period, all individuals are immobile and do not eat.
In the model, because the first day of the simulation was defined to be 1 January, the simulation initiates when the spiders are overwintering, so there is a small period of overwintering at the beginning of the simulation.The number of day-degrees was calculated for the shortest overwintering period and for the normal period corresponding to the simulation running for the subsequent year.For this, the mean temperature of soil was calculated for the periods 1 January-21 March and 21 December-21 March, with a result of 7.75 • C and 7.71 • C, respectively.The day-degrees for the two intervals were obtained by multiplying the mean temperature of soil by the number of days of each period (Table 4).This way, to start movement and ability to reproduce, the spider accumulates daydegrees from the beginning of the year and starts dispersal when the sum exceeds a threshold, 620 dd, or at day 80 counted from the beginning of the year.On day 355, adults start overwintering until the end of the simulation (if it goes only until 31 December).They start dispersal when the sum exceeds a threshold, 694 dd, or at day 445 counted from the beginning of the first year of simulation.

Movement
Movement is a stochastic function that runs between a lower T threshold (T mi ) and an upper T threshold (T ms ) (Table 5).
Table 5. Lower and upper T threshold for movement (T mi -• C and T ms -• C, respectively).
Adults move more freely than spiderlings, except during the period of egg development.Each step corresponds to 1 m displacement.The tendency of a spider to occupy a particular polygon is determined by a categorical variable called refuge (Table 6).If the spider is in a GIS polygon with a low refuge category (equal or less than 2), it will walk the allowed maximum number of spatial steps, so it can try to get out of that polygon.If the spider is in a GIS polygon with a high refuge category (equal to 3), it will walk less than the allowed maximum number of steps.Table 7 shows the maximum number of steps that a spider can walk per day.An adult is considered immobile during the egg development period.This is because the movement during hunting ends always at the same place-the location of the eggs-and its duration (during twilight) is shorter to the time step of the model.In fact, Ref. [4] observed adult females near eggsacs in the field.Therefore, it is expected that adult females will stay close to their eggsacs, even when they hunt during twilight.Only the adults that are in polygons with category of refuge equal to 3 (Table 6) in spring may initiate reproduction.This way, each adult infers what day of the year it is, and if it is in the proper place.This place is like a nest, where the eggs will be laid.The adult starts laying eggs as soon as it stops overwintering.Depending on the time of the year, it will have a certain probability of reproducing.The high summer temperatures diminish the movement of spiders and therefore there may be no encounters between males and females for mating.Therefore, in our model, we set that there will be no ability to lay eggs from 1 July, the 182nd day of the year, onwards.We also consider that it will only reproduce in its first year of life.The assumed reproduction probabilities according to time of the year are shown in Table 8.Finally, during the period of development of the eggs, the probability of reproduction is 0. It has been observed in the lab that from each eggsac, an average of 20 spiderlings hatch.As we are only considering females in this model, we established that half of this number corresponds to females.This way, each adult lays two sets of eggs, each containing 10 eggs.Therefore, each adult lays 20 eggs.A set of eggs represents an eggsac.
Currently, the code being built for the H. rufipes model allows one to simulate the reproduction function in a generic landscape.Figure 4 shows the eggs laid by adults in two different steps of the simulation of reproduction of H. rufipes, using the ALMaSS framework in the generic landscape.It has been observed in the lab that from each eggsac, an average of 20 spiderlings hatch.As we are only considering females in this model, we established that half of this number corresponds to females.This way, each adult lays two sets of eggs, each containing 10 eggs.Therefore, each adult lays 20 eggs.A set of eggs represents an eggsac.
Currently, the code being built for the H. rufipes model allows one to simulate the reproduction function in a generic landscape.Figure 4 shows the eggs laid by adults in two different steps of the simulation of reproduction of H. rufipes, using the ALMaSS framework in the generic landscape.

Conclusions
The conceptual model for H. rufipes is outlined and has produced its first results in code development.The ABS is a valuable tool for ecological modeling.

Conclusions
The conceptual model for H. rufipes is outlined and has produced its first results in code development.The ABS is a valuable tool for ecological modeling.

Figure 1 .
Figure 1.Location of the study area © Google Earth.

Figure 1 .
Figure 1.Location of the study area © Google Earth.

Figure 2 .
Figure 2. Daily precipitation (mm) and mean air and soil temperature (°C) recorded at the meteorological station located in the study area, during the study period.

Figure 2 .
Figure 2. Daily precipitation (mm) and mean air and soil temperature ( • C) recorded at the meteorological station located in the study area, during the study period.

Figure 3 .
Figure 3. Life stages and respective functions for each individual, and variables on which those functions depend.

Figure 3 .
Figure 3. Life stages and respective functions for each individual, and variables on which those functions depend.3.1.1.Development Development rates, r (day −1 ), of the individuals at egg and spiderling life stages are dependent on T. We used the linear day-degree model, as referred to in [7] to express these rates: r = (T − T d )/K (1) Biol.Life Sci.Forum 2021, 4, 45 8 of 9

Figure 4 .
Figure 4. Two different steps of the simulation of H. rufipes reproduction using the ALMaSS framework in a generic landscape.The green and the purple dots represent respectively the H. rufipes adults and the eggs laid by them; (a) step 140 corresponding to 21 May, and (b) step 195 corresponding to 15 July.

Figure 4 .
Figure 4. Two different steps of the simulation of H. rufipes reproduction using the ALMaSS framework in a generic landscape.The green and the purple dots represent respectively the H. rufipes adults and the eggs laid by them; (a) step 140 corresponding to 21 May, and (b) step 195 corresponding to 15 July.

Table 1 .
Lower threshold for development (Td-°C) and duration of stage (K-dd) for the egg and spiderling life stages.

Table 1 .
Lower threshold for development (T d -• C) and duration of stage (K-dd) for the egg and spiderling life stages.

Table 2 .
Factor of multiplication of r according to food availability category.

Table 3 .
Probability of spider mortality for each life stage, according to actions.

Table 4 .
Day-degrees (dd) for overwintering according to period of the year.

Table 6 .
Category of refuge according to the main vegetation cover of each polygon.

Table 7 .
Maximum spatial steps that a spider can walk per day.

Table 8 .
Probability of reproduction according to the time of the year.Days are counted from the beginning of the year.D is the day the spider stops overwintering.

Table 8 .
Probability of reproduction according to the time of the year.Days are counted from the beginning of the year.D is the day the spider stops overwintering.