Hi Matteo
I can thoroughly recommend this book on pgRouting:
https://locatepress.com/pgrouting
It helped me so much when I was first getting to grips with it.
Best wishes
Marcus
CAUTION: This e-mail originated outside the University of Southampton.
Send Pgrouting-users mailing list submissions to
pgrouting-users@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386099340%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1S9TdwB6T7hk0Cc17z1UqBurEbibgae%2BI245qJaR%2Fys%3D&reserved=0
or, via email, send a message with subject or body ‘help’ to
pgrouting-users-request@lists.osgeo.org
You can reach the person managing the list at
pgrouting-users-owner@lists.osgeo.org
When replying, please edit your Subject line so it is more specific
than “Re: Contents of Pgrouting-users digest…”
Today’s Topics:
- Re: Pgrouting-users Digest, Vol 131, Issue 1 (Matteo Ruggieri)
Message: 1
Date: Tue, 3 Nov 2020 16:33:49 +0100
From: Matteo Ruggieri matteoruggieri91@gmail.com
To: pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] Pgrouting-users Digest, Vol 131, Issue
1
Message-ID:
CAFaA-xJitS1v3hY5HDETjoaQSRUW=Y0RewQNXUmoAyZvLyj=2g@mail.gmail.com
Content-Type: text/plain; charset=“utf-8”
Hi Daniel,
What I need is to build one or more waste collection routes for my city.
For such project like this I guess I have to keep in mind the capacity of
the truck: Anita Graser told me in a message that “for a single vehicle and
if I can ignore the capacity, I could use the TSP or, for more complex
cases, I could use the VRP” (as you suggested too).
Anyway, I want a truck to start from point A, make its collection route
passing through the points assigned to the driver (each stop corresponds to
a building with an X number of waste bins) and then finally come back again
to point A (depot).
I have to say that I wonder what are the consequences if the truck reaches
its maximum capacity during the route and just before returning to point A
too…
Currently I only have the nodes and edges of my city taken from OSM and
uploaded to PostGIS.
I am not an expert in Pgrouting but obviously I want to learn a lot.
Currently I don’t know what kind of function I have to choose and how to
work with it.
Also, I wonder if pgrouting can suggest the best stops once it has
calculated the best route of the whole network of streets and then divide
the city into smaller areas for garbage collection on my own (and maybe use
the same function for smaller areas) or if first I have to insert the stops
together with the edges and nodes (or if there is some network analysis
tool outside pgrouting that can suggest me the best areas and then do the
work).
In the end, each individual driver must have an optimized route waste
collection of a certain area available.
I sincerely hope I have made you understand what my intentions are about
this project.
Regards,
Matteo
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZS06xq8fAsAIzqC87QOJrS6NAB2KD%2Ft2kLWod8Gtcbg%3D&reserved=0>
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tC5B2BAYpntJOrE37Kd8F0dQts27MeUeCMuTOTuwpHc%3D&reserved=0
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZS06xq8fAsAIzqC87QOJrS6NAB2KD%2Ft2kLWod8Gtcbg%3D&reserved=0>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Il giorno lun 2 nov 2020 alle ore 21:01 <
pgrouting-users-request@lists.osgeo.org> ha scritto:
Send Pgrouting-users mailing list submissions to
pgrouting-users@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RiNZa23y3IsDRY0PKBnebhZLp0MVwv3wJvX5Ut1B5ac%3D&reserved=0
or, via email, send a message with subject or body ‘help’ to
pgrouting-users-request@lists.osgeo.org
You can reach the person managing the list at
pgrouting-users-owner@lists.osgeo.org
When replying, please edit your Subject line so it is more specific
than “Re: Contents of Pgrouting-users digest…”
Today’s Topics:
- Route for waste collection with pgrouting (Matteo Ruggieri)
- Re: Route for waste collection with pgrouting (Daniel Kastl)
Message: 1
Date: Mon, 2 Nov 2020 13:13:01 +0100
From: Matteo Ruggieri matteoruggieri91@gmail.com
To: pgrouting-users@lists.osgeo.org
Subject: [pgrouting-users] Route for waste collection with pgrouting
Message-ID:
<
CAFaA-x+4vkcmvYA1tPPCY+NBAizV4BO1Eu1gF5Spchjkhg_heg@mail.gmail.com>
Content-Type: text/plain; charset=“utf-8”
Good morning,
I have just started using PostGIS and, at the moment, the only thing I have
done is to load node and edge data into the database with osm2pgrouting and
create the postgis, pgrouting and postgis_topology extensions
I need help in creating a routing optimized for door-to-door waste
collection (multiple stops) and with starting and ending point at the same
place. Can someone help me understand more?
Thanks
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZS06xq8fAsAIzqC87QOJrS6NAB2KD%2Ft2kLWod8Gtcbg%3D&reserved=0
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nqnv2nO2jLIDr7xeOBlVLq1L713aOSRw2SHYgVQ5mvw%3D&reserved=0
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y6rMJX3a4iAD89TqZYoowkrF3Q280Alvvc7u35Gx93Y%3D&reserved=0
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed…
URL: <
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.osgeo.org%2Fpipermail%2Fpgrouting-users%2Fattachments%2F20201102%2F2208c5a4%2Fattachment-0001.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7vkQcTTu9H70aor5XiZVBTGzDQOeCJgScpUOdX9eQvc%3D&reserved=0
Message: 2
Date: Mon, 2 Nov 2020 21:44:58 +0900
From: Daniel Kastl daniel@georepublic.de
To: pgRouting users mailing list pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] Route for waste collection with
pgrouting
Message-ID:
<CABXBSH-C=
XXAwOPq6-hNgugVhTNa1UOT6pjobveVHFSqjA9DMQ@mail.gmail.com>
Content-Type: text/plain; charset=“utf-8”
Hi Matteo,
Can you explain to us a bit more details about the requirements of your
application?
There are a few functions in pgRouting, that can eventually do what you
need to do:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.pgrouting.org%2Flatest%2Fen%2FVRP-category.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BtthRDyab%2BZZnYjJpWx%2FH7T8aaT11l9wYgiAiGzRRfU%3D&reserved=0
Best regards,
Daniel
On Mon, 2 Nov 2020 at 21:13, Matteo Ruggieri matteoruggieri91@gmail.com
wrote:
Good morning,
I have just started using PostGIS and, at the moment, the only thing I
have done is to load node and edge data into the database with
osm2pgrouting and create the postgis, pgrouting and postgis_topology
extensions
I need help in creating a routing optimized for door-to-door waste
collection (multiple stops) and with starting and ending point at the
same
place. Can someone help me understand more?
Thanks
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y6rMJX3a4iAD89TqZYoowkrF3Q280Alvvc7u35Gx93Y%3D&reserved=0>
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nqnv2nO2jLIDr7xeOBlVLq1L713aOSRw2SHYgVQ5mvw%3D&reserved=0
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y6rMJX3a4iAD89TqZYoowkrF3Q280Alvvc7u35Gx93Y%3D&reserved=0
<#m_6379839493367832948_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5vEXEYx0cjULDY6br9wzrUXIPe3e7BSnwpA9K9Dr4n0%3D&reserved=0
–
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgeorepublic.info%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ABxgHuz7b8Q7Yws7vbiWgrBaFm7IC1Eq1VrYrP%2BZPX8%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed…
URL: <
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.osgeo.org%2Fpipermail%2Fpgrouting-users%2Fattachments%2F20201102%2Fb93b5e5c%2Fattachment-0001.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2z3VfGTlVmvkc40jxCOjj3%2F8eCBun9jH4Mz1SS9qt4A%3D&reserved=0
Subject: Digest Footer
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5vEXEYx0cjULDY6br9wzrUXIPe3e7BSnwpA9K9Dr4n0%3D&reserved=0
End of Pgrouting-users Digest, Vol 131, Issue 1
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PtU2n6oSu6lMLdr5zoZiuk23jnvseFJIqkb4I5hCfYU%3D&reserved=0>
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=F1TBo8GQh3oDLfD3WQY81du0nKBiatzYcWRnV%2FKJsNM%3D&reserved=0
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386119309%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FxRxNGSa2vu3sOtdmsd%2FKR1nmWoJY5iAMAlpmE9DjHg%3D&reserved=0>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed…
URL: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.osgeo.org%2Fpipermail%2Fpgrouting-users%2Fattachments%2F20201103%2Ffa67d8fe%2Fattachment-0001.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386119309%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=B9U2EsnHCH%2FOXItuH9ji5iNl5fcEE0KF8z3T1jF5zck%3D&reserved=0>
Subject: Digest Footer
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386119309%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8MXovl2NqVXwOgJNKSHbZBZDKRp8RPhY6dtyOaxN3w4%3D&reserved=0
End of Pgrouting-users Digest, Vol 131, Issue 2
Hi Matteo,
In addition to what has been already suggested, I feel like adding the following points.
Currently I only have the nodes and edges of my city taken from OSM and uploaded to PostGIS.
I am not an expert in Pgrouting but obviously I want to learn a lot.
Currently I don’t know what kind of function I have to choose and how to work with it.
As you have successfully loaded the OSM data to PostGIS, the first step is completed. Now, every stop would correspond to a particular node (point/multipoint features) and the vehicle (truck) would be using edges (line/multiline features) for finding the optimized route. So, next questions:
-
Which functions to use?
A: As Daniel and Anita mentioned, you can choose to use pgr_TSP (pgRouting function of Travelling Salesman Problem) or explore functions from Vehicle Routing Functions Category.
-
How to use the functions?
A: Marcus mentioned a superb source. pgRouting Workshops are another great source. I have been following the same to understand the implementation of algorithms. More specifically, Chapter 5 would give you an overview of implementing pgRouting algorithms (pgr_dijkstra and pgr_dijkstraCost functions) in general, on a PostGIS enabled db prepared using OSM data. Building on this, you can implement functions for your problem.
Also, I wonder if pgrouting can suggest the best stops once it has
calculated the best route of the whole network of streets and then divide the city into smaller areas for garbage collection on my own (and maybe use the same function for smaller areas) or if first I have to insert the stops together with the edges and nodes (or if there is some network analysis tool outside pgrouting that can suggest me the best areas and then do the work).
I feel this could be automated as a script to perform routing for smaller views and then combining it together by creating network topology. The Chapter on Creating a Network Topology might be of help. But, my knowledge is restricted regarding this at the moment, I would love to hear more thoughts.
Hope this helps!
Kind regards,
Rajat
On Wed, Nov 4, 2020 at 1:40 AM Marcus Young <M.A.Young@soton.ac.uk> wrote:
Hi Matteo
I can thoroughly recommend this book on pgRouting:
https://locatepress.com/pgrouting
It helped me so much when I was first getting to grips with it.
Best wishes
Marcus
CAUTION: This e-mail originated outside the University of Southampton.
Send Pgrouting-users mailing list submissions to
pgrouting-users@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386099340%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=1S9TdwB6T7hk0Cc17z1UqBurEbibgae%2BI245qJaR%2Fys%3D&reserved=0
or, via email, send a message with subject or body ‘help’ to
pgrouting-users-request@lists.osgeo.org
You can reach the person managing the list at
pgrouting-users-owner@lists.osgeo.org
When replying, please edit your Subject line so it is more specific
than “Re: Contents of Pgrouting-users digest…”
Today’s Topics:
- Re: Pgrouting-users Digest, Vol 131, Issue 1 (Matteo Ruggieri)
Message: 1
Date: Tue, 3 Nov 2020 16:33:49 +0100
From: Matteo Ruggieri <matteoruggieri91@gmail.com>
To: pgrouting-users@lists.osgeo.org
Subject: Re: [pgrouting-users] Pgrouting-users Digest, Vol 131, Issue
1
Message-ID:
<CAFaA-xJitS1v3hY5HDETjoaQSRUW=Y0RewQNXUmoAyZvLyj=2g@mail.gmail.com>
Content-Type: text/plain; charset=“utf-8”
Hi Daniel,
What I need is to build one or more waste collection routes for my city.
For such project like this I guess I have to keep in mind the capacity of
the truck: Anita Graser told me in a message that “for a single vehicle and
if I can ignore the capacity, I could use the TSP or, for more complex
cases, I could use the VRP” (as you suggested too).
Anyway, I want a truck to start from point A, make its collection route
passing through the points assigned to the driver (each stop corresponds to
a building with an X number of waste bins) and then finally come back again
to point A (depot).
I have to say that I wonder what are the consequences if the truck reaches
its maximum capacity during the route and just before returning to point A
too…
Currently I only have the nodes and edges of my city taken from OSM and
uploaded to PostGIS.
I am not an expert in Pgrouting but obviously I want to learn a lot.
Currently I don’t know what kind of function I have to choose and how to
work with it.
Also, I wonder if pgrouting can suggest the best stops once it has
calculated the best route of the whole network of streets and then divide
the city into smaller areas for garbage collection on my own (and maybe use
the same function for smaller areas) or if first I have to insert the stops
together with the edges and nodes (or if there is some network analysis
tool outside pgrouting that can suggest me the best areas and then do the
work).
In the end, each individual driver must have an optimized route waste
collection of a certain area available.
I sincerely hope I have made you understand what my intentions are about
this project.
Regards,
Matteo
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZS06xq8fAsAIzqC87QOJrS6NAB2KD%2Ft2kLWod8Gtcbg%3D&reserved=0>
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tC5B2BAYpntJOrE37Kd8F0dQts27MeUeCMuTOTuwpHc%3D&reserved=0
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZS06xq8fAsAIzqC87QOJrS6NAB2KD%2Ft2kLWod8Gtcbg%3D&reserved=0>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Il giorno lun 2 nov 2020 alle ore 21:01 <
pgrouting-users-request@lists.osgeo.org> ha scritto:
Send Pgrouting-users mailing list submissions to
pgrouting-users@lists.osgeo.org
To subscribe or unsubscribe via the World Wide Web, visit
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RiNZa23y3IsDRY0PKBnebhZLp0MVwv3wJvX5Ut1B5ac%3D&reserved=0
or, via email, send a message with subject or body ‘help’ to
pgrouting-users-request@lists.osgeo.org
You can reach the person managing the list at
pgrouting-users-owner@lists.osgeo.org
When replying, please edit your Subject line so it is more specific
than “Re: Contents of Pgrouting-users digest…”
Today’s Topics:
- Route for waste collection with pgrouting (Matteo Ruggieri)
- Re: Route for waste collection with pgrouting (Daniel Kastl)
Message: 1
Date: Mon, 2 Nov 2020 13:13:01 +0100
From: Matteo Ruggieri <matteoruggieri91@gmail.com>
To: pgrouting-users@lists.osgeo.org
Subject: [pgrouting-users] Route for waste collection with pgrouting
Message-ID:
<
CAFaA-x+4vkcmvYA1tPPCY+NBAizV4BO1Eu1gF5Spchjkhg_heg@mail.gmail.com>
Content-Type: text/plain; charset=“utf-8”
Good morning,
I have just started using PostGIS and, at the moment, the only thing I have
done is to load node and edge data into the database with osm2pgrouting and
create the postgis, pgrouting and postgis_topology extensions
I need help in creating a routing optimized for door-to-door waste
collection (multiple stops) and with starting and ending point at the same
place. Can someone help me understand more?
Thanks
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386104331%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZS06xq8fAsAIzqC87QOJrS6NAB2KD%2Ft2kLWod8Gtcbg%3D&reserved=0
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nqnv2nO2jLIDr7xeOBlVLq1L713aOSRw2SHYgVQ5mvw%3D&reserved=0
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y6rMJX3a4iAD89TqZYoowkrF3Q280Alvvc7u35Gx93Y%3D&reserved=0
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed…
URL: <
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.osgeo.org%2Fpipermail%2Fpgrouting-users%2Fattachments%2F20201102%2F2208c5a4%2Fattachment-0001.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7vkQcTTu9H70aor5XiZVBTGzDQOeCJgScpUOdX9eQvc%3D&reserved=0
Message: 2
Date: Mon, 2 Nov 2020 21:44:58 +0900
From: Daniel Kastl <daniel@georepublic.de>
To: pgRouting users mailing list <pgrouting-users@lists.osgeo.org>
Subject: Re: [pgrouting-users] Route for waste collection with
pgrouting
Message-ID:
<CABXBSH-C=
XXAwOPq6-hNgugVhTNa1UOT6pjobveVHFSqjA9DMQ@mail.gmail.com>
Content-Type: text/plain; charset=“utf-8”
Hi Matteo,
Can you explain to us a bit more details about the requirements of your
application?
There are a few functions in pgRouting, that can eventually do what you
need to do:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.pgrouting.org%2Flatest%2Fen%2FVRP-category.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=BtthRDyab%2BZZnYjJpWx%2FH7T8aaT11l9wYgiAiGzRRfU%3D&reserved=0
Best regards,
Daniel
On Mon, 2 Nov 2020 at 21:13, Matteo Ruggieri <matteoruggieri91@gmail.com>
wrote:
Good morning,
I have just started using PostGIS and, at the moment, the only thing I
have done is to load node and edge data into the database with
osm2pgrouting and create the postgis, pgrouting and postgis_topology
extensions
I need help in creating a routing optimized for door-to-door waste
collection (multiple stops) and with starting and ending point at the
same
place. Can someone help me understand more?
Thanks
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y6rMJX3a4iAD89TqZYoowkrF3Q280Alvvc7u35Gx93Y%3D&reserved=0>
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=nqnv2nO2jLIDr7xeOBlVLq1L713aOSRw2SHYgVQ5mvw%3D&reserved=0
<
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386109324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Y6rMJX3a4iAD89TqZYoowkrF3Q280Alvvc7u35Gx93Y%3D&reserved=0
<#m_6379839493367832948_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5vEXEYx0cjULDY6br9wzrUXIPe3e7BSnwpA9K9Dr4n0%3D&reserved=0
–
Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgeorepublic.info%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ABxgHuz7b8Q7Yws7vbiWgrBaFm7IC1Eq1VrYrP%2BZPX8%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed…
URL: <
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.osgeo.org%2Fpipermail%2Fpgrouting-users%2Fattachments%2F20201102%2Fb93b5e5c%2Fattachment-0001.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2z3VfGTlVmvkc40jxCOjj3%2F8eCBun9jH4Mz1SS9qt4A%3D&reserved=0
Subject: Digest Footer
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=5vEXEYx0cjULDY6br9wzrUXIPe3e7BSnwpA9K9Dr4n0%3D&reserved=0
End of Pgrouting-users Digest, Vol 131, Issue 1
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PtU2n6oSu6lMLdr5zoZiuk23jnvseFJIqkb4I5hCfYU%3D&reserved=0>
Mail
priva di virus. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avast.com%2F&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386114310%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=F1TBo8GQh3oDLfD3WQY81du0nKBiatzYcWRnV%2FKJsNM%3D&reserved=0
<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avast.com%2Fsig-email%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Dwebmail&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386119309%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=FxRxNGSa2vu3sOtdmsd%2FKR1nmWoJY5iAMAlpmE9DjHg%3D&reserved=0>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-------------- next part --------------
An HTML attachment was scrubbed…
URL: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.osgeo.org%2Fpipermail%2Fpgrouting-users%2Fattachments%2F20201103%2Ffa67d8fe%2Fattachment-0001.html&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386119309%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=B9U2EsnHCH%2FOXItuH9ji5iNl5fcEE0KF8z3T1jF5zck%3D&reserved=0>
Subject: Digest Footer
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fpgrouting-users&data=04%7C01%7Cm.a.young%40soton.ac.uk%7Cc9e5af92eb624279831508d8803321a3%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637400304386119309%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8MXovl2NqVXwOgJNKSHbZBZDKRp8RPhY6dtyOaxN3w4%3D&reserved=0
End of Pgrouting-users Digest, Vol 131, Issue 2
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/pgrouting-users
Hello Rajat and Marcus,
I really apologize if I answer several days late but I had commitments and
not born that I also tried a full immersion with pgrouting. I tried to
understand a little better postgis and pgrouting and I must say that it is
really incredible.
I tried to follow the available workshops and documentation. They allowed me
to take some steps forward even though I understand English very well, I
have some difficulties to fully understand some procedures.
Anyway, I wrote this with TSP and pgr_dijkstracostmatrix:
SELECT * FROM pgr_TSP(
$$
SELECT * FROM pgr_dijkstraCostMatrix(
'SELECT gid as id, source, target, cost, reverse_cost FROM
public.ways',
(select array_agg(id) from public.ways_vertices_pgr where id in
(729,203,314,579,621,719)), directed := false)
$$,
start_id := 729,
randomize := false
);
I took only very few nodes to do an initial test and the query gave me a
positive result with node1 which turns out to be both initial and final
node.
I don't know if this is the right procedure to try somehow to simulate the
routing of a vehicle (at the moment I am only interested in trying to write
the algorithm correctly) but the biggest problem that stops me is that I
don't know how to do the join between the_geom column (obtained thanks to
the work done by osm2pgrouting) and the algorithm that I wrote so that I can
display the result on QGIS with DBmanager. I was able to do the join with
the simple algorithm of the shortest path, but now here is not what to write
and I got a bit lost.
thanks for the help you are giving me and I hope you guys are ok.
Regards,
Matteo
--
Sent from: http://osgeo-org.1560.x6.nabble.com/pgRouting-users-f5197103.html