# Petri Net Toolbox for Multi-Robot Planning under Uncertainty
## 3 Materials and Methods
### Application-Solarfarm Inspection
So if when one small UGV discharges it cannot move, and has to wait until the Warthog decides to move to that location. Figure 13 depicts the small UGV action models. Figure 13 (Left) shows the navigation action model instantiated between panel 1 and panel 2. The immediate transition _GoPanel1-Panel2 HighBat_ captures the action selection and the timed transition _ArrivedPanel1-Panel2 HighBat_ models the traverse time uncertainty. The weights of the immediate transitions _DischargedPanel1-Panel2 HighToHigh_ and _DischargedPanel1-Panel2 HighToLow_ create the probability distribution that captures the probability of the battery level dropping to low or not. This is possible due to the extension introduced in Section 3.2. The navigation model is replicated for every edge of the topological map. Figure 13 (Center) shows the inspection action model in panel 1. This model is similar to the navigation model with the difference that the action selection transition _InspectPanel1 HighBat_ has an extra input place (_r.InspectionRequiredPanel1_) and an extra output place (_r.AlreadyInspected_). The tokens in these places do not represent robots, instead act as memory places that limit to one the amount of times a solar panel can be inspected each round. There is one _r.InspectionRequiredPanel_ place per panel, while the _r.AlreadyInspected_ is unique. So when a panel is inspected a token is consumed from the _r.InspectionRequiredPanel_ place and created on the _r.AlreadyInspected_. When all panels are inspected the _r.AlreadyInspected_ output transition fires and these tokens flow back to the _r.InspectionRequiredPanel_ places. This ensures that the system only inspects the same panel again when all the other panels have been inspected. The toolbox interprets the characters _r._ before the place name, and takes that place as a special place, treating the tokens inside as system resources and not as robots. This has no consequence in the model synthesis, but has an impact in the task plan execution. During execution, these tokens are not mapped into robots and do not interact with any action server. These work as another state factor, creating memory that enables the distinction between states before and after the inspection action is executed. The inspection model is replicated for all topological map nodes, except the _center_ node. Figure 13 (Right) shows the recharging model. This GSPNR acts as interface between the small UGVs and the large UGV models since recharging is an action that requires synchronized cooperation between both robots. This synchronization is ensured since the transition _ChargePanel1_ is only enabled when at least one small UGV with low battery is on the same location as the large UGV. To capture multiple battery levels for each individual robot we propose a novel approach that is depicted in Figure 14. The GSNPR model that captures the small UGVs' navigation and inspection actions is replicated as many times as there are battery levels. Then, all the discharging transitions that lead to a lower battery level are connected to the level immediately bellow. Thus, the tokens that represent robots with the battery fully charged are flowing in the part of the GSPNR that corresponds to _level 1_. Once one of these robots loses some percentage of battery charge, the discharging transitions fire, and the token moves to _level 2_. When the robot is fully discharged and is nearby a large UGV it is able to select the recharge action and that moves the token back to _level 1_. This approach is more efficient in terms of state space size when compared to building a GSPNR per robot and model individually its battery level. Figure 13: (Left) Navigation model with battery discharging transitions; (Center) Inspection model with battery discharging transitions and number of inspections counter; (Right) Recharging model. The goal is to inspect all panels as quickly as possible and as many times as possible. Therefore, the defined reward function yields a reward of \(+200\) for every solar panel inspection transition fired.