Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagating delays on dynamically blocked trips triggers E047 #166

Open
jxeeno opened this issue Oct 24, 2022 · 1 comment
Open

Propagating delays on dynamically blocked trips triggers E047 #166

jxeeno opened this issue Oct 24, 2022 · 1 comment
Labels

Comments

@jxeeno
Copy link

jxeeno commented Oct 24, 2022

Summary:

It is not currently possible to provide propagated delays for dynamically blocked services where the vehicle.id is provided for subsequent trips without triggering E047.

For example, an operator wants to communicate delays for subsequent services which are not blocked together in the block_id field in GTFS-static because vehicle allocations are dynamic/day of operation decisions.

In this example, the operator is currently using vehicle.id 1 to operate trip.trip_id A. This trip is currently delayed by 120 seconds. The next service which has been dynamically allocated to vehicle.id 1 is trip.trip_id B.

The recommended best practice is to include TripUpdate for trip.trip_id B to avoid prediction "pop-in". As per docs, VehiclePosition for trip.trip_id B should only be provided for the trip the vehicle is currently serving.

The trip that the vehicle is currently serving should be given through a TripDescriptor.

Steps to reproduce:

TripUpdate feed

entity {
  trip_update {
    trip {
      trip_id: "A"
    }
    stop_time_update {
      stop_sequence: 1
      departure {
        delay: 120
      }
    }
    vehicle {
      id: "1"
    }
  }
}
entity {
  trip_update {
    trip {
      trip_id: "B"
    }
    stop_time_update {
      stop_sequence: 1
      departure {
        delay: 120
      }
    }
    vehicle {
      id: "1"
    }
  }
}

VehiclePosition feed

entity {
  vehicle {
    trip {
      trip_id: "A"
    }
    position {
       ...
    }
    vehicle {
      id: "1"
    }
  }
}

Expected behavior:

The trip.trip_id to vehicle.id matching logic is currently inverted.

The validator should check to see if the trip.trip_id specified in VehiclePosition for a particular vehicle.id is also present in TripUpdate feed. It should not throw an error if the vehicle.id is used in one or more trip.trip_id where block_id is not specified in GTFS static.

Observed behavior:

E047 is triggered:

E047 - VehiclePosition and TripUpdate ID pairing mismatch
trip_id A and vehicle_id 1 pairing in VehiclePositions does not match trip_id B and vehicle_id 1 pairing in TripUpdates feed and trip block_ids aren't the same - ID pairing between feeds should match

Platform:

N/A

@e-lo e-lo added the bug label Feb 6, 2023
@e-lo
Copy link
Collaborator

e-lo commented Feb 6, 2023

This does indeed look like a bug...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants