Comments (10)
I don't have an association between P76348 and P75734 in my data. But it was a deliberate choice to mix the times from the base/assoc schedules.
For a split:
Arrival time at assoc location comes from the base and departure time from the assoc AS the assoc does not have an arrival time at the assoc location (it's always the first stop). The departure time comes from the assoc schedule as it has deviated from the base schedule at that point.
For joins:
The arrival time at the assoc location comes from the assoc schedule and the departure comes from the base. Some logic more or less as the split but inverted.
I will keep this open but let me know if it can be closed off.
from dtd2mysql.
This bug may have been corrected by fixing #3 as it may have detected a backwards step in time and tried to move it forward to compensate. I'm trying to find another example to verify
from dtd2mysql.
I'll check same CIF data with the updated code, see if it goes away for this particular case.
from dtd2mysql.
Looking at 52f6752 (fix for #3), I think it shouldn't affect this particular issue.
More specific problems highlighted by it:
-
If A has association with B, and association stop is "pickup only" or "dropoff only", then there is a "scheduled time mixed in with public time" situation again, which - as demonstrated in #3, seem to occasionally produce such mismatches, and probably shouldn't result in "+1 day" scenario.
-
Potentially there can be entirely new mismatch in "public arrival for A vs public departure time for B", unrelated to mixing scheduled/public times, will check if it's the case here.
-
If association stop legitimately has departure time moved to the next day, code doesn't seem to move all the stops after it, which seem to be a bug.
from dtd2mysql.
If association stop legitimately has departure time moved to the next day, code doesn't seem to move all the stops after it, which seem to be a bug.
There seem to be separate logic for midnight rollover in Association.ts, which I have in Schedule constructor in py code, wonder if maybe it'll fit code style here to have it there as well, hence making it impossible to create Schedule without rollover applied in uniform manner.
Also, it's kinda easy to make heuristic to detect that "19:12 -> 19:11" is probably not a midnight rollover, e.g. check if "time1>23:00 and time2<1:00", or "time2-time1 <<< time1-time2" (i.e. "1m <<< 23h59m" in this case) and such.
Can potentially get rid of all such small quirks, though didn't do proper check yet for how many of them are in the data.
EDIT:
For reference, in py code I have first kind of two checks described above:
https://github.com/mk-fg/open-track-dtd2mysql-gtfs/blob/f5017c8/mysql-dtd-to-gtfs.py#L386-L407
from dtd2mysql.
I'll check same CIF data with the updated code, see if it goes away for this particular case.
Still definitely have the issue with fix from #3.
As I'll be experimenting with newer data soon, will see if such cases still appear there.
Can also send you this old cif.sql export (though you might still have it too), but you can probably reproduce it easily in tests for problematic cases described above, if they seem relevant enough to address.
from dtd2mysql.
Send it over and I will try it out
from dtd2mysql.
@mk-fg don't worry I found it
from dtd2mysql.
Okay, another one with tricky data. In this instance the associated schedule arrives at the association location after the base schedule departs that same location. Obviously a bit of a nonsense but I'll have to find a way to deal with it.
from dtd2mysql.
I've just pushed a change so that it only increments if the next day flag is set. Not bullet proof but should do the trick.
from dtd2mysql.
Related Issues (20)
- max_old_space_size too small and not configurable? HOT 6
- dtd2mysql --timetable Error: Column count doesn't match value count at row 1 HOT 3
- --gtfs-zip error failing to build files and zip file HOT 5
- --fares-clean error (not sure if vital) HOT 1
- Error extracting Fare Data HOT 5
- Setting environment variables. HOT 17
- network_flow_restriction query filters out clusters HOT 4
- Filename mismatch HOT 6
- Data too long for log filename HOT 1
- Replacement bus GTFS route_type HOT 2
- Critical problem with route_type. Bus and rail trips under one route HOT 9
- Invalid or unsupported zip format HOT 6
- Incorrect schedules for ~1200 trips (associations) HOT 10
- list both stations and platforms in the GTFS output HOT 1
- TOC from Z-records aren't imported
- GTFS produced by timetable revision 930 contains invalid calendar HOT 1
- Joins at the beginning of the route should not be processed HOT 6
- Implement train splitting / joining as GTFS transfers HOT 3
- CR record in MCA file isn't handled HOT 4
- What is the use of addLateNightServices? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dtd2mysql.