Skip to content

Consolidate TrackOccupancy and EnhancedTrackOccupancy #257

@jhw-db

Description

@jhw-db

The codebase has both TrackOccupancy and EnhancedTrackOccupancy classes, creating duplication and confusion. Consolidate into single class with unified API.

Current Issues:

  • Two classes with overlapping functionality
  • Confusion about which to use
  • Duplicate code maintenance
  • Inconsistent APIs

Proposed Solution:

  • Merge EnhancedTrackOccupancy functionality into base TrackOccupancy
  • Provide high-level API: add_wagon(), remove_wagon(), get_wagons_in_sequence()
  • Keep low-level API: add_occupant(), remove_occupant()
  • Add TrackWagonQueue value object for sequence tracking

Benefits:

  • Single source of truth
  • Simplified architecture
  • Consistent API

Breaking Changes:

  • TrackOccupancy API changed with new high-level methods
  • TrackOccupancyRepository now provides get_wagons_on_track() method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions