We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Shortest path in the database and more with pgRouting

00:00

Formale Metadaten

Titel
Shortest path in the database and more with pgRouting
Serientitel
Anzahl der Teile
295
Autor
Mitwirkende
Lizenz
CC-Namensnennung 3.0 Deutschland:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
pgRouting extends the PostGIS / PostgreSQL geospatial database to provide shortest path search and other network analysis functionality. This presentation will show the inside and current state of the pgRouting development, from its wide range of shortest path search algorithms and other algorithms like driving distance calculation or “Traveling Sales Person” (TSP) optimization, graph contraction, flow analysis etc. Additionally we will give a brief outlook and introduction of upcoming new features on the version 3.0. We will explain how the data structure is important to get better routing results. Furthermore we will show how you can improve the quality of the search with dynamic costs and make the result look closer to the reality. You will also learn about difficulties and limitations of the library, and when pgRouting might not be not the right tool to solve your routing problem. Links to project: https://github.com/pgrouting/pgrouting
Schlagwörter
129
131
137
139
Vorschaubild
28:17
SoftwareentwicklerE-MailRoutingProdukt <Mathematik>GraphentheorieZeitabhängigkeitFamilie <Mathematik>SoftwareentwicklerE-MailGraphentheorieBitCoxeter-GruppeWikiRoutingSoftwareProdukt <Mathematik>t-TestProjektive EbeneComputeranimation
Open SourceGerichteter GraphVorzeichen <Mathematik>Coxeter-GruppeFunktionalOpen SourceProgrammbibliothekDatenbankBildgebendes VerfahrenSoftwareComputeranimation
MereologiePunktGeradeHilfesystemComputeranimationDiagramm
MehrrechnersystemPhysikalische TheorieComputeranimation
ImplementierungAlgorithmusCASE <Informatik>GravitationRechter WinkelResultanteFunktionalPhysikalische TheorieRechenschieberSoftwaretestVorzeichen <Mathematik>RoutingDiagramm
InformationsspeicherungGravitationProdukt <Mathematik>Physikalische TheorieChord <Kommunikationsprotokoll>GeradeVorlesung/Konferenz
RoutingMAPUmsetzung <Informatik>DatenbankRoutingInformationBildschirmmaskeEinsPlug inDatensichtgerätProdukt <Mathematik>FehlertoleranzTotal <Mathematik>Offene MengeComputeranimation
Total <Mathematik>GraphentheorieRoutingProdukt <Mathematik>Basis <Mathematik>DebuggingRohdatenGraphComputeranimation
GraphentheorieSelbstrepräsentationFunktionalGraphZusammenhängender GraphDatenflussAbstimmung <Frequenz>Computeranimation
Mengentheoretische TopologieFunktion <Mathematik>AbstandKnotenmengeMultigraphSchnelltasteAlgorithmusJensen-MaßShape <Informatik>PolygonNormalvektorFahne <Mathematik>EvolutePunktCompilerFunktionalProjektive EbeneOpen SourceRechenwerkVersionsverwaltungZahlenbereichFehlermeldungTotal <Mathematik>GeradeKomponententest
Funktion <Mathematik>GraphIsolation <Informatik>RechenbuchAlgorithmusGruppenoperationMultigraphChi-Quadrat-VerteilungEin-AusgabeZellularer AutomatAbstandVerschlingungShape <Informatik>Jensen-MaßVersionsverwaltungAutomatische HandlungsplanungPunktFunktionalTUNIS <Programm>EinsFamilie <Mathematik>TypentheorieProgrammfehlerTopologieUmsetzung <Informatik>KomponententestDesign by ContractAbstandRechenwerkKategorie <Mathematik>Travelling-salesman-ProblemZusammenhängender GraphDatenflussAlgorithmusTermBus <Informatik>Vorzeichen <Mathematik>SystemaufrufGraphRichtungKlasse <Mathematik>SoftwaretestLesen <Datenverarbeitung>Web logProjektive EbeneComputeranimation
CodeGoogolt-TestMaschinencodeQuick-SortSchlussregelGoogolProgrammierungComputeranimation
Dynamisches RAMAlgorithmusKnotenmengeComplexity <Algorithm>MultigraphOrdnung <Mathematik>TabelleSchwimmkörperReverse EngineeringGerichteter GraphInnerer PunktQuick-SortMengentheoretische TopologieAlgebraisch abgeschlossener KörperGruppenoperationZusammenhängender GraphBeschreibungskomplexitätDatenstrukturCoxeter-GruppeAlgebraisch abgeschlossener KörperFunktionalMultiplikationsoperatorGraphentheorieGruppenoperationComputeranimation
SchwimmkörperGerichteter GraphInnerer PunktRoutingDatenbankVisualBASICVideokonferenzVerschlingungBestimmtheitsmaßMultiplikationsoperatort-TestElektronische PublikationSkalarproduktRechenschieberComputeranimation
KnotenmengeBeschreibungskomplexitätAlgorithmusGraphDickeGerichteter GraphMultigraphWurzel <Mathematik>Kontextbezogenes SystemMAPPortscannerSchwimmkörperInnerer PunktRoutingFunktionalProzess <Informatik>Computeranimation
KnotenmengeAlgorithmusDijkstra-AlgorithmusGraphGewicht <Ausgleichsrechnung>BeschreibungskomplexitätMultigraphBinärdatenDickeGanze ZahlVersionsverwaltungGerichteter GraphReverse EngineeringNegative ZahlGewichtungMaßerweiterungPetaflopsPROMCodeGoogolSystem-on-ChipE-MailResultanteProzess <Informatik>VideokonferenzBriefträgerproblemFunktionalAlgorithmust-TestBinärcodeHypermediaImplementierungYouTubeComputeranimation
AlgorithmusAlgorithmusGoogolComputeranimationDiagramm
CodeGoogolCodierungstheorieInformationCoxeter-GruppeBitMultigraphRoutingSoftwareProjektive EbeneProdukt <Mathematik>SichtenkonzeptPunktSimulationComputeranimation
InformationEinflussgrößeNeuroinformatikSichtenkonzeptMultiplikationsoperatorGesetz <Physik>Computeranimation
InformationNeuroinformatikMultiplikationsoperatorHalbleiterspeicherARM <Computerarchitektur>ZweiAlgorithmusFunktionalEinsZahlenbereichBenutzerfreundlichkeitInformationWhiteboardAllegorie <Mathematik>SystemaufrufDatenbankMereologieDatensatzGraphMultigraphKnotenmengeHypergraphGerichteter GraphVorlesung/Konferenz
Information
Transkript: Englisch(automatisch erzeugt)
So, who am I? I am Piki Vergara and I am an economist. I'm the main PG routing developer. I am from Mexico. I do a lot of things in OSGO. I consider myself as an octopus and
that is my mail. If you want to contact me, you can find that mail in GitHub, in wiki of OSGO. Everybody kind of looks like me. So, what are we going to do today? We're going to see what is PG routing. What is routing? We're going to see how
we develop PG routing and we're going to analyze just a little bit of PG routing products because it's not only one software that we develop. We're going
to talk very little about graphs and I forgot to translate that sentence from Spanish. We're going to see the evolution and we're going to see the students' contributions. So, what is PG routing? PG routing is an OSGO
community project. I think that the last update of my presentation is not here, so we're going to work with it. And it's an open source, so you can see and inspect how good or bad we're doing everything. We are a library of
functions that work with a post-gist enabled database of Postgres database. Okay, and what we do in PG routing is we do routing like you use your
Google Maps or Waze or whatever software when you are lost. So, that's what is PG routing in one image. Okay, I have to point to where. I'll use the
arrow. So, what is routing? Well, like the little elephant there says well I am
here, I want to go there. And when I was in elementary school the teacher always told me that the shortest path between two points is just a straight
line. So, we go like that. But then we notice that something is wrong, that that is not necessarily true. So, what do we have to do? We have to
develop something to make that routing be more accurate. It's not that it's not true. A bird can do that kind of trip but not us. And to do that we have to go and look and investigate, do some research and get some theory. So,
what we're going to be doing right now is we're going to develop a routing function right now. So, we go and look for the theory and in this case we find that. Okay, we are going to use the gravity, we're going to use gravity to
solve a routing problem. Okay, so we're going to be doing something. I hope it works. So, we find our very amazing theory and we need to make a test. So, we
have to design a test and in this case this is the design. I made a new slide that is not here but the expected result is to go from one to
three to six to five. That's the shortest path for this data that we have. So, we're going to implement our algorithm and for doing that, very
carefully, carefully, carefully, please, so that they can see. So, here he's, everything is with volunteers and he's my compulsory volunteers and everybody
knows that I ask for compulsory volunteers. So, he's my compulsory volunteer and this is how we're going to use the gravity to solve that problem. Can you hold it please? Maxi Boco. Yes, so we're using gravity. This is our
destination. From the destination, we find the more tense chord and it takes
us to six and from six it takes us to three and from three the more tense chord takes us to the green one and are the lines that has a nine, a two, and
a nine. So, we get our shortest path using gravity. So, the theory works.
Maxi Boco. So, this was supposed to be there while we were doing that. So, what are the PG routing products? The PG routing products are
OSM to PG routing. OSM to PG routing, what it allows us to do is to convert data from OpenStreetMap, which is open data, to a post GIS enabled Postgres database. PG routing layer is a QGIS plug-in that
allows us to see routes. So, it gets the information from the database
and it is placed in a very human readable form of a map because internally everything is zeros and ones. So, that is a PG routing. You can see the totality of our products right now. You go from OSM to PG routing and
from PG routing to QGIS. That's QGIS would be our front end and we're going to talk about where can I use PG routing. We're going to use PG routing on
graphs. What are the graphs? Graphs can be anything. For example, graphs can be represent rivers. We have many functions now, flow functions. The graphs can represent human relationships. Graph can represent data connections and what we
are used to is that they represent city roads. City roads, they can
represent city roads. Now, PG routing has been growing since 2013 that I arrived to it. So, let's see our evolution. When I arrived, the version 2.0 was about to be
released when I made my first open source contribution before this release and that is the total number of functions that were in that release. We had the incredible amount of 65 unit tests and
unfortunately, like a year and a half later, I noticed that if I put in the
compiling the flags of W error, W pedantic, I am very pedantic, so there were like 4,000 lines of warnings and what is a warning in one compiler can be an error in another compiler and I said this needs to be fixed. That's
when I gradually started to be more active in the project and soon that work will be shown in version 3.0 which I plan to release in September. We
have three classification of functions in version 2.3. We have the official functions which are the ones that you will see in front of the documentation. The proposed functions are the ones that can become official,
easier and experimental functions which are the ones that are recently created and we need the community to test it with real data, with real problems.
But in 3.0, we will have many classifications. For example, this you will have the old pairs already are in 2.0, the A star family of functions, the
bidirectional A star family of functions, the bidirectional Dijkstra family of functions. It's okay, it's working, thanks. The components family of functions, the
contraction of a graph, the Dijkstra family of functions, the flow family of functions, the spanning tree families that include Kruskal family of functions, Prim family of functions, the k shortest path which is Jens
algorithm, the turn restrictions shortest path, the travelling salesman problem functions, the driving distance category that include with Dijkstra as a back function to do it, the Prim and Kruskal functions. And we
now instead of 68 tests, we have 30,810 unit tests. So you saw that we had like
4,000 warnings and stuff. We still do have them, so you will know, oh yes there's still a bug, yes there's still a bug. During these four years that I've been actively in the project, there is this function that is a turn
restriction shortest path that is a very complicated to fix. And I decided okay, I mean this warning I can remove it easily, it's just a conversion of types. But if I leave it there, people will know that there are bugs in that
function when they compile. And if they don't believe that, then from the 30 something thousand function unit tests, you can see that all the failing
unit tests have to do with the turn restrictions shortest path function that P routing has. And it's going to be our policy that that function will remain like that until someone wants to rewrite that function. So it will be
like let's keep it there like it is. Now P routing has grown thanks to the students. So we have many contributions and these are the Google Summer of Code students. We have Hangwoo from this year's program. He created the
topological sort. This documentation that you can see here is the documentation that he created for this presentation. And he also created a
transitive closure function for graphs. And this is the documentation. It didn't take me to the link. Oh yeah. He also made his video. It's not
shown. I don't know how to do that. They told me to move it somewhere. Wait let me put it. That is Hangwoo working on this summer. And all those dots
represent the files he touched. And you can see that he worked. So
this is important for me for you to show because it's their students efforts. I'm going out and they're coming in. So how do I? I just cross it here. We go to
the next slide. Now the other student that we have for this year is Akil. And he made a breadth-first search function in in PG routing. That is a
documentation that he did for this presentation. And that is how P routing results look like when you use it. So it's a long process to use that
information and make a nice map with it. And he made a binary breadth-first search. And he also made an implementation of Edward Moore's algorithm. So he made a contribution of three functions and he also created his
his working video. I have to click it only right? You can find the videos in
YouTube. We have videos of all our students. It's basically the end. So from
2018 last year we have Mao Wang. He created a solution for the Chinese Postman problem. We have Aditya. He is the one that made Prim's algorithm
and Kruskal's algorithms. We had the Zurbach which now is was a mentor for the Google Summer of Code. And Ahish, Vidhan, Andrea, Rojiz, Sarfak that
made the PG routing improvements. And I give you thanks. And that's all. So these are this is my presentation about PG routing. If you have any
questions, we have five minutes to answer. Questions?
So we do use PG routing quite a lot for projects. Thank you for this nice product. I have a question about performance. Could you tell us a bit
about the size of the networks? What is a large network for you? Yeah, a large that always is going to be that will depend on your point of view. Of course, if I want to solve a problem of how do I get from here to
the corner, I won't put all Europe that it would be too large. But let's say I at least in my computer, which when I made some performance measurements that you can see in the documentation of the old pairs algorithm, there are some times I did some analysis about in my computer
with a that I have at home, which is actually slower than this one because I built it. And that one took around three seconds per million rows to upload to the algorithm to memory so that the algorithm can use
that information. So that was three seconds per million rows in my computer. Which means this one is faster. I haven't measured the speed.
But what it takes more time in PG routing is to upload convert that saved graph in the database into usable information in the algorithm. That was takes a lot of time. In our documentation, we try to put
the the all of the functions so you can see if I didn't go through the details, but it says the running time was an order of the number of edges plus the number of vertices. But that is when the
algorithm is running, the slowest part is uploading to memory. But it's only once. And that's why we created functions that go from one to one, one to many, many to one, many to many so that in one call,
you can solve many problems at the same time. So that is what we're trying to do in all the functions that require a source and a destination. Yes. Thank you. More questions? I'm glad that everything is clear as petrol.