sfcta / dta

Automatically exported from code.google.com/p/dta
GNU General Public License v3.0
4 stars 5 forks source link

import Public Transit #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Translate old code for importing public transport into new code base.

Original issue reported on code.google.com by elizab...@sfcta.org on 25 Feb 2012 at 3:08

GoogleCodeExporter commented 9 years ago
We have identified pieces of the old code that need to be imported. We can use 
Lisa's lex/yacc importer if we wish. 

Original comment by xyntara...@gmail.com on 12 Mar 2012 at 4:01

GoogleCodeExporter commented 9 years ago

Original comment by elizab...@sfcta.org on 12 Mar 2012 at 4:48

GoogleCodeExporter commented 9 years ago
We identified an initial set of libraries that need to be downloaded to work 
with the transit codes and modified some portions of the code to remove 
references to libraries that were PB-specific and not publicly available.  
We tested that the transit route files are being read correctly and will go 
forward with testing the other functionalities of these codes required to edit 
the transit routes.
We also plan to add in an error check that identifies new paths that are 
significantly longer than the previous path after the shortest-path links are 
added.

Original comment by alsu...@pbworld.com on 19 Mar 2012 at 4:43

GoogleCodeExporter commented 9 years ago
We changed calls to functions and objects that no longer exist and updated 
relevant codes so that the shortest path now works and updates the transit 
paths.  We now are looking into an issue where the shortest path is creating 
U-turns.  We are going to look at the codes and the node shape file to figure 
out what is going wrong.  We are also updating the shortest path algorithm to 
do label-setting instead of label-correcting for the transit paths.

Original comment by alsu...@pbworld.com on 26 Mar 2012 at 4:33

GoogleCodeExporter commented 9 years ago
To do: 
- do full import from .lin -> export to ASCII -> view in Dynameq

Original comment by elizab...@sfcta.org on 9 Apr 2012 at 4:53

GoogleCodeExporter commented 9 years ago
When running code with bus.lin file instead of test transit routes file, I 
discovered that the file format is slightly different.  Since this file 
includes both access and delay values, I'm still in the process of trying to 
update the pyparsing code to correctly read in the node Ids.  Right now it just 
reads the first Id and then reads in "DELAY=" as the second Id.

Original comment by alsu...@pbworld.com on 16 Apr 2012 at 4:11

GoogleCodeExporter commented 9 years ago
The code works now, and the last thing to finalize is the correspondence 
between the Cube attributes "ACCESS" and "DELAY" and the Dynameq attributes.

Original comment by alsu...@pbworld.com on 23 Apr 2012 at 4:02

GoogleCodeExporter commented 9 years ago

Original comment by alsu...@pbworld.com on 26 Apr 2012 at 2:18

GoogleCodeExporter commented 9 years ago
As part of Issue 66, I have just reviewed & updated this code.  My updates are 
in Revision a98f6d205630, Revision d545da89b127, Revision 439047ad28c4, and 
Revision bda2dce0b299.

Summary of changes:
- Moved TPPlus2Dynameq.convertRoute() to TPPlusTransitRoute.toTransitLine() 
because it should be part of the library; having it in a scripts/ file does not 
make it easy to reuse (and this conversion function is pretty much the whole 
point of the TPPlusTransitRoute class)
- Renamed DynameqTransitLine.py to TransitLine.py and change __repr__ functions 
to be getDynameqStr()

For the TPPlusTransitRoute.toTransitLine():
- added MODE_TO_LITYPE arg to define how the cube transit mode corresponds to
  the line type (bus or tram) in DTA
- added headwayIndex arg to define which cube headway to use
- added startTime arg to define when the transit should start
- added randomization feature so that the DTA transit lines will start
  randomly within the first headway (so they don't all go at once)
- added demandDurationInMin arg
- go back to label setting for the O/D (much faster!)
- documentation

For the script itself:
- process multiple line files (bus.lin and sfmuni.lin in this case)
- write the _ptrn.dqt file at the end (this is the whole point of the script!)

There are still some errors:
1) the TransitLine.validatePath() writes error messages which need examination
2) Dynameq errors on some missing links/movements
These may be overlapping errors but I think going through these errors should 
be part of Issue 43.

Original comment by lisa.zorn@sfcta.org on 10 May 2012 at 11:31