Skip to content

Instantly share code, notes, and snippets.

View mck-'s full-sized avatar

Marc Kuo mck-

View GitHub Profile
@mck-
mck- / routific-local-motion.js
Created March 22, 2016 23:30
Routific solution to Local Motion challenge
var drivingSchedule = {};
var turnNumber = 0;
var MIN_VISITS_PER_VEHICLE = 1; // to keep everyone busy
var OPTIMIZE_EVERY_X_TURNS = 5;
var turn = function(vehicles, people, buildings) {
'use strict';
if(turnNumber % OPTIMIZE_EVERY_X_TURNS === 0 && turnNumber < 1000) {
// Parse data to be suitable for Routific's API
@mck-
mck- / gist:ce8b8a62da493991cc48
Last active August 29, 2015 14:13
Routific gem example in Australia
require 'routific'
routific = Routific.new(API_KEY)
routific.setLocation("Funtastico", {
"name" => "12 Rokeby Road",
"lat" => -31.945864,
"lng" => 115.823981,
})
@mck-
mck- / osrm-extract dump
Created March 7, 2014 22:39
osrm-extract Error logs
$ /Project-OSRM/build# ./osrm-extract north-america-latest.osm.pbf
[info] Input file: north-america-latest.osm.pbf
[info] Profile: profile.lua
[info] Threads: 8
[info] Using script profile.lua
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 50000 MiB
[info] Using turn restrictions
[info] Found 3 exceptions to turn restriction
[info] motorcar