Analiza și Modelarea Sistemelor Software - Lab 5

Traian Șerbănuță

2025

Timing Diagrams

Timing Diagrams — Quick Refresher

Key Elements:
- Lifelines
- States / Value changes
- Timing constraints
- Duration and time markers
- Messages and asynchronous events

Timing diagram example

Exercise Overview

You will create a Timing Diagram for a multi-sensor Collision Avoidance System (CAS) used by a drone.
The system integrates multiple periodic and event-driven signals, strict deadlines, and interrupt conditions.

System Components (Lifelines)

Your diagram must include all five.

Normal Timing Behavior

These periodic events continue unless interrupted.

Event: Obstacle Detected (FPS)

When FPS detects an object within 2.0 m:

  1. Sends CloseObstacle to APC immediately
  2. APC must respond within 25 ms with Brake to MC
  3. MC performs braking maneuver for 200 ms
  4. MC signals BrakeComplete when done

MC braking may be interrupted later by emergency events.

Event: Rapid Altitude Drop (ALT)

If ALT senses a drop > 0.5 m within 100 ms:

  1. ALT sends RapidDrop to APC
  2. APC must send Ascend to MC within 40 ms
  3. MC applies upward thrust for 300 ms

APC’s internal update cycle continues during this.

Event: Vision Override (VPU)

If VPU classifies an obstacle as Critical:

  1. APC overrides all previous commands
  2. Sends EmergencyStop to MC within 15 ms
  3. APC broadcasts CriticalObstacle to FPS, ALT, and VPU
  4. MC halts any action (braking or ascending) immediately

This takes precedence over all other behaviors.

Interaction Rules

Student Task

Create a UML Timing Diagram showing:

Tips

Communication Diagrams

UML Communication Diagrams Refresher

Communication diagram example

Communication Diagram modelling exercise (summary)

Model two autonomous warehouse robots that negotiate access to a shared loading bay, using a UML Communication Diagram.

Scenario Overview

A distributed system coordinates autonomous warehouse robots that negotiate access to a shared loading bay.

Key components:

Robots must request access, negotiate conflicts, and handle overrides and safety events.

Normal Behavior

  1. Robot A and Robot B each send AccessRequest to the Bay Controller (BC).
  2. BC queries the Task Scheduler (TS) for priority values.
    • TS returns priority scores for each robot.
  3. BC grants the bay to the robot with higher priority and sends AccessGranted.
  4. BC sends AccessDenied to the losing robot.

Negotiation Phase

If both robots have equal priority:

  1. BC initiates a TieBreak procedure:
    • BC sends NegotiationStart to both robots.
  2. Robots exchange Proposal and CounterProposal messages directly.
  3. After exchanging proposals, both robots send FinalOffer to BC.
  4. BC selects the best offer and grants access accordingly.

Safety Override Behavior

At any time:

On receiving ProximityAlert:

Additional Constraints

Students must incorporate:

Task

Produce a UML Communication Diagram showing:

  1. Objects / Lifelines
    • RobotA, RobotB, BC, TS, CM, FM
  2. Links
    • Show communication paths (e.g., BC - TS, Robot - Robot, etc.)
  3. Message Flows
    • Access request cycle
    • Priority request to TS
    • Tie-break negotiation if required
    • Safety override sequence
  4. Message Numbering
    • Use hierarchical numbers (e.g., 1, 1.1, 1.2, 2, 3.1, 3.1.1…)
  5. Conditional & Loop Indicators
    • Show repeated proposal exchanges
    • Show priority-equality decision branches
  6. Interrupt Modeling
    • Show how ProximityAlert interrupts negotiation
    • Show BC → Robot abort sequence
    • Show BC → FM reporting
    • Show FM’s commands

Expected Complexity

Students must represent:

This typically results in 15–30 messages and multiple branches.