Closed pies closed 5 years ago
I don't think so, I think it extracts the NLC from the cluster ID and uses that as the NLC... but I must admit I'm not 100% on that.
Well, we were missing some restrictions, like DFD to RAM, because RAM is present in flows as its clusters and those clusters were not included in location_railcard.
Our implementation removes this restriction and adds SVR and SVS to the list of tickets, which bumps the number of rows significantly (to 400k). It fixes some issues (admittedly not huge ones) and makes it a more general tool for checking whether there's an off-peak on the particular flow. I think it's worth the extra resources, but YMMV obviously.
Yeah, I would like that patch if you have it available
https://github.com/planarnetwork/dtd2mysql/blob/72b72606c25353ea92c5e3dbb5396c0bb374db32/src/cli/CleanFaresCommand.ts#L146
oc.cluster_id IN (SELECT SUBSTR(uic_code, 3, 4) AS nlc FROM location_railcard WHERE railcard_code = 'NEW')
This removes (all?) flows to clusters because location_railcard does not contain (some?) clusters.