## Appendix D
_Choice of Data Structure_: The list data structure was chosen for its simplicity and capability to dynamically add segments. _Complexity Reasoning_: Creating each FMS object has a time complexity of O(1), while performing this operation n times results in a time complexity of O(n). * _Step 2. Adding POIs to FMS Operation is One Step_: Each Point of Interest (POI) is added individually to its corresponding Fleet Management System (FMS). _Choice of Data Structure_: Using lists within each segment enables the dynamic addition of POIs. _Complexity Reasoning_: The addition of a single Point of Interest (POI) has a time complexity of O(1), while the space complexity O(m\(\times\)n) considers all POIs over all segments. * _Step 3. External Loop over Segments Operation is One Step_: Processes each segment once during iteration. _Choice of Data Structure_: A list allows for sequential traversal of elements. _Complexity Reasoning_: Iterating through all segments once results in a linear time complexity. * _Step 4. Log Procedure (Ex-Loop) Operation is One Step_: Records one entry, usually a brief procedure. _Choice of Data Structure_: Logging to file or memory is efficient for individual entries. _Complexity Reasoning_: Logging is classified as an operation with constant time complexity, independent of input size. * _Step 5. Operational Procedures (Ex-Loop) Operation is One Step_: Carries out predetermined procedures without repetition. _Choice of Data Structure_: Procedural algorithms operate regardless of the size of the data structure chosen. _Complexity Reasoning_: These methods often exhibit a constant time complexity since they involve minimal data processing. * _Step 6. Load Next Segments (Ex-Loop) Operation is One Step_: Enqueues or dequeues the next segment for processing in a single step. _Choice of Data Structure_: A queue arranges elements in a First In, First Out (FIFO) order. _Complexity Reasoning_: Queue operations have a constant time complexity, while the space complexity increases proportionally with the number of segments. * _Step 7. Internal Loop over POIs Operation is One Step_: Each Point of Interest (POI) inside a segment is processed one after the other. _Choice of Data Structure_: A list allows for easy iteration across Points of Interest (POIs). _Complexity Reasoning_: Iterating over Points of Interest (POIs) in a segment exhibits linear complexity relative to the number of POIs (m). * _Step 8. Communication and Situational Awareness (In-Loop) Operation is One Step_: Perform a check or communication for each Point of Interest (POI). _Choice of Data Structure_: A procedural method designed specifically for the purpose, regardless of the complexity of the data structure. _Complexity Reasoning_: Each operation is assumed to have a constant time complexity, regardless of the quantity of the data being processed. * _Step 9. Handling Redirect (Change of Route) (In-Loop) Operation is One Step_: It modifies the route according to new information for a Point of Interest (POI). _Choice of Data Structure_: Decision making does not depend on a sophisticated data structure. _Complexity Reasoning_: The procedure has a constant time complexity, provided that the conditions for redirection can be immediately evaluated. * _Step 10. Handling TimeStall (Delay) (In-Loop) Operation is One Step_: Executes a delay or pause based on specific requirements, completing one operation. _Choice of Data Structure_: Procedural latency is independent of the underlying data structure. _Complexity Reasoning_: The time complexity of the operation is O(1) due to a fixed or context-specific delay. * _Step 11. Log Procedure (In-Loop) Operation is One Step_: Records details related to the In-loop procedures. _Choice of Data Structure_: Implementing a logging method optimized for fast entry writing. _Complexity Reasoning_: Constant time complexity is achieved by efficiently logging a single entry. * _Step 12. Final Log Procedure (Ex-Loop End) Operation is One Step_: Indicates the conclusion of a loop or a big achievement.