Dne St 25.bře.2015 09:26:49, GWS napsal(a):
Show quoted text> Am 2015-03-25 08:19:53, SKIM schrieb:
>
> > oh.
> > There are two issues:
> > * You say, that get_shortest_route() has problems.
> > * Map::Tube::GraphViz has problems with multiple station with same
> > id.
Sorry. That was bad sentence.
... with same name.
e.g. KualaLumpur or Singapur has situations, when two stations has same name and on each line has different unique ids.
Show quoted text> Well, yes, the id should be unique. Any station may occur more than
> once, of course, in different lines, but one station is one station
> and probably should not be linked to itself.
Yes.
Show quoted text> Here's the output from Florenc to Flora as generated by
> get_shortest_route()->preferred():
I don't test new preferred() method.
Show quoted text> Florenc (Linka C), Hlavni nadrazi (Linka C), Muzeum (Linka C), Muzeum
> (Tunnel), Namesti Miru (Linka A), Jiriho z Podebrad (Linka A), Flora
> (Linka A)
I am expecting something like:
Florenc (Linka C), Hlavni nadrazi (Linka C), Muzeum (Linka C), Muzeum (Linka A), Namesti Miru (Linka A), Jiriho z Podebrad (Linka A), Flora (Linka A)
And will be good see some method to get link type between stations (in Map::Tube::Route).
Links are:
(Florenc C) Tube (Hlavni nadrazi C), (Hlavni nadrazi C) Tube (Muzeum C), (Muzeum C) Tunnel (Muzeum A), (Muzeum A) Tube (Namesti Miru A), (Namesti Miru A) Tube (Jiriho z Podebrad A), (Jiriho z Podebrad A) Tube (Flora (A)
Show quoted text> And here's the output from M::T::Text::Shortest:
>
> From Florenc to Flora
> =====================
>
> -- Route 1 (cost ?) ---------
> [ C ] Florenc
> [ * ? ] Florenc
> [ C ] Hlavni nadrazi
> [ C ] Muzeum
> [ * ? ] Muzeum
> [ A ] Muzeum
> [ * ? ] Muzeum
> [ A ] Namesti Miru
> [ A ] Jiriho z Podebrad
> [ A ] Flora
>
> C Linka C
> A Linka A
> B Linka B
>
> *: Transfer to other line
> +: Transfer to other station
Yes, this is bad.
M.