Skip to content

traveled graph implementation (Python) - #201

Merged
jteresco merged 26 commits into
TravelMapping:masterfrom
yakra:tmg2_Python
May 8, 2019
Merged

traveled graph implementation (Python)#201
jteresco merged 26 commits into
TravelMapping:masterfrom
yakra:tmg2_Python

Conversation

@yakra

Copy link
Copy Markdown
Contributor

Implements #196 in Python

yakra added 10 commits March 23, 2019 14:14
in preparation for "traveled" graph implementation
* Separate collection of "traveled" edges implemented.
* fmt_mask allows new collapsed/traveled edges to be constructed together or separately as needed.
* HighwayGraph.matching_vertices calculates & returns # of vertices for traveled graph, though this info is not used yet.
* Traveled graph partially implemented: for now, just a glorified collapsed graph with a few extra vertices & edges.
* Traveler numbers and hex codes are not yet implemented.
* Subgraphs are not yet implemented..
* Subgraphs partially implemented: for now, just glorified collapsed graphs with a few extra vertices & edges.
* Traveler numbers and hex codes are not yet implemented.
@yakra

Copy link
Copy Markdown
ContributorAuthor
  • @jteresco, you only said "a new version number in the header"; I made the "2.0" assumption. Do you prefer a different number, or is 2.0 fine?
  • Thoughts on adding "-collapsed" to TMG filenames, E.G. AB-region-collapsed.tmg? More descriptive / less ambiguous compared to a vanilla filename, and more convenient if I want to mv *collapsed.tmg foo/, or rm *collapsed.tmg, etc.
    • On the one hand, the links on the graph download page would be broken.
    • OTOH, it'll have to be revamped eventually.

@jteresco

Copy link
Copy Markdown
Contributor

I like 2.0 and I like adding the format to every filename. I can easily enough revamp the download page. I think HDX would be good, it would just start loading up the -collapsed graphs from the list in the DB. More interesting will be to bring in user stats there for display and use in the algorithms.

@yakra

Copy link
Copy Markdown
ContributorAuthor

OK. For now, the existing filenames are retained in this PR.

@yakra

yakra commented Apr 7, 2019

Copy link
Copy Markdown
ContributorAuthor

When revamping the graph download page, thoughts on including links to tmg2html "HDX-Lite" pages?
(Semi-related: #95)
(I'd have to first update tmg2html to read TMG 2.0 traveled files. Relatively easy to do; just hinges on how #199 is resolved.)

@jteresco

Copy link
Copy Markdown
Contributor

Makes sense to me to link to HDX-Lite pages. I think that whole page needs a little thought anyway now with 3 graph formats per subgraph.

yakra added 9 commits April 22, 2019 15:17
In theory, saves a tiny bit of time.
In practice, not a noticeable amount. :)
(if -> elif) into tmg2_python
(if -> elif) into RelevantTrav
(minor datacheck speed improvements) into tmg2_python
(minor datacheck speed improvements) into RelevantTrav
(duplicate label comments) into tmg2_Python
(duplicate label comments) into RelevantTrav
@jteresco

Copy link
Copy Markdown
Contributor

I am about 2 weeks away from what I hope is a chance to merge this in and make corresponding changes to get the new format graphs listed on the web site and to get the format documented for potential users.

@yakra

yakra commented Apr 23, 2019

Copy link
Copy Markdown
ContributorAuthor

I am about 2 weeks away from what I hope is a chance to merge this in

Thanks, good to know.

and make corresponding changes to get the new format graphs listed on the web site

Should I go ahead and make the change to FOO-bar-collapsed.tmg style filenames in anticipation of this, then?

and to get the format documented for potential users.

Let's get #199 sorted before moving ahead. Two questions, should I:

  • Use a single-0 hex code for each edge in zero-traveler graphs? (flagged as "Most likely do")
  • Add the number of travelers to the second header line? (flagged as "To do or not to do?")

@jteresco

Copy link
Copy Markdown
Contributor

and make corresponding changes to get the new format graphs listed on the web site

Should I go ahead and make the change to FOO-bar-collapsed.tmg style filenames in anticipation of this, then?

Yes, let's go for it all in one shot.

and to get the format documented for potential users.

Let's get #199 sorted before moving ahead. Two questions, should I:

* Use a single-`0` hex code for each edge in zero-traveler graphs? _(flagged as "Most likely do")_
* Add the number of travelers to the second header line? _(flagged as "To do or not to do?")_

I think yes to both with an eye toward ease of parsing for potential users.

@yakra

Copy link
Copy Markdown
ContributorAuthor

Yes, let's go for it all in one shot.
...
I think yes to both with an eye toward ease of parsing for potential users.

All three changes are now live in this branch.

yakra added a commit to yakra/DataProcessing that referenced this pull request Apr 23, 2019
@yakrayakra changed the title traveled graph implementationtraveled graph implementation (Python)Apr 24, 2019
* 12% speedup Augmenting travelers for detected concurrent segments
* 34% speedup Creating per-traveler stats log entries and augmenting data
* 1.7% speedup for subgraph generation. Maybe.
@yakra

yakra commented May 2, 2019

Copy link
Copy Markdown
ContributorAuthor

LOL, why not a benchmark.
BiggaTomato / UserData @ 207c8eb / HighwayData @ 0c0573b
Subgraph generation time increased from 99.9s to 159.3s.
No doubt most of that comes from hex code generation.

And nothing wrong with that, traveled graphs will be super neat to have. :)


Also added a commit to address #203.

@jteresco

Copy link
Copy Markdown
Contributor

The time has come. I'm bringing this in. I'm going to try it out on my Mac and will make corresponding changes to the graph downloads page (TravelMapping/Web#299) before putting to use for the production site updates on noreaster.

@jteresco
jteresco merged commit c492192 into TravelMapping:masterMay 8, 2019
@yakra
yakra deleted the tmg2_Python branch June 19, 2019 21:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yakra@jteresco