‘UnOxbow’ – A custom Algorithm I wrote to calculate Public Transit Routes

Amdavad BRTS is one of the best Apps I’ve created for Windows Phone. It’s a companion App for Ahmedabad’s Janmarg users with features like Route Finder, Fare calculator, Live Bus times, Station/Line details, and Weather. The App has more than 7,000 downloads, 170 reviews, and ratings averaging at 4.5 stars. Considering its target audience of just one city + the market share of Windows Phone, I think it’s doing really good.

In this post, I’m going to talk about a custom Algorithm I wrote to find Transit Routes for the ‘Route Finder’ feature of the App. I call it ‘UnOxbow’ (Yeah, I’m not very good at naming stuff). The problem was to compute the best possible Transit Route between 2 Stations while considering the criteria of Time, Distance, and Number of Transfers. To Tackle the problem, I created a round based Algorithm which scans all Routes every round to find route with or without transfers.

Starting with the Data I could get about the Mass public transit, Janmarg BRTS has 109 Routes and 144 Stations. Routes are a list of Station Ids where a Bus runs from the First station to the Last. The return journey of Bus from that Last station to First is again another Route. All Stations have an id, name, and their geo-coordinates.

I pre-processed this Data by listing all Adjacent Junctions for every Station where a Transfer of Route is possible. Any Station on 2 or more Routes are considered as a Junction. All Junctions on same route of a Station are their Adjacent Junctions.

Example Route Map

To discuss this Algorithm, consider the above Route Map. Buses run in direction shown by arrow in all 4 Routes while there are 20 stations distributed in 4 routes. We’ll try to find Route from Station S to all three Stations D.

Continue Reading..

Meru Cabs for Windows Phone 8.1 is now available in Store

Meru Cabs, an awesome new App that lets you book Cab Rides in 21 cities of India with One click, landed on Windows Phone Store today. I worked closely with the team at Meru Cabs for this App and I am very proud of what we’ve created.

The App has been completely re-written in WinRT and has lots of cool new features like One Tap cab booking, Cab & Ride Tracking, Meru Genie & Meru Eve booking, etc. Here are some screenshots of the App:

One Tap booking Schedule a Pickup

Continue Reading..

Thanks Windows India!

Disabling Display timeout in Universal Windows App

There are many scenarios in an App where you’d want the User’s device display to stay On; For showing directions, playing videos, presentations, reading, to name a few.

In Universal Windows Apps, this can be done with DisplayRequest:

using Windows.System.Display;

DisplayRequest displayRequest = new DisplayRequest();
displayRequest.RequestActive();

This will make sure that the device’s display stays On even without any User interaction while the App presents relevant info on screen. The App can also enable Display timeout when it no longer needs the display to stay On.

To Re-enable the Display timeout simply make the following call:

displayRequest.RequestRelease();

Always re-enable the Display timeout when it’s not required. Also, keep in mind that the Display Requests are cumulative. For every Active requests, you will have to request Releases to enable Display timeout. You can enable and disable Display timeout any & as many times you want in the App.

I hope this Mini article helps you in your App development. Happy coding!

Ludo for Windows 8.1

Ludo 2.0 for Windows

Ludo was my first Windows 8 App uploaded to the Store in 2012. I created the game in Microsoft’s Windows 8 hackathon, and it was up in Store before Windows 8 RTM. It has been doing great with downloads and ratings without any updates with new features. Today, I’m changing that.

I’ve just released Ludo 2.0 to the Windows Store. The game has been re-written with lots of new features:

• All new ‘Sleek’ board theme
• Six colors for Player to choose from
• Create Bot to play against; Handy if you can’t find a 4th player
• Switch board themes with Swipe/Click
• Options to customize gameplay like chances to Roll 6, Extra Turns etc.

The Game is free with one In-App Purchase to get the Sleek theme. Download Now!

Download from Windows Store

© Nirmit Kavaiya