B1.1.3: Activity: Designing a Smart City Traffic Management System

Scenario

A growing city is experiencing severe daily traffic congestion. The city council wants an automated Smart City Traffic Management System to optimize traffic light timing, handle emergency vehicle rerouting, and notify drivers of delays in real time.

Your task is to apply the core pillars of Computational Thinking to approach and solve this problem before writing any lines of code.

Task 1: Abstraction

Identify the essential data and features needed for the core system to function. List 3 essential elements the system must process, and 3 non-essential details that should be ignored during initial system design.

Task 2: Decomposition

Break down the overall Smart City Traffic System into 4 main sub-components or modules . Briefly state the primary responsibility of each module.

Task 3: Pattern Recognition

Analyze the traffic scenarios below. Identify 2 recurring patterns or trends that could help optimize traffic flow or improve system performance.

  • Scenario A: Every weekday between 7:30 AM and 8:45 AM, eastbound traffic toward the business district reaches maximum capacity.

  • Scenario B: When an ambulance approaches an intersection, nearby traffic slows down by 80% regardless of light status.

  • Scenario C: Rainy days increase average stop-and-go delays by 30% across all major avenues.

Task 4: Algorithmic Design

Write a clear, step-by-step algorithm (using pseudocode or plain structured English) to handle Emergency Vehicle Routing when an ambulance enters a controlled intersection area.

Reflection Question

Explain why completing Tasks 1–4 without writing code is valuable for a software engineering team before starting development.

Task 1: Abstraction (3 Marks Total)

  • Essential Data (1.5 Marks) — Award 0.5 marks for each valid data point that directly impacts signal logic or routing:

    • Vehicle count / flow density per lane

    • Live GPS coordinates / speed of emergency vehicles

    • Current signal phase / state (Red, Yellow, Green durations)

    • Road segment capacities/speeds

  • Non-Essential Data (1.5 Marks) — Award 0.5 marks for each peripheral detail correctly identified as irrelevant to traffic flow logic:

    • Vehicle attributes (color, make, model, license plate text)

    • Driver demographic information or passenger count

    • In-vehicle audio/radio status

    • Street names, billboard content, or aesthetic surrounding scenery

Task 2: Decomposition (4 Marks Total)

Award 1.0 mark per valid module (up to 4 marks). Each module must state a distinct, non-overlapping system function:

  1. Traffic Light Control Module (1 Mark): Calculates dynamic signal timing and changes signal states based on real-time lane density.

  2. Emergency Priority Module (1 Mark): Processes priority vehicle signals and overrides standard timing to create green corridors.

  3. Data Ingestion / Sensor Module (1 Mark): Aggregates incoming inputs from road sensors, cameras, and GPS devices.

  4. User Alert / Communications Module (1 Mark): Pushes real-time incident warnings and delay updates to driver interfaces or external navigation APIs.

Task 3: Pattern Recognition (4 Marks Total)

Award 2.0 marks per pattern analysis (up to 4 marks):

  • 1.0 mark for correctly identifying the underlying variable/trend.

  • 1.0 mark for providing a specific computational optimization based on that trend.

  • Pattern A - Commuter Peak (2 Marks):

    • Identification (1 Mark): Recognizing time-dependent, directional volume spikes (morning eastbound traffic).

    • Optimization (1 Mark): Pre-scheduling automated green-wave timing windows or extending green durations along eastbound corridors between 7:30 AM and 8:45 AM.

  • Pattern B or C - Weather / Environmental Impact (2 Marks):

    • Identification (1 Mark): Recognizing systemic performance degradation across the network (30% delay increase during rain).

    • Optimization (1 Mark): Applying global timing offsets (eg, increasing overall cycle lengths by 30%) across all intersections when weather sensor inputs flag rain.

Task 4: Algorithmic Design (4 Marks Total)

Evaluate the student's pseudocode or structured steps against the following breakdown:

  • Initialization & Input Processing (1 Mark): Explicitly retrieves emergency vehicle (EV) position and route data.

  • Conditional Logic (1 Mark): Uses explicit conditional statements ( IF / ELSEor WHILE) evaluating distance or ETA thresholds (eg, IF distance < 500m).

  • State Override Action (1 Mark): Forces cross-traffic lights to RED and EV lane lights to GREEN.

  • Reset / Termination Mechanics (1 Mark): Includes logic to release the override and restore standard dynamic operations once the EV clears the zone.