## 2 Materials and Methods
### MRSA and CAs as the Primary Agents  
The CAs represent a specific type of an RA, which provides services in the form of passage to the MRSAs. An MRSA is both a TA and an RA. They are mobile; they search for a route consisting of services, using exploration and intention D-MASs. As RAs, they provide transportation for MPAs.  
An MRS does not possess any sensors to detect other MRSs, and thus, it cannot avoid collisions by itself (R2). With its optical sensors, it can only reliably evaluate its presence at a physical node (i.e., a center of a crossroad).  
An MRSA (and its counterpart MRS), when it is situated at a crossroad, occupies almost its entire area (including its virtual segments). Therefore, a CA can only be reserved by one MRSA at a given time. The problem occurs when an MRSA is moving. Its position between two physical nodes is unknown. Thus, an MRSA needs valid reservations at both CAs while moving between them.  
A reservation of an MRSA can be cleared once the next physical node has been successfully identified by the MRS. When two consecutive CAs (including their virtual segments) are reserved, they form a logical segment; see Figure 5. Only one MRSA per logical segment is allowed. The segment between two physical nodes is called a physical segment; see Figure 5. A physical segment is divided into two virtual segments by a virtual node. The logical segment, unlike the physical segment, includes all virtual segments of both crossroads. The physical segment defines the time interval that needs to be reserved for a passage at a given velocity.  
Thus, a logical segment can, at a given time, be reserved by only one MRS. This is the first coordination rule, CR1, and it addresses R2. The reservations themselves address R4.  
An MRSA needs to activate a reservation on the following crossroad in order to enter it. There are four types of activation; see Figure 6:  
* **A**: Starting activation. At the beginning of the simulation or after the addition of an MRSA to the virtual reality, an MRSA activates the reservation of the crossroads it resides on.
* **B**: \"Hit the road\" activation. Just before an MRSA leaves its first crossroad, it tries to activate the reservation at the second crossroad of its route.
* **C**: Forward activation. If moving, an MRSA will continue straight ahead after the next crossroad (i.e., it is not stopping or turning); it tries to activate the reservation of the crossroad that is the second one in the order. This activation is performed on a virtual node.
* **D**: Turning activation. If the moving MRSA will turn (left or right) at the next crossroad, it tries to activate the reservation of a crossroad that is the second in the order. In that case, the activation is performed after the turning.  
Deactivation of an activated reservation is performed after an MRS (in the virtual reality an MRSA) successfully arrives at the following crossroad. Because of the disturbances (MRS delays, loss of communication link, etc.), the arrival may not happen. In the case of activated reservations, intention pheromones (IPs) do not evaporate and they cannot be erased. If an MRS does not receive a message from MRSA that authorizes entering the second crossroad in the list, it simply stops at the next one (with the already-activated reservation). The active reservation prevents other MRSAs from entering the occupied crossroad. If an activation of a reservation fails, an MRSA will force its counterpart to stop. If there is a breakdown of an MRS (for simplicity, imagine discharged batteries), the MRS will stop somewhere between the crossroads; both crossroads stay reserved in the virtual reality.