Giter Site home page Giter Site logo

Comments (10)

linusnorton avatar linusnorton commented on July 28, 2024

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.

linusnorton avatar linusnorton commented on July 28, 2024

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.

mk-fg avatar mk-fg commented on July 28, 2024

I'll check same CIF data with the updated code, see if it goes away for this particular case.

from dtd2mysql.

mk-fg avatar mk-fg commented on July 28, 2024

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.

mk-fg avatar mk-fg commented on July 28, 2024

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.

mk-fg avatar mk-fg commented on July 28, 2024

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.

linusnorton avatar linusnorton commented on July 28, 2024

Send it over and I will try it out

from dtd2mysql.

linusnorton avatar linusnorton commented on July 28, 2024

@mk-fg don't worry I found it

from dtd2mysql.

linusnorton avatar linusnorton commented on July 28, 2024

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.

linusnorton avatar linusnorton commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.