Simcity updates, January

There are not too many updates this month except the fact that I focused on code refactoring, readability and URL scheme polishing for the presentation that I held on January 10th. The slides are available on Slideshare for download; thanks everyone who attended !


  • As i said before, did some serious code refactoring, if you have troubles in merging, I am happy to help.
  • Several query string parameters can be used to customize the simulation:
    • hms: used to set the simulation time in hh:mm:ss format (i.e. the simulation position for 17:45:13.)
    • x, y: longitude and latitude – used to set the simulation start location to a custom location (i.e. Lausanne)
    • vehicle_name: used to automatically track a vehicle when we know its name. Example: the position of IC 835 at 17:45. Will let your imagine how easy is to integrate (via an IFRAME ?) this “boring” table view from SBB.
    • Bunch of experimental parameters(action, station_ids, arrs, deps, vehicle_name, vehicle_type) – used for adding a custom vehicle having the timetables declared via querystring. Example: a TGV running with 330 km/h between Zürich and Basel; it needs only 16 minutes :).
  • Stations panel: integration between stations and vehicles. Clicking on a vehicle brings a panel showing the stations that the vehicle stopped (grey-ish) and the upcoming stations. Clicking on any station loads the station panel containing the next 10 vehicles transiting that station. Clicking on any vehicle starts following the vehicle and so on. Personally I did a lot of clicking but you know that I am a train buff already :).

Stay up-to-date

If you want to stay in touch with these updates, best will be to subscribe to this project’s RSS feed.
Use Twitter or this space to get in touch with me and suggest further updates.

Thanks for your interest in this project !

Jan 22nd, 2012 | Posted in Hobbies
  1. Amit Shukla
    Jul 23rd, 2014 at 08:13 | #1

    Hi , Firstly I am sorry for asking direct questions. Actually vehicle-simulator is really awesome and I want to run it on my custom data. I am facing problem because I don’t have knowledge about Ruby.

    I am facing 2 problems

    1. How to create shape.txt from stop.txt
    (# If the shapes.txt is missing from the GTFS dataset, generate one based on stops.txt)

    2. I am facing problem while rake parse:gtfs_2_sqlite
    amit@iSeven:~/Music/vehicalTracking/GTFS-viz$ sudo rake parse:gtfs_2_sqlite
    11:40:07 +0 : START SQL inserts from GTFS files
    rm -f /home/amit/Music/vehicalTracking/GTFS-viz/tmp/test/gtfs.db
    11:40:08 +1 : SQL INSERT trips, 18758 records
    rake aborted!
    TypeError: can’t convert Hash into String
    /home/amit/Music/vehicalTracking/GTFS-viz/inc/gtfs.rb:38:in `foreach’
    /home/amit/Music/vehicalTracking/GTFS-viz/inc/gtfs.rb:38:in `parse_file’
    /home/amit/Music/vehicalTracking/GTFS-viz/Rakefile:68:in `each’
    Tasks: TOP => parse:gtfs_2_sqlite

    I dont know what happen , why rake aborted!

    Will you please help me , Thanks in advance.

Comments are closed.