MGMLaboratory
Back

Menu

01Home
02About Us
03Projects
04Publications
05Member
06Articles
07Contact

Let's Talk

Open in Mail app

Socials

Malang (ID) --:--Privacy PolicyTerms of Service

December 20, 20192 min read

Why Depth-First Search Was the Right Call HereWhy Depth-First Search Was the Right Call Here

The planner behind a mikrolet route service traded optimal paths for rules that were easy to change.

  • Journal
  • Publications

Written by

  • SRShirasaka RenIT & Infrastructure · Student Member

In this article

  1. 01Wrapping it as a service
  2. 02The honest limitation

Depth-first search has a mixed reputation in routing. It does not guarantee the shortest path, and on a dense network it can wander down long branches before finding anything useful. When a team picks it anyway for a public transport trip planner, the reason is worth understanding.

A schematic route map for a proposed rail scheme. Image: Sagredo, CC BY-SA 3.0, via Wikimedia Commons.
Fig. 01A schematic route map for a proposed rail scheme. Image: Sagredo, CC BY-SA 3.0, via Wikimedia Commons.

In the Malang mikrolet study, the authors are upfront about the trade. They chose depth-first search because it is relatively simple to modify, and the routing rules for paratransit were still being worked out. Producing correct plans mattered more, at that stage, than shaving milliseconds.

01/02

Wrapping it as a service

The other half of the design is where the plans live. Rather than baking routing into a phone app, the team exposed it as a REST web service in a location-based style. A request carries an origin and a destination. A response carries candidate journeys.

  • REST keeps routing logic in one place instead of shipping it in every client.
  • A request is only coordinates, so an app, a web page, or a kiosk can share one endpoint.
  • The client can change without touching the planner.
Mikrolet routes are informal and hard to look up. Image: Annidafattiya, CC0, via Wikimedia Commons.
Fig. 02Mikrolet routes are informal and hard to look up. Image: Annidafattiya, CC0, via Wikimedia Commons.

Functional testing confirmed the plans came out as expected. That is a modest but real milestone, because a route planner that returns plausible but wrong itineraries is worse than no planner at all.

02/02

The honest limitation

The same choice that made the planner easy to modify makes it expensive to scale. As routes and possible plans multiply, the search slows down, and the authors flag optimization as the next step. Depth-first search was a fair call for a prototype. The paper does not pretend it will carry the system forever.

For anyone sitting on legacy transport data, the order of operations is the lesson. Ship something correct on a simple foundation, learn what riders actually need, and optimize once you know which problem you are solving.

Source

  1. Kharisma and Pinandito (2019). Prototype of REST Location-based Service for Trip Planning by Paratransit (Mikrolet) in Malang City. Journal of Information Technology and Computer Science.

    DOI10.25126/jitecs.201943131 (opens in a new tab)

Next articleWisatawan Menerima Aplikasi Kuliner Halal di Malang(Keep scrolling)(Read it next)(Loading)