I have released
https://metacpan.org/release/Map-Metro-Plugin-Map-Berlin
But it has only the U-Bahn network included, because, well, including both U-Bahn and S-Bahn causes a huge slow-down. Searching takes 3-4 minutes, even for very short paths:
$ time /usr/perl5.20.0/bin/perl -Mblib -MMap::Metro::Hook /usr/perl5.20.0/bin/map-metro.pl route Berlin Adlershof Zehlendorf
...
/usr/perl5.20.0/bin/perl -Mblib -MMap::Metro::Hook route Berlin Adlershof 221,78s user 0,72s system 0% cpu 3:50,66 total
Map::Tube::Berlin is faster:
$ time perl5.20.0 -MMap::Tube::Berlin -C -E 'say Map::Tube::Berlin->new->get_shortest_route(shift, shift)' "Adlershof" "Zehlendorf"
...
perl5.20.0 -MMap::Tube::Berlin -C -E "Adlershof" "Zehlendorf" 0,29s user 0,04s system 0% cpu 0,333 total
Or using the routing engine from
https://github.com/eserte/bbbike:
$ time ./cmdbbbike -vehicle oepnv Adlershof Zehlendorf
...
./cmdbbbike -vehicle oepnv Adlershof Zehlendorf 0,15s user 0,01s system 0% cpu 0,156 total
The file with the U+S-Bahn network is attached, in case you want to play with it...
But the original issue of this ticket seems to be resolved, so I am closing the ticket now.
Regards,
Slaven
On 2014-12-13 11:32:59, CSSON wrote:
Show quoted text> Will be interesting to see how it handles such a big map. It's not
> lightning-fast with Stockholm with its ~100 stations.
>
> The shorter one-way segment notation was fixed in 0.1800, so it's much
> easier to fix:
>
> S41S42|Westhafen|Wedding
>
> just needs to be
>
> S41->,S42<-|Westhafen|Wedding
>
> /Erik
>
> On Sat Dec 13 10:58:04 2014, SREZIC wrote:
> > Thanks. I am using an automatic conversion script originally written
> > for Map::Tube output which is not yet capable of dealing with the
> > different directions of S41/S42, but this is on my TODO list now
> > (current solution is to treat S41/S42 as one line).
> >
> > BTW, my not yet working attempt can be found under
> >
https://github.com/eserte/Map-Metro-Plugin-Map-Berlin
> > I hope I make it working this weekend.
> >
> > Regards,
> > Slaven
> >
> > On 2014-12-13 08:15:42, CSSON wrote:
> > > The error should be fixed in 0.1701. There was a faulty assumption
> > > in
> > > LineStation, which led to some problems..
> > >
> > > I don't know any current problems with regards to Berlin's S/U-bahn
> > > networks: 0.1701 also introduced the possibility to have one-way
> > > segments, which would handle the S41/S42 ring correctly with:
> > >
> > > S41|Hohenzollerndamm|Halensee|dir:->
> > > S42|Halensee|Hohenzollerndamm|dir:->
> > > S46|Hohenzollerndamm|Halensee
> > >
> > > Though it just struck me that it might be nicer to use:
> > >
> > > S41->,S42<-,S46|Hohenzollerndamm|Halensee
> > >
> > > (It will probably be that way soon.)
> > >
> > > Let me know if there is something in the Berlin network I've
> > > missed.
> > >
> > >
> > > On Thu Dec 11 16:28:45 2014, SREZIC wrote:
> > > > Loading the attached test file with Map::Metro::Shim gives the
> > > > following error:
> > > >
> > > > cannot change value of SetOnce attribute previous_line_station at
> > > > /usr/perl5.20.0/lib/site_perl/5.20.0/MooseX/SetOnce.pm line 35.
> > > > MooseX::SetOnce::Attribute::_ensure_unset(Moose::Meta::Class::__ANON__::SERIAL::7=HASH(0x808c636a8),
> > > > Map::Metro::Graph::LineStation=HASH(0x806dc5c48)) called at
> > > > accessor
> > > > Map::Metro::Graph::LineStation::previous_line_station (defined at
> > > > /usr/perl5.20.0/lib/site_perl/5.20.0/MooseX/MungeHas.pm line 268)
> > > > line
> > > > 3
> > > > Map::Metro::Graph::LineStation::previous_line_station(Map::Metro::Graph::LineStation=HASH(0x806dc5c48),
> > > > Map::Metro::Graph::LineStation=HASH(0x8098b1bd0)) called at
> > > > /usr/perl5.20.0/lib/site_perl/5.20.0/Map/Metro/Graph.pm line 383
> > > > Map::Metro::Graph::construct_connections(Map::Metro::Graph=HASH(0x801813900))
> > > > called at /usr/perl5.20.0/lib/site_perl/5.20.0/Map/Metro/Graph.pm
> > > > line
> > > > 167
> > > > Map::Metro::Graph::parse(Map::Metro::Graph=HASH(0x801813900))
> > > > called at /usr/perl5.20.0/lib/site_perl/5.20.0/Map/Metro/Shim.pm
> > > > line
> > > > 21
> > > > Map::Metro::Shim::parse(Map::Metro::Shim=HASH(0x80180a438))
> > > > called at -e line 1
> > > >
> > > > Probably the problem is that Map::Metro::Graph expects that
> > > > subsequent
> > > > segments don't change their direction. Unfortunately this is not
> > > > possible to achieve for all graphs (i.e. it's not possible with
> > > > the
> > > > Berlin S-Bahn network).