## 4 Our Modeling Approach
### The Power of Hierarchical Modeling
This is decided by the driver.type information found in the token in \(p_{10}\). If it is an experienced driver, then \(E_{9a}\) will fire and then the experienced driver will be made available after a break of 30 to 90 min. Similarly, if it is an experienced driver, then \(E_{9b}\) will fire and then the inexperienced driver will be made available after a break of 30 to 90 min. (see the guardian expressions aside of Figure 9). The last nest, shipment-by-motorbike, is shown in Figure 10. Here, things are simpler as only inexperienced drivers are driving the motorbikes. Therefore, no guardian expressions are required and the events are much simpler. Place \(p_{7}\) that corresponds to the experienced drivers does not exist. In addtion, \(E_{9a}\) does not exist. The check is made  
Figure 7: Hierarchical modeling of the courier example. for available inexperienced drivers and motorbikes and, if found, the shipment is made. Notice the timing expression near \(E_{9b}\): an inexperienced driver that completes a shipment is entitled to a 10-30 min break. Table 5 gives the meaning of all the places found in the model. In this table, SRN stands for Shipment Plan Nest, SBLN stands for Shipment By Lorry Nest, SBCN stands for Shipment By Car Nest, and SBMN stands for Shipment By Motorbike Nest. To conclude, we present the class declarations for the entities involved in this model. Figure 10: Hierarchical modeling of the courier example: shipment-by-motorbike. \begin{table}
\begin{tabular}{l l} \hline \hline
**Place** & **System State** \\ \hline SPN.\(p_{1}\) & Request for a shipment \\ SPN.\(p_{2}\) & Register completed, check weight \\ SPN.\(p_{3}\) & Register completed, check distance \\ SPN.\(p_{4}\) & Weight determined for decision \\ SPN.\(p_{5}\) & Distance determined for decision \\ SPN.\(p_{6}\) & Shipment decision taken \\ SBLN.\(p_{7}\) & Available lorry \\ SBLN.\(p_{8}\) & Available experienced driver \\ SBLN.\(p_{9}\) & Available inexperienced driver \\ SBLN.\(p_{789}\) & Ready to ship by lorry an experienced and an inexperienced driver \\ SBLN.\(p_{10}\) & Shipment finished, experienced driver break \\ SBLN.\(p_{11}\) & Shipment finished, inexperienced driver break \\ SBCN.\(p_{7}\) & Available car \\ SBCN.\(p_{8}\) & Available experienced driver \\ SBCN.\(p_{9}\) & Available in experienced driver \\ SBCN.\(p_{789}\) & Ready to ship by car and one driver either experienced or inexperienced \\ SBCN.\(p_{10}\) & Shipment finished, experienced or inexperienced driver break \\ SBMN.\(p_{7}\) & Available motorbike \\ SBMN.\(p_{9}\) & Available inexperienced driver \\ SBMN.\(p_{79}\) & Ready to ship by motorbike and an inexperienced driver \\ SBMN.\(p_{11}\) & Shipment finished, inexperienced driver break \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Description of places for the courier company model. **Class vehicle** The class Vehicle has the following characteristics:  
Class Vehicle ( number_of_wheels, plate_ID, weight, speed, used_for,driven_by)  
There are three instances of class vehicle: Lorry, car, and motorbike, each with different characteristics. The driven_by characteristic is Experienced for Lorries, Experienced and Inexperienced for cars, and Inexperienced for motorbikes. **Class Employee** The class Employee has the following characteristics:  
Class Employee ( first_name, last_name, ID, years_of_experience, salary)  
The years_of_experience characterize each employee as experienced or inexperienced. In our model, all employees with more than 3 years of experience are considered to be experienced, otherwise they are considered to be inexperienced. There are three instances of Employee: Officers, Managers, and Drivers. Class Shipment ( shipment_ID, distance, weight, vehicle_type, employees, start_time, end_time, break_time)  
This class is used to keep the data about each shipment. These data can be used to examine the efficiency of the drivers and the of the whole company. The vehicle_type characteristic records the vehicle used for a shipment.