Regarding animating OR-Tools routes

322 views
Skip to first unread message

Subramanian Ramasamy

unread,
Apr 7, 2021, 1:25:53 PM4/7/21
to or-tools...@googlegroups.com
Hello all,
I am trying to animate the routes that we get as an output from the solver. I just went through this Activimetrics blog https://activimetrics.com/blog/animating_ortools_routes/ where it tells regarding mapping and animating OR Tools routes, but it's a bit difficult for me to understand completely. Any working example code that implements this animation that's mentioned in the above link would be highly appreciated. Looking forward to hearing from you. Thank you.

-Subramanian

blind.lin...@gmail.com

unread,
Apr 7, 2021, 2:24:55 PM4/7/21
to or-tools...@googlegroups.com
Hi,

First, animating routes is probably outside of the scope of this
mailing list.

Second, if you're a beginner, then that is probably way too
complicated a place to start.

Third, I wrote that, and did that work, etc etc. I post a lot of code
in the blog, but sometimes I don't feel like sharing everything. I
did talk with one person who was able to reproduce what I did. There
are a few places where I've deliberately left things out...as an
exercise for the reader...and he hit those points and asked questions, etc.

I also did a presentation last fall for the Postgres virtual
conference on that topic, focusing more on the database tricks used.
The link is here
https://activimetrics.com/presentations/2020/pgconf/streetsweep/

Regards,

James
> --
> You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/CADV3ZND%3D6FLY3xSSv1aw1DEPs20euiWjzZVqGkorcH4-GZ0LTA%40mail.gmail.com.

--

James E. Marca
Activimetrics LLC

Subramanian Ramasamy

unread,
Apr 7, 2021, 3:04:56 PM4/7/21
to or-tools...@googlegroups.com
Thank you for your email. Will look into it.
Regards,
Subramanian

Priidik Vilumaa

unread,
Apr 8, 2021, 3:02:55 AM4/8/21
to or-tools...@googlegroups.com
Some tools I've used (mostly Python):

1) If you are visualizing just for the sake of debugging, then plot the points/lines with matplotlib on a white canvas. It's very fast/simple and will give you enough information.
Matplotlib also has map backgrounds called Basemap but IIRC it was a pain to install on Windows -I tried once and didn't get it to work.

2) When doing routing simulations I use the pygame module to add a visualization layer. Then grab a .png map background from the web, store the image corner coordinates somewhere and transform each routing node from coordinates to pixels using the corner coordinates.

3) Google Maps Javascript API

Subramanian Ramasamy

unread,
Apr 8, 2021, 10:00:26 AM4/8/21
to or-tools...@googlegroups.com
Thank you for your reply. Will look into it.

-Subramanian

Reply all
Reply to author
Forward
0 new messages