## 2 Materials and Methods
### Description of the MAS Model
#### 2.6.2 Entities  
Two main types of agents (Figure 5) are used in the model:  
* Hydrological agents that represent the flow of water in the form of \"water packets\" [42]. These are mobile agents, called \"turtles\" [39], which can move on the land cells. Under Netlogo, the term \"turtles\" is used to designate these agents. (In the rest of the report, the terms \"agentdrops\" and \"turtles\" refer to the same entity: the \"hydrological agent\".) * Immobile terrain agents, also called \"field cells\", each representing a portion of the space and possessing topographic and hydrological characteristics resulting from information coming from the input data, in particular, the digital terrain model (DTM). In Netlogo, these agents are referred to as \"patches\" (The terms \"cell\", \"field cell\", and \"patch\" refer to the same entity: the \"field unit\"). Each type of agent has a number of attributes, and is able to perform certain actions throughout the simulation. These attributes and actions are represented in Figure 5 by means of a class diagram. Figure 4: Overview of the software interface. The Hydrological Agent  
The hydrological agent, named here \"Agentdrops\", is an individual entity that moves _\"like a portion of flow in the simulation environment\"_[40]. These agents do not necessarily die on contact with the ground but can continue to exist, thus forming the surface flow. These agents are located in space and therefore have _spatial coordinates_ (x, y) that make them easy to locate at any time during the simulation. In order to give a better picture of the hydrological processes (runoff and infiltration), each \"agent-drop\" contains a discrete volume of water (represented by the variable _stock_in_water_). These hydrological agents also carry with them information that will be used as indicators when evaluating the connectivity of the spaces at the end of the simulation. This is made possible by the ability of the agents to memorise the name of the patch on which they are located at the beginning of the simulation (_start-patch_ variable), i.e., the zone where the flow was initiated. As the simulation progresses, the agentdrops that are at a given time in the same place (on the same terrain cell) will \"merge\" to form a single agentdrop. This \"merging\" is carried out by means of an action specific to agentdrops, the _concatenate_ action. All the attributes of these agentdrops will be combined and assigned to a new \"agentdrop\". This \"merging\" saves computing time and makes it possible to work with increasingly fine spatial resolutions. This aggregation also makes it possible to bring out interesting behaviours that could not otherwise be observed. In addition to the _concatenate_ action, the drip agents perform two main actions during the simulation: the _infiltrate_ action and the _runoff_ action. These last two actions are conditioned by hydrological (infiltration capacity, rain intensity) and topographical (altitude) parameters that require an interaction with the land cells. The Field Unit  
The spatial environment in which the \"agentdrops\" evolve is composed of a network of two-dimensional square cells that encompass the entire basin under study. This grid structure is based on the resolution of the digital terrain model (DTM). The resolution is 5 m \(\times\) 5 m (resolution of the RGE Alti provided by the IGN). Different attributes characterise these terrain cells. Some of them come directly from the input data in GIS format: spatial coordinates, _altitude_, _direction_ (the direction towards which a drip agent located on the cell should move), _target_ (the neighbouring patch towards which the drip agent moves based on the information provided by the direction data), _land use_ (pond, building, wood, grass, crop, garden, or orchard). The _outlet_ and _issue_ variables are \"true  
Figure 5: Class diagram describing the entities involved in the model. or false\" (Boolean) variables that indicate whether the patch concerned is an outlet or an issue.