<

Using OpenTTD to create a realistic data stream

Published on
3,368 Points
168 Views
2 Endorsements
Last Modified:
Shaun Vermaak
My name is Shaun Vermaak and I have always been fascinated with technology and how we use it to enhance our lives and business.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.

A while back I was going through a refresher course on Azure Stream Analytics (https://www.pluralsight.com/courses/azure-stream-analytics-understanding by Alan Smith) and found the method used to generate data fascinating.


Basically, Alan used an opensource C# racing game to build a whole course on Azure Stream Analytics and the processing of telemetry data generated by it.


I took inspiration from it and manipulated a C++ opensource game OpenTTD to output JSON messages to disk which is then streamed to Azure via an Eventhub.


After scouring the code I found a procedure called OnNewDay which is called for each vehicle when a day is over.



This procedure was perfect for adding a function that would log out the vehicle information



Here is the full listing of LogVehicleEvent (bear in mind I primarily code in C#)


LogEvents.cpp

#include "stdafx.h"
#include <string>
#include "vehicle_base.h"
#include "station_base.h"
#include "strings_func.h"
#include "town_map.h"
#include "town.h"
#include "townname_func.h"
#include <iostream>
#include <fstream>
#include "LogEvents.h"
#include <ctime>

bool LogVehicleEvent(Vehicle *v)
{
/*
OwnerByte owner = v->owner;///< Which company owns the vehicle?
EngineID engine_type = v->engine_type;///< The type of engine used for this vehicle.
int CargoDaysInTransit = &v->cargo.DaysInTransit;///< Number of days cargo has been in transit
CargoID cargo_type = this->cargo_type;///< type of cargo this vehicle is carrying
byte cargo_subtype = this->cargo_subtype;///< Used for livery refits (NewGRF variations)
uint16 cargo_cap = this->cargo_cap;///< total capacity
uint16 refit_cap = this->refit_cap;///< Capacity left over from before last refit.
VehicleCargoList cargo = this->cargo;///< The cargo this vehicle is carrying
int8 trip_occupancy = this->trip_occupancy;///< NOSAVE: Occupancy of vehicle of the current trip (updated after leaving a station).
byte day_counter = this->day_counter;///< Increased by one for each day
byte vehstatus = this->vehstatus;///< Status
*/

Rect coord = v->coord;///< NOSAVE: Graphical bounding box of the vehicle, i.e. what to redraw on moves.
Money value = v->value;///< Value of the vehicle
Money profit_this_year = v->profit_this_year;///< Profit this year << 8, low 8 bits are fract
Money profit_last_year = v->profit_last_year;///< Profit last year << 8, low 8 bits are fract
Year build_year = v->build_year;///< Year the vehicle has been built.
Date max_age = v->max_age;///< Maximum age
Date age = v->age;///< Age in days
UnitID unitnumber = v->unitnumber;///< unit number, for display purposes only
uint16 cur_speed = v->cur_speed;///< current speed
Date date_of_last_service = v->date_of_last_service;///< Last date the vehicle had a service at a depot.
byte breakdowns_since_last_service = v->breakdowns_since_last_service;///< Counter for the amount of breakdowns.
Order current_order = v->current_order;///< The current order (+ status, like: loading)
StationID last_station_visited = v->last_station_visited;///< The last station we stopped at.
StationID last_loading_station = v->last_loading_station;///< Last station the vehicle has stopped at and could possibly leave from with any cargo loaded.  

if (unitnumber != 0)
{
string name;
string type;
time_t now = time(0);

switch (v->type) {
case VEH_TRAIN:    type = "Train"; break;
case VEH_ROAD:     type = "Road Vehicle"; break;
case VEH_SHIP:     type = "Ship"; break;
case VEH_AIRCRAFT: type = "Aircraft"; break;
default:           type = "Unknown Vehicle";
}

if (v->name != NULL)
{
name = v->name;
}
else
{
name = type + " " + to_string(unitnumber);
}

string lastStationVisited = GetTheStationName(last_station_visited);
string lastLoadingStation = GetTheStationName(last_loading_station);

//Build message
string message = "{";
message = message + "\"Name\":\"" + name + "\"";
message = message + ",";
message = message + "\"TimeStamp\":\"" + to_string(now) + "\"";
message = message + ",";
message = message + "\"Type\":\"" + type + "\"";
message = message + ",";
message = message + "\"CurrentSpeed\":" + to_string(cur_speed);
message = message + ",";
message = message + "\"LastStationVisited\":\"" + lastStationVisited + "\"";
message = message + ",";
message = message + "\"LastLoadingStation\":\"" + lastLoadingStation + "\"";
message = message + ",";
message = message + "\"ProfitLastYear\":" + to_string(profit_last_year);
message = message + ",";
message = message + "\"ProfitThisYear\":" + to_string(profit_this_year);
message = message + ",";
message = message + "\"Value\":" + to_string(value);
message = message + ",";
message = message + "\"BuildYear\":" + to_string(build_year);
message = message + ",";
message = message + "\"Age\":" + to_string(age);
message = message + ",";
message = message + "\"MaxAge\":" + to_string(max_age);
message = message + ",";
message = message + "\"DateOfLastService\":" + to_string(date_of_last_service);
message = message + ",";
message = message + "\"BreakdownsSinceLastService\":" + to_string(breakdowns_since_last_service);
message = message + "}";

//Write out message to temporary file
ofstream myfile;
string tempFolder = getenv("TEMP");
myfile.open(tempFolder + "\\" + GetRandomString(15, "abcdefghijklmnaoqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890") + ".txt");
myfile << message + "\n";
myfile.close();

return true;
}
}

//Get Station Name from Station ID
string GetTheStationName(StationID s)
{
string lastVisitedStation = "";
try
{
BaseStation *station = BaseStation::Get(s);

Town *town = station->town;

char buf1[(MAX_LENGTH_TOWN_NAME_CHARS + 1) * MAX_CHAR_LENGTH];
char buf2[(MAX_LENGTH_TOWN_NAME_CHARS + 1) * MAX_CHAR_LENGTH];

const char *buf = town->name;
if (buf == NULL) {
GetTownName(buf2, town, lastof(buf2));
buf = buf2;
}

StringID stationStringID = station->string_id;
string stationNamePart = GetStringPtr(stationStringID);
stationNamePart = stationNamePart.substr(stationNamePart.find(" ") + 1);

string townNameString(buf);

lastVisitedStation = townNameString + " " + stationNamePart;
}
catch (...)
{

}
return lastVisitedStation;
}

//Generate Random String
string GetRandomString(uint l = 15, std::string charIndex = "abcdefghijklmnaoqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890")
{
// l and charIndex can be customized, but I've also initialized them.

uint length = rand() % l + 1;
// length of the string is a random value that can be up to 'l' characters.

uint ri[15];
/* array of random values that will be used to iterate through random
indexes of 'charIndex' */

for (uint i = 0; i < length; ++i)
ri[i] = rand() % charIndex.length();
// assigns a random number to each index of "ri"

std::string rs = "";
// random string that will be returned by this function

for (uint i = 0; i < length; ++i)
rs += charIndex[ri[i]];
// appends a random amount of random characters to "rs"

if (rs.empty()) GetRandomString(l, charIndex);
// if the outcome is empty, then redo the generation (this doesn't work, help?)
else return rs;
}


LogEvents.h

#pragma once

#include "stdafx.h"
#include <string>
#include "vehicle_base.h"
#include "station_base.h"
#include "strings_func.h"
#include "town_map.h"
#include "town.h"
#include "townname_func.h"
#include <iostream>
#include <fstream>

using namespace std;

bool LogVehicleEvent(Vehicle *v);
string GetTheStationName(StationID s);
string GetRandomString(uint l, std::string charIndex);


The result is that a file is created every game day for each vehicle




And finally, here is an example after it passed through Azure Stream Analytics


Query

SELECT Name, Type, avg(CurrentSpeed) as AvgSpeed, max(CurrentSpeed) as MaxSpeed INTO [OpenTTDOutput] FROM [OpenTTDInput] GROUP BY Name, Type, TumblingWindow(minute,10)


Result

{"name":"Road 13","type":"Road","avgspeed":83.92307692307692,"maxspeed":176.0}
{"name":"Train 39","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 37","type":"Road","avgspeed":80.88,"maxspeed":176.0}
{"name":"Road 67","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 12","type":"Road","avgspeed":111.23076923076923,"maxspeed":176.0}
{"name":"Train 10","type":"Train","avgspeed":146.53846153846155,"maxspeed":264.0}
{"name":"Train 47","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 30","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 5","type":"Road","avgspeed":75.07692307692308,"maxspeed":176.0}
{"name":"Road 16","type":"Road","avgspeed":79.384615384615387,"maxspeed":176.0}
{"name":"Road 52","type":"Road","avgspeed":134.72,"maxspeed":176.0}
{"name":"Road 49","type":"Road","avgspeed":132.73076923076923,"maxspeed":176.0}
{"name":"Train 2","type":"Train","avgspeed":80.6,"maxspeed":264.0}
{"name":"Road 75","type":"Road","avgspeed":122.19230769230769,"maxspeed":176.0}
{"name":"Road 20","type":"Road","avgspeed":139.5,"maxspeed":176.0}
{"name":"Road 68","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 18","type":"Train","avgspeed":102.07692307692308,"maxspeed":198.0}
{"name":"Road 72","type":"Road","avgspeed":127.96153846153847,"maxspeed":176.0}
{"name":"Train 13","type":"Train","avgspeed":144.26923076923077,"maxspeed":264.0}
{"name":"Train 35","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 22","type":"Road","avgspeed":108.30769230769231,"maxspeed":176.0}
{"name":"Train 21","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 61","type":"Road","avgspeed":105.88461538461539,"maxspeed":176.0}
{"name":"Road 57","type":"Road","avgspeed":135.0,"maxspeed":176.0}
{"name":"Road 62","type":"Road","avgspeed":109.80769230769231,"maxspeed":176.0}
{"name":"Road 41","type":"Road","avgspeed":111.84615384615384,"maxspeed":176.0}
{"name":"Train 24","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 32","type":"Train","avgspeed":167.0,"maxspeed":264.0}
{"name":"Road 28","type":"Road","avgspeed":136.73076923076923,"maxspeed":176.0}
{"name":"Road 17","type":"Road","avgspeed":83.0,"maxspeed":176.0}
{"name":"Road 94","type":"Road","avgspeed":95.961538461538467,"maxspeed":201.0}
{"name":"Road 86","type":"Road","avgspeed":148.5,"maxspeed":176.0}
{"name":"Road 76","type":"Road","avgspeed":120.96,"maxspeed":176.0}
{"name":"Road 46","type":"Road","avgspeed":125.26923076923077,"maxspeed":176.0}
{"name":"Train 38","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 29","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 83","type":"Road","avgspeed":132.15384615384616,"maxspeed":176.0}
{"name":"Road 89","type":"Road","avgspeed":113.44,"maxspeed":176.0}
{"name":"Road 79","type":"Road","avgspeed":111.0,"maxspeed":176.0}
{"name":"Train 46","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 45","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 27","type":"Road","avgspeed":124.73076923076923,"maxspeed":176.0}
{"name":"Road 48","type":"Road","avgspeed":130.53846153846155,"maxspeed":176.0}
{"name":"Road 54","type":"Road","avgspeed":125.88461538461539,"maxspeed":176.0}
{"name":"Road 60","type":"Road","avgspeed":138.0,"maxspeed":176.0}
{"name":"Train 50","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 48","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 27","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 9","type":"Train","avgspeed":180.61538461538461,"maxspeed":264.0}
{"name":"Train 26","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 91","type":"Road","avgspeed":101.96,"maxspeed":224.0}
{"name":"Road 1","type":"Road","avgspeed":81.84,"maxspeed":176.0}
{"name":"Road 50","type":"Road","avgspeed":105.15384615384616,"maxspeed":176.0}
{"name":"Road 2","type":"Road","avgspeed":80.615384615384613,"maxspeed":176.0}
{"name":"Road 21","type":"Road","avgspeed":140.11538461538461,"maxspeed":176.0}
{"name":"Train 34","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 51","type":"Road","avgspeed":128.65384615384616,"maxspeed":176.0}
{"name":"Train 36","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Train 28","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 69","type":"Road","avgspeed":136.76923076923077,"maxspeed":176.0}
{"name":"Road 25","type":"Road","avgspeed":108.96153846153847,"maxspeed":176.0}
{"name":"Road 24","type":"Road","avgspeed":115.46153846153847,"maxspeed":176.0}
{"name":"Train 12","type":"Train","avgspeed":152.5,"maxspeed":264.0}
{"name":"Road 47","type":"Road","avgspeed":135.07692307692307,"maxspeed":176.0}
{"name":"Train 14","type":"Train","avgspeed":193.0,"maxspeed":264.0}
{"name":"Road 6","type":"Road","avgspeed":81.6923076923077,"maxspeed":176.0}
{"name":"Road 59","type":"Road","avgspeed":131.11538461538461,"maxspeed":176.0}
{"name":"Road 19","type":"Road","avgspeed":135.11538461538461,"maxspeed":176.0}
{"name":"Road 56","type":"Road","avgspeed":129.38461538461539,"maxspeed":176.0}
{"name":"Road 18","type":"Road","avgspeed":138.92307692307693,"maxspeed":176.0}
{"name":"Train 37","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 8","type":"Train","avgspeed":126.24,"maxspeed":264.0}
{"name":"Road 10","type":"Road","avgspeed":109.46153846153847,"maxspeed":176.0}
{"name":"Road 87","type":"Road","avgspeed":134.73076923076923,"maxspeed":176.0}
{"name":"Road 11","type":"Road","avgspeed":132.46153846153845,"maxspeed":176.0}
{"name":"Train 5","type":"Train","avgspeed":126.5,"maxspeed":264.0}
{"name":"Road 93","type":"Road","avgspeed":107.07692307692308,"maxspeed":224.0}
{"name":"Road 82","type":"Road","avgspeed":122.61538461538461,"maxspeed":176.0}
{"name":"Train 4","type":"Train","avgspeed":90.44,"maxspeed":264.0}
{"name":"Road 45","type":"Road","avgspeed":108.42307692307692,"maxspeed":176.0}
{"name":"Road 44","type":"Road","avgspeed":112.2,"maxspeed":176.0}
{"name":"Road 34","type":"Road","avgspeed":106.76923076923077,"maxspeed":176.0}
{"name":"Road 74","type":"Road","avgspeed":123.73076923076923,"maxspeed":176.0}
{"name":"Train 42","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 41","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Road 3","type":"Road","avgspeed":79.34615384615384,"maxspeed":176.0}
{"name":"Road 9","type":"Road","avgspeed":78.3076923076923,"maxspeed":176.0}
{"name":"Road 7","type":"Road","avgspeed":79.44,"maxspeed":176.0}
{"name":"Train 25","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 44","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 35","type":"Road","avgspeed":98.384615384615387,"maxspeed":176.0}
{"name":"Road 78","type":"Road","avgspeed":100.15384615384616,"maxspeed":176.0}
{"name":"Road 66","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 14","type":"Road","avgspeed":74.15384615384616,"maxspeed":176.0}
{"name":"Road 81","type":"Road","avgspeed":105.15384615384616,"maxspeed":176.0}
{"name":"Road 64","type":"Road","avgspeed":106.03846153846153,"maxspeed":176.0}
{"name":"Train 7","type":"Train","avgspeed":184.61538461538461,"maxspeed":264.0}
{"name":"Road 63","type":"Road","avgspeed":93.84615384615384,"maxspeed":176.0}
{"name":"Train 40","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 31","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 31","type":"Road","avgspeed":131.26923076923077,"maxspeed":176.0}
{"name":"Road 36","type":"Road","avgspeed":84.269230769230774,"maxspeed":176.0}
{"name":"Ship 1","type":"Ship","avgspeed":48.0,"maxspeed":48.0}
{"name":"Road 90","type":"Road","avgspeed":116.23076923076923,"maxspeed":176.0}
{"name":"Train 23","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Road 42","type":"Road","avgspeed":114.4,"maxspeed":176.0}
{"name":"Road 88","type":"Road","avgspeed":132.19230769230768,"maxspeed":176.0}
{"name":"Road 43","type":"Road","avgspeed":119.69230769230769,"maxspeed":176.0}
{"name":"Road 30","type":"Road","avgspeed":103.84,"maxspeed":176.0}
{"name":"Road 26","type":"Road","avgspeed":116.84615384615384,"maxspeed":176.0}
{"name":"Train 6","type":"Train","avgspeed":166.42307692307693,"maxspeed":264.0}
{"name":"Train 49","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 43","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Road 32","type":"Road","avgspeed":98.52,"maxspeed":176.0}
{"name":"Road 15","type":"Road","avgspeed":79.84615384615384,"maxspeed":176.0}
{"name":"Train 22","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 38","type":"Road","avgspeed":114.53846153846153,"maxspeed":176.0}
{"name":"Road 8","type":"Road","avgspeed":81.32,"maxspeed":176.0}
{"name":"Road 71","type":"Road","avgspeed":110.73076923076923,"maxspeed":176.0}
{"name":"Road 29","type":"Road","avgspeed":125.69230769230769,"maxspeed":176.0}
{"name":"Road 40","type":"Road","avgspeed":108.96153846153847,"maxspeed":176.0}
{"name":"Train 19","type":"Train","avgspeed":176.34615384615384,"maxspeed":264.0}
{"name":"Road 92","type":"Road","avgspeed":107.76923076923077,"maxspeed":224.0}
{"name":"Road 23","type":"Road","avgspeed":122.88461538461539,"maxspeed":176.0}
{"name":"Train 20","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 17","type":"Train","avgspeed":201.88461538461539,"maxspeed":264.0}
{"name":"Road 80","type":"Road","avgspeed":96.52,"maxspeed":176.0}
{"name":"Train 16","type":"Train","avgspeed":89.384615384615387,"maxspeed":185.0}
{"name":"Road 85","type":"Road","avgspeed":124.84,"maxspeed":176.0}
{"name":"Road 4","type":"Road","avgspeed":77.615384615384613,"maxspeed":176.0}
{"name":"Road 77","type":"Road","avgspeed":90.96,"maxspeed":176.0}
{"name":"Train 11","type":"Train","avgspeed":161.42307692307693,"maxspeed":264.0}
{"name":"Train 3","type":"Train","avgspeed":142.2,"maxspeed":264.0}
{"name":"Road 84","type":"Road","avgspeed":125.65384615384616,"maxspeed":176.0}
{"name":"Road 73","type":"Road","avgspeed":119.96153846153847,"maxspeed":176.0}
{"name":"Road 53","type":"Road","avgspeed":118.46153846153847,"maxspeed":176.0}
{"name":"Road 33","type":"Road","avgspeed":101.23076923076923,"maxspeed":176.0}
{"name":"Road 58","type":"Road","avgspeed":134.69230769230768,"maxspeed":176.0}
{"name":"Road 39","type":"Road","avgspeed":83.92307692307692,"maxspeed":176.0}
{"name":"Train 51","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 33","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 1","type":"Train","avgspeed":115.38461538461539,"maxspeed":264.0}
{"name":"Road 65","type":"Road","avgspeed":90.961538461538467,"maxspeed":176.0}
{"name":"Train 15","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 70","type":"Road","avgspeed":129.30769230769232,"maxspeed":176.0}
{"name":"Road 55","type":"Road","avgspeed":120.48,"maxspeed":176.0}
{"name":"Road 37","type":"Road","avgspeed":102.08,"maxspeed":176.0}
{"name":"Road 13","type":"Road","avgspeed":84.88,"maxspeed":176.0}
{"name":"Train 39","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 67","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 12","type":"Road","avgspeed":92.2,"maxspeed":176.0}
{"name":"Train 10","type":"Train","avgspeed":144.16,"maxspeed":264.0}
{"name":"Train 47","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 30","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 5","type":"Road","avgspeed":79.64,"maxspeed":176.0}
{"name":"Road 16","type":"Road","avgspeed":91.0,"maxspeed":176.0}
{"name":"Road 52","type":"Road","avgspeed":137.6,"maxspeed":176.0}
{"name":"Train 2","type":"Train","avgspeed":88.96,"maxspeed":264.0}
{"name":"Road 49","type":"Road","avgspeed":132.66666666666666,"maxspeed":176.0}
{"name":"Road 75","type":"Road","avgspeed":122.16,"maxspeed":176.0}
{"name":"Road 20","type":"Road","avgspeed":135.44,"maxspeed":176.0}
{"name":"Road 68","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 18","type":"Train","avgspeed":113.2,"maxspeed":250.0}
{"name":"Train 35","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 72","type":"Road","avgspeed":108.6,"maxspeed":176.0}
{"name":"Train 13","type":"Train","avgspeed":136.66666666666666,"maxspeed":252.0}
{"name":"Road 22","type":"Road","avgspeed":112.84,"maxspeed":176.0}
{"name":"Train 21","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 61","type":"Road","avgspeed":104.12,"maxspeed":176.0}
{"name":"Road 57","type":"Road","avgspeed":135.84,"maxspeed":176.0}
{"name":"Road 62","type":"Road","avgspeed":83.44,"maxspeed":176.0}
{"name":"Road 41","type":"Road","avgspeed":102.88,"maxspeed":176.0}
{"name":"Train 24","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 32","type":"Train","avgspeed":164.84,"maxspeed":264.0}
{"name":"Road 28","type":"Road","avgspeed":126.12,"maxspeed":176.0}
{"name":"Road 17","type":"Road","avgspeed":83.88,"maxspeed":176.0}
{"name":"Road 94","type":"Road","avgspeed":116.20833333333333,"maxspeed":224.0}
{"name":"Road 86","type":"Road","avgspeed":131.08,"maxspeed":176.0}
{"name":"Road 76","type":"Road","avgspeed":129.16,"maxspeed":176.0}
{"name":"Train 38","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 46","type":"Road","avgspeed":139.04,"maxspeed":176.0}
{"name":"Train 29","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 83","type":"Road","avgspeed":123.875,"maxspeed":176.0}
{"name":"Road 89","type":"Road","avgspeed":123.2,"maxspeed":176.0}
{"name":"Train 46","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 45","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 79","type":"Road","avgspeed":110.96,"maxspeed":176.0}
{"name":"Road 27","type":"Road","avgspeed":134.2,"maxspeed":176.0}
{"name":"Road 48","type":"Road","avgspeed":128.04166666666666,"maxspeed":176.0}
{"name":"Road 54","type":"Road","avgspeed":128.76,"maxspeed":176.0}
{"name":"Road 60","type":"Road","avgspeed":146.28,"maxspeed":176.0}
{"name":"Train 50","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 1","type":"Road","avgspeed":64.36,"maxspeed":176.0}
{"name":"Train 27","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 91","type":"Road","avgspeed":115.0,"maxspeed":224.0}
{"name":"Train 9","type":"Train","avgspeed":176.44,"maxspeed":264.0}
{"name":"Train 48","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 26","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 50","type":"Road","avgspeed":130.625,"maxspeed":176.0}
{"name":"Road 2","type":"Road","avgspeed":66.32,"maxspeed":176.0}
{"name":"Train 28","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 34","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 21","type":"Road","avgspeed":125.44,"maxspeed":176.0}
{"name":"Road 51","type":"Road","avgspeed":120.70833333333333,"maxspeed":176.0}
{"name":"Train 36","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Road 69","type":"Road","avgspeed":139.36,"maxspeed":176.0}
{"name":"Road 25","type":"Road","avgspeed":117.96,"maxspeed":176.0}
{"name":"Road 24","type":"Road","avgspeed":109.72,"maxspeed":176.0}
{"name":"Train 12","type":"Train","avgspeed":154.68,"maxspeed":264.0}
{"name":"Road 47","type":"Road","avgspeed":129.28,"maxspeed":176.0}
{"name":"Train 14","type":"Train","avgspeed":160.6,"maxspeed":264.0}
{"name":"Road 6","type":"Road","avgspeed":79.08,"maxspeed":176.0}
{"name":"Road 59","type":"Road","avgspeed":132.68,"maxspeed":176.0}
{"name":"Road 19","type":"Road","avgspeed":138.875,"maxspeed":176.0}
{"name":"Road 56","type":"Road","avgspeed":130.6,"maxspeed":176.0}
{"name":"Road 18","type":"Road","avgspeed":128.4,"maxspeed":176.0}
{"name":"Train 37","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 8","type":"Train","avgspeed":114.08,"maxspeed":264.0}
{"name":"Road 10","type":"Road","avgspeed":98.72,"maxspeed":176.0}
{"name":"Road 87","type":"Road","avgspeed":135.36,"maxspeed":176.0}
{"name":"Road 11","type":"Road","avgspeed":68.166666666666671,"maxspeed":176.0}
{"name":"Train 5","type":"Train","avgspeed":93.291666666666671,"maxspeed":239.0}
{"name":"Road 93","type":"Road","avgspeed":107.2,"maxspeed":224.0}
{"name":"Road 82","type":"Road","avgspeed":125.8,"maxspeed":176.0}
{"name":"Train 4","type":"Train","avgspeed":66.32,"maxspeed":264.0}
{"name":"Road 45","type":"Road","avgspeed":112.125,"maxspeed":176.0}
{"name":"Road 44","type":"Road","avgspeed":116.72,"maxspeed":176.0}
{"name":"Road 34","type":"Road","avgspeed":104.4,"maxspeed":176.0}
{"name":"Road 74","type":"Road","avgspeed":116.95833333333333,"maxspeed":176.0}
{"name":"Train 42","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 41","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Road 3","type":"Road","avgspeed":84.96,"maxspeed":176.0}
{"name":"Road 9","type":"Road","avgspeed":82.375,"maxspeed":176.0}
{"name":"Road 7","type":"Road","avgspeed":80.92,"maxspeed":176.0}
{"name":"Train 25","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 44","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 35","type":"Road","avgspeed":96.32,"maxspeed":176.0}
{"name":"Road 78","type":"Road","avgspeed":83.36,"maxspeed":176.0}
{"name":"Road 66","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 14","type":"Road","avgspeed":71.92,"maxspeed":176.0}
{"name":"Road 81","type":"Road","avgspeed":116.16,"maxspeed":176.0}
{"name":"Road 64","type":"Road","avgspeed":94.88,"maxspeed":176.0}
{"name":"Train 7","type":"Train","avgspeed":196.66666666666666,"maxspeed":264.0}
{"name":"Road 63","type":"Road","avgspeed":115.0,"maxspeed":176.0}
{"name":"Train 40","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 31","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 31","type":"Road","avgspeed":124.84,"maxspeed":176.0}
{"name":"Road 36","type":"Road","avgspeed":97.28,"maxspeed":176.0}
{"name":"Road 42","type":"Road","avgspeed":109.44,"maxspeed":176.0}
{"name":"Ship 1","type":"Ship","avgspeed":48.0,"maxspeed":48.0}
{"name":"Road 90","type":"Road","avgspeed":112.16666666666667,"maxspeed":176.0}
{"name":"Train 23","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Road 88","type":"Road","avgspeed":130.04,"maxspeed":176.0}
{"name":"Road 43","type":"Road","avgspeed":119.6,"maxspeed":176.0}
{"name":"Road 30","type":"Road","avgspeed":102.36,"maxspeed":176.0}
{"name":"Road 26","type":"Road","avgspeed":114.33333333333333,"maxspeed":176.0}
{"name":"Road 32","type":"Road","avgspeed":100.32,"maxspeed":176.0}
{"name":"Train 49","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 43","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 6","type":"Train","avgspeed":180.08333333333334,"maxspeed":264.0}
{"name":"Road 15","type":"Road","avgspeed":70.8,"maxspeed":176.0}
{"name":"Train 22","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 38","type":"Road","avgspeed":93.48,"maxspeed":176.0}
{"name":"Road 8","type":"Road","avgspeed":80.64,"maxspeed":176.0}
{"name":"Road 71","type":"Road","avgspeed":101.84,"maxspeed":176.0}
{"name":"Road 29","type":"Road","avgspeed":141.68,"maxspeed":176.0}
{"name":"Road 40","type":"Road","avgspeed":56.64,"maxspeed":176.0}
{"name":"Train 19","type":"Train","avgspeed":173.04,"maxspeed":264.0}
{"name":"Road 92","type":"Road","avgspeed":110.48,"maxspeed":224.0}
{"name":"Road 23","type":"Road","avgspeed":116.125,"maxspeed":176.0}
{"name":"Road 80","type":"Road","avgspeed":104.8,"maxspeed":176.0}
{"name":"Train 20","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 17","type":"Train","avgspeed":199.28,"maxspeed":264.0}
{"name":"Train 16","type":"Train","avgspeed":107.0,"maxspeed":180.0}
{"name":"Road 85","type":"Road","avgspeed":124.64,"maxspeed":176.0}
{"name":"Road 77","type":"Road","avgspeed":82.68,"maxspeed":176.0}
{"name":"Train 3","type":"Train","avgspeed":138.96,"maxspeed":264.0}
{"name":"Road 4","type":"Road","avgspeed":77.32,"maxspeed":176.0}
{"name":"Train 11","type":"Train","avgspeed":112.64,"maxspeed":264.0}
{"name":"Road 84","type":"Road","avgspeed":93.0,"maxspeed":176.0}
{"name":"Road 73","type":"Road","avgspeed":108.88,"maxspeed":176.0}
{"name":"Road 53","type":"Road","avgspeed":129.20833333333334,"maxspeed":176.0}
{"name":"Road 33","type":"Road","avgspeed":93.16,"maxspeed":176.0}
{"name":"Road 58","type":"Road","avgspeed":137.36,"maxspeed":176.0}
{"name":"Road 39","type":"Road","avgspeed":113.64,"maxspeed":176.0}
{"name":"Train 51","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 33","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 1","type":"Train","avgspeed":91.56,"maxspeed":264.0}
{"name":"Road 65","type":"Road","avgspeed":106.32,"maxspeed":176.0}
{"name":"Train 15","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 70","type":"Road","avgspeed":130.32,"maxspeed":176.0}
{"name":"Road 55","type":"Road","avgspeed":119.88,"maxspeed":176.0}
{"name":"Road 37","type":"Road","avgspeed":149.26923076923077,"maxspeed":176.0}
{"name":"Road 13","type":"Road","avgspeed":76.92307692307692,"maxspeed":176.0}
{"name":"Train 39","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 67","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 12","type":"Road","avgspeed":122.53846153846153,"maxspeed":176.0}
{"name":"Train 10","type":"Train","avgspeed":157.6,"maxspeed":264.0}
{"name":"Train 47","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 30","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 5","type":"Road","avgspeed":65.6923076923077,"maxspeed":176.0}
{"name":"Road 16","type":"Road","avgspeed":70.56,"maxspeed":176.0}
{"name":"Road 52","type":"Road","avgspeed":124.23076923076923,"maxspeed":176.0}
{"name":"Road 49","type":"Road","avgspeed":110.30769230769231,"maxspeed":176.0}
{"name":"Train 2","type":"Train","avgspeed":95.3076923076923,"maxspeed":253.0}
{"name":"Road 75","type":"Road","avgspeed":106.5,"maxspeed":176.0}
{"name":"Road 20","type":"Road","avgspeed":138.30769230769232,"maxspeed":176.0}
{"name":"Road 68","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 18","type":"Train","avgspeed":121.32,"maxspeed":245.0}
{"name":"Train 13","type":"Train","avgspeed":132.42307692307693,"maxspeed":264.0}
{"name":"Train 35","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 72","type":"Road","avgspeed":128.80769230769232,"maxspeed":176.0}
{"name":"Road 22","type":"Road","avgspeed":116.56,"maxspeed":176.0}
{"name":"Train 21","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 61","type":"Road","avgspeed":113.26923076923077,"maxspeed":176.0}
{"name":"Road 57","type":"Road","avgspeed":139.5,"maxspeed":176.0}
{"name":"Road 62","type":"Road","avgspeed":46.28,"maxspeed":176.0}
{"name":"Road 41","type":"Road","avgspeed":115.2,"maxspeed":176.0}
{"name":"Train 24","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 32","type":"Train","avgspeed":162.07692307692307,"maxspeed":264.0}
{"name":"Road 28","type":"Road","avgspeed":132.65384615384616,"maxspeed":176.0}
{"name":"Road 17","type":"Road","avgspeed":79.84,"maxspeed":176.0}
{"name":"Road 94","type":"Road","avgspeed":99.461538461538467,"maxspeed":224.0}
{"name":"Road 86","type":"Road","avgspeed":128.56,"maxspeed":176.0}
{"name":"Road 76","type":"Road","avgspeed":114.84615384615384,"maxspeed":176.0}
{"name":"Train 38","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 46","type":"Road","avgspeed":121.73076923076923,"maxspeed":176.0}
{"name":"Train 29","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 83","type":"Road","avgspeed":135.0,"maxspeed":176.0}
{"name":"Road 89","type":"Road","avgspeed":114.96153846153847,"maxspeed":176.0}
{"name":"Train 46","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 45","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 79","type":"Road","avgspeed":96.1923076923077,"maxspeed":176.0}
{"name":"Road 27","type":"Road","avgspeed":128.72,"maxspeed":176.0}
{"name":"Road 48","type":"Road","avgspeed":122.38461538461539,"maxspeed":176.0}
{"name":"Road 54","type":"Road","avgspeed":129.88,"maxspeed":176.0}
{"name":"Road 60","type":"Road","avgspeed":133.28,"maxspeed":176.0}
{"name":"Train 50","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 1","type":"Road","avgspeed":70.038461538461533,"maxspeed":176.0}
{"name":"Train 27","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 91","type":"Road","avgspeed":101.69230769230769,"maxspeed":224.0}
{"name":"Train 9","type":"Train","avgspeed":168.46153846153845,"maxspeed":264.0}
{"name":"Train 48","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 26","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 50","type":"Road","avgspeed":118.96153846153847,"maxspeed":176.0}
{"name":"Train 36","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Train 28","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 51","type":"Road","avgspeed":127.0,"maxspeed":176.0}
{"name":"Train 34","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 2","type":"Road","avgspeed":85.269230769230774,"maxspeed":176.0}
{"name":"Road 21","type":"Road","avgspeed":131.80769230769232,"maxspeed":176.0}
{"name":"Road 69","type":"Road","avgspeed":139.73076923076923,"maxspeed":176.0}
{"name":"Road 25","type":"Road","avgspeed":121.34615384615384,"maxspeed":176.0}
{"name":"Road 24","type":"Road","avgspeed":122.88461538461539,"maxspeed":176.0}
{"name":"Train 12","type":"Train","avgspeed":151.69230769230768,"maxspeed":264.0}
{"name":"Road 47","type":"Road","avgspeed":119.23076923076923,"maxspeed":176.0}
{"name":"Train 14","type":"Train","avgspeed":195.28,"maxspeed":264.0}
{"name":"Road 6","type":"Road","avgspeed":86.538461538461533,"maxspeed":176.0}
{"name":"Road 59","type":"Road","avgspeed":131.96153846153845,"maxspeed":176.0}
{"name":"Road 19","type":"Road","avgspeed":136.84615384615384,"maxspeed":176.0}
{"name":"Road 56","type":"Road","avgspeed":133.26923076923077,"maxspeed":176.0}
{"name":"Road 18","type":"Road","avgspeed":131.44,"maxspeed":176.0}
{"name":"Train 37","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 8","type":"Train","avgspeed":122.88461538461539,"maxspeed":264.0}
{"name":"Road 10","type":"Road","avgspeed":132.19230769230768,"maxspeed":176.0}
{"name":"Road 87","type":"Road","avgspeed":138.69230769230768,"maxspeed":176.0}
{"name":"Road 11","type":"Road","avgspeed":84.57692307692308,"maxspeed":174.0}
{"name":"Train 5","type":"Train","avgspeed":123.34615384615384,"maxspeed":264.0}
{"name":"Road 93","type":"Road","avgspeed":108.08,"maxspeed":224.0}
{"name":"Road 82","type":"Road","avgspeed":130.23076923076923,"maxspeed":176.0}
{"name":"Train 4","type":"Train","avgspeed":71.42307692307692,"maxspeed":264.0}
{"name":"Road 45","type":"Road","avgspeed":106.65384615384616,"maxspeed":176.0}
{"name":"Road 44","type":"Road","avgspeed":113.69230769230769,"maxspeed":176.0}
{"name":"Road 34","type":"Road","avgspeed":106.56,"maxspeed":176.0}
{"name":"Road 74","type":"Road","avgspeed":118.84615384615384,"maxspeed":176.0}
{"name":"Train 42","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 9","type":"Road","avgspeed":69.0,"maxspeed":176.0}
{"name":"Train 41","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Road 3","type":"Road","avgspeed":81.36,"maxspeed":176.0}
{"name":"Road 7","type":"Road","avgspeed":83.65384615384616,"maxspeed":176.0}
{"name":"Train 25","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 44","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 35","type":"Road","avgspeed":108.80769230769231,"maxspeed":176.0}
{"name":"Road 78","type":"Road","avgspeed":100.03846153846153,"maxspeed":176.0}
{"name":"Road 66","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 7","type":"Train","avgspeed":177.23076923076923,"maxspeed":264.0}
{"name":"Road 14","type":"Road","avgspeed":85.42307692307692,"maxspeed":176.0}
{"name":"Road 64","type":"Road","avgspeed":144.92307692307693,"maxspeed":176.0}
{"name":"Road 81","type":"Road","avgspeed":110.0,"maxspeed":176.0}
{"name":"Road 63","type":"Road","avgspeed":130.15384615384616,"maxspeed":176.0}
{"name":"Train 40","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 23","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 31","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 31","type":"Road","avgspeed":135.30769230769232,"maxspeed":176.0}
{"name":"Road 42","type":"Road","avgspeed":95.57692307692308,"maxspeed":176.0}
{"name":"Road 90","type":"Road","avgspeed":116.11538461538461,"maxspeed":176.0}
{"name":"Road 36","type":"Road","avgspeed":102.69230769230769,"maxspeed":176.0}
{"name":"Ship 1","type":"Ship","avgspeed":48.0,"maxspeed":48.0}
{"name":"Road 88","type":"Road","avgspeed":131.53846153846155,"maxspeed":176.0}
{"name":"Road 43","type":"Road","avgspeed":114.15384615384616,"maxspeed":176.0}
{"name":"Road 30","type":"Road","avgspeed":96.884615384615387,"maxspeed":176.0}
{"name":"Road 26","type":"Road","avgspeed":111.69230769230769,"maxspeed":176.0}
{"name":"Train 6","type":"Train","avgspeed":145.30769230769232,"maxspeed":264.0}
{"name":"Road 32","type":"Road","avgspeed":97.42307692307692,"maxspeed":176.0}
{"name":"Train 49","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 43","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Road 15","type":"Road","avgspeed":79.15384615384616,"maxspeed":176.0}
{"name":"Train 22","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 38","type":"Road","avgspeed":115.48,"maxspeed":176.0}
{"name":"Road 8","type":"Road","avgspeed":82.884615384615387,"maxspeed":176.0}
{"name":"Road 71","type":"Road","avgspeed":95.56,"maxspeed":176.0}
{"name":"Road 29","type":"Road","avgspeed":126.88,"maxspeed":176.0}
{"name":"Road 40","type":"Road","avgspeed":123.23076923076923,"maxspeed":176.0}
{"name":"Train 19","type":"Train","avgspeed":177.61538461538461,"maxspeed":264.0}
{"name":"Road 92","type":"Road","avgspeed":122.48,"maxspeed":224.0}
{"name":"Road 23","type":"Road","avgspeed":108.61538461538461,"maxspeed":176.0}
{"name":"Road 80","type":"Road","avgspeed":106.0,"maxspeed":176.0}
{"name":"Train 20","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 17","type":"Train","avgspeed":176.76923076923077,"maxspeed":264.0}
{"name":"Train 16","type":"Train","avgspeed":134.34615384615384,"maxspeed":240.0}
{"name":"Road 85","type":"Road","avgspeed":106.46153846153847,"maxspeed":176.0}
{"name":"Road 77","type":"Road","avgspeed":87.42307692307692,"maxspeed":165.0}
{"name":"Train 3","type":"Train","avgspeed":138.0,"maxspeed":264.0}
{"name":"Road 4","type":"Road","avgspeed":65.57692307692308,"maxspeed":176.0}
{"name":"Train 11","type":"Train","avgspeed":131.57692307692307,"maxspeed":264.0}
{"name":"Road 84","type":"Road","avgspeed":114.61538461538461,"maxspeed":176.0}
{"name":"Road 73","type":"Road","avgspeed":115.23076923076923,"maxspeed":176.0}
{"name":"Road 53","type":"Road","avgspeed":137.07692307692307,"maxspeed":176.0}
{"name":"Road 33","type":"Road","avgspeed":99.884615384615387,"maxspeed":176.0}
{"name":"Road 58","type":"Road","avgspeed":139.92,"maxspeed":176.0}
{"name":"Road 39","type":"Road","avgspeed":153.96153846153845,"maxspeed":176.0}
{"name":"Train 51","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 33","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 1","type":"Train","avgspeed":101.15384615384616,"maxspeed":264.0}
{"name":"Road 65","type":"Road","avgspeed":122.46153846153847,"maxspeed":176.0}
{"name":"Train 15","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 70","type":"Road","avgspeed":144.61538461538461,"maxspeed":176.0}
{"name":"Road 55","type":"Road","avgspeed":134.61538461538461,"maxspeed":176.0}
{"name":"Road 37","type":"Road","avgspeed":114.19230769230769,"maxspeed":176.0}
{"name":"Road 13","type":"Road","avgspeed":87.5,"maxspeed":176.0}
{"name":"Train 39","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 67","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 12","type":"Road","avgspeed":117.44,"maxspeed":176.0}
{"name":"Train 10","type":"Train","avgspeed":151.53846153846155,"maxspeed":264.0}
{"name":"Train 47","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 30","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 5","type":"Road","avgspeed":73.2,"maxspeed":176.0}
{"name":"Road 16","type":"Road","avgspeed":81.384615384615387,"maxspeed":176.0}
{"name":"Road 52","type":"Road","avgspeed":127.11538461538461,"maxspeed":176.0}
{"name":"Road 49","type":"Road","avgspeed":119.03846153846153,"maxspeed":176.0}
{"name":"Train 2","type":"Train","avgspeed":79.461538461538467,"maxspeed":264.0}
{"name":"Road 75","type":"Road","avgspeed":120.48,"maxspeed":176.0}
{"name":"Road 20","type":"Road","avgspeed":125.84615384615384,"maxspeed":176.0}
{"name":"Road 68","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 18","type":"Train","avgspeed":129.19230769230768,"maxspeed":240.0}
{"name":"Train 13","type":"Train","avgspeed":129.07692307692307,"maxspeed":264.0}
{"name":"Train 35","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 72","type":"Road","avgspeed":112.61538461538461,"maxspeed":176.0}
{"name":"Road 22","type":"Road","avgspeed":109.65384615384616,"maxspeed":176.0}
{"name":"Train 21","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 61","type":"Road","avgspeed":114.80769230769231,"maxspeed":176.0}
{"name":"Road 57","type":"Road","avgspeed":144.03846153846155,"maxspeed":176.0}
{"name":"Road 62","type":"Road","avgspeed":97.0,"maxspeed":176.0}
{"name":"Road 41","type":"Road","avgspeed":111.30769230769231,"maxspeed":176.0}
{"name":"Train 24","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 32","type":"Train","avgspeed":171.53846153846155,"maxspeed":264.0}
{"name":"Road 28","type":"Road","avgspeed":139.28,"maxspeed":176.0}
{"name":"Road 17","type":"Road","avgspeed":88.42307692307692,"maxspeed":176.0}
{"name":"Road 94","type":"Road","avgspeed":122.5,"maxspeed":224.0}
{"name":"Road 86","type":"Road","avgspeed":138.65384615384616,"maxspeed":176.0}
{"name":"Road 76","type":"Road","avgspeed":113.42307692307692,"maxspeed":176.0}
{"name":"Train 38","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 46","type":"Road","avgspeed":129.08,"maxspeed":176.0}
{"name":"Train 29","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 83","type":"Road","avgspeed":116.19230769230769,"maxspeed":176.0}
{"name":"Road 89","type":"Road","avgspeed":116.42307692307692,"maxspeed":176.0}
{"name":"Train 46","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 45","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 79","type":"Road","avgspeed":105.61538461538461,"maxspeed":176.0}
{"name":"Road 27","type":"Road","avgspeed":134.80769230769232,"maxspeed":176.0}
{"name":"Road 48","type":"Road","avgspeed":128.30769230769232,"maxspeed":176.0}
{"name":"Road 54","type":"Road","avgspeed":132.84615384615384,"maxspeed":176.0}
{"name":"Road 60","type":"Road","avgspeed":135.80769230769232,"maxspeed":176.0}
{"name":"Train 50","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 48","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 27","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 26","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 91","type":"Road","avgspeed":112.61538461538461,"maxspeed":224.0}
{"name":"Road 1","type":"Road","avgspeed":81.84615384615384,"maxspeed":176.0}
{"name":"Train 9","type":"Train","avgspeed":176.19230769230768,"maxspeed":264.0}
{"name":"Road 50","type":"Road","avgspeed":134.46153846153845,"maxspeed":176.0}
{"name":"Train 36","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Train 28","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 51","type":"Road","avgspeed":139.19230769230768,"maxspeed":176.0}
{"name":"Train 34","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 2","type":"Road","avgspeed":80.72,"maxspeed":176.0}
{"name":"Road 21","type":"Road","avgspeed":122.48,"maxspeed":176.0}
{"name":"Road 69","type":"Road","avgspeed":137.34615384615384,"maxspeed":176.0}
{"name":"Road 25","type":"Road","avgspeed":117.44,"maxspeed":176.0}
{"name":"Road 24","type":"Road","avgspeed":107.57692307692308,"maxspeed":176.0}
{"name":"Train 12","type":"Train","avgspeed":164.5,"maxspeed":264.0}
{"name":"Road 47","type":"Road","avgspeed":133.46153846153845,"maxspeed":176.0}
{"name":"Train 14","type":"Train","avgspeed":184.19230769230768,"maxspeed":264.0}
{"name":"Road 6","type":"Road","avgspeed":72.96,"maxspeed":176.0}
{"name":"Road 59","type":"Road","avgspeed":126.5,"maxspeed":176.0}
{"name":"Road 19","type":"Road","avgspeed":150.5,"maxspeed":176.0}
{"name":"Road 56","type":"Road","avgspeed":134.92307692307693,"maxspeed":176.0}
{"name":"Road 18","type":"Road","avgspeed":127.19230769230769,"maxspeed":176.0}
{"name":"Train 37","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 8","type":"Train","avgspeed":141.73076923076923,"maxspeed":264.0}
{"name":"Road 10","type":"Road","avgspeed":99.16,"maxspeed":176.0}
{"name":"Road 87","type":"Road","avgspeed":142.0,"maxspeed":176.0}
{"name":"Road 11","type":"Road","avgspeed":83.1923076923077,"maxspeed":176.0}
{"name":"Train 5","type":"Train","avgspeed":110.34615384615384,"maxspeed":264.0}
{"name":"Road 93","type":"Road","avgspeed":135.38461538461539,"maxspeed":224.0}
{"name":"Road 82","type":"Road","avgspeed":144.73076923076923,"maxspeed":176.0}
{"name":"Train 4","type":"Train","avgspeed":79.384615384615387,"maxspeed":264.0}
{"name":"Road 45","type":"Road","avgspeed":106.5,"maxspeed":176.0}
{"name":"Road 44","type":"Road","avgspeed":117.65384615384616,"maxspeed":176.0}
{"name":"Road 34","type":"Road","avgspeed":110.73076923076923,"maxspeed":176.0}
{"name":"Road 74","type":"Road","avgspeed":119.92307692307692,"maxspeed":176.0}
{"name":"Train 41","type":"Train","avgspeed":1.0,"maxspeed":1.0}
{"name":"Road 3","type":"Road","avgspeed":75.0,"maxspeed":176.0}
{"name":"Road 9","type":"Road","avgspeed":74.42307692307692,"maxspeed":176.0}
{"name":"Train 42","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 7","type":"Road","avgspeed":82.5,"maxspeed":176.0}
{"name":"Train 25","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 44","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 66","type":"Road","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 35","type":"Road","avgspeed":99.384615384615387,"maxspeed":176.0}
{"name":"Road 78","type":"Road","avgspeed":81.07692307692308,"maxspeed":155.0}
{"name":"Road 81","type":"Road","avgspeed":109.34615384615384,"maxspeed":176.0}
{"name":"Train 7","type":"Train","avgspeed":185.46153846153845,"maxspeed":264.0}
{"name":"Road 14","type":"Road","avgspeed":81.1923076923077,"maxspeed":176.0}
{"name":"Road 64","type":"Road","avgspeed":78.769230769230774,"maxspeed":176.0}
{"name":"Road 63","type":"Road","avgspeed":88.115384615384613,"maxspeed":176.0}
{"name":"Train 40","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 23","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Train 31","type":"Train","avgspeed":3.0,"maxspeed":3.0}
{"name":"Road 31","type":"Road","avgspeed":127.30769230769231,"maxspeed":176.0}
{"name":"Road 42","type":"Road","avgspeed":111.15384615384616,"maxspeed":176.0}
{"name":"Road 90","type":"Road","avgspeed":128.11538461538461,"maxspeed":176.0}
{"name":"Road 36","type":"Road","avgspeed":95.96,"maxspeed":176.0}
{"name":"Ship 1","type":"Ship","avgspeed":48.0,"maxspeed":48.0}
{"name":"Road 88","type":"Road","avgspeed":124.69230769230769,"maxspeed":176.0}
{"name":"Road 43","type":"Road","avgspeed":108.53846153846153,"maxspeed":176.0}
{"name":"Road 30","type":"Road","avgspeed":111.88461538461539,"maxspeed":176.0}
{"name":"Road 26","type":"Road","avgspeed":117.76923076923077,"maxspeed":176.0}
{"name":"Train 6","type":"Train","avgspeed":146.76923076923077,"maxspeed":264.0}
{"name":"Road 32","type":"Road","avgspeed":105.92307692307692,"maxspeed":176.0}
{"name":"Train 49","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 43","type":"Train","avgspeed":2.0,"maxspeed":2.0}
{"name":"Road 15","type":"Road","avgspeed":87.34615384615384,"maxspeed":176.0}
{"name":"Train 22","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 38","type":"Road","avgspeed":119.0,"maxspeed":176.0}
{"name":"Road 8","type":"Road","avgspeed":75.115384615384613,"maxspeed":176.0}
{"name":"Road 71","type":"Road","avgspeed":103.92307692307692,"maxspeed":176.0}
{"name":"Road 29","type":"Road","avgspeed":129.26923076923077,"maxspeed":176.0}
{"name":"Road 40","type":"Road","avgspeed":114.32,"maxspeed":176.0}
{"name":"Train 19","type":"Train","avgspeed":196.15384615384616,"maxspeed":264.0}
{"name":"Road 92","type":"Road","avgspeed":113.03846153846153,"maxspeed":224.0}
{"name":"Road 23","type":"Road","avgspeed":127.69230769230769,"maxspeed":176.0}
{"name":"Road 80","type":"Road","avgspeed":118.03846153846153,"maxspeed":176.0}
{"name":"Train 20","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 17","type":"Train","avgspeed":232.68,"maxspeed":264.0}
{"name":"Train 16","type":"Train","avgspeed":106.92307692307692,"maxspeed":222.0}
{"name":"Road 85","type":"Road","avgspeed":131.46153846153845,"maxspeed":176.0}
{"name":"Road 77","type":"Road","avgspeed":98.038461538461533,"maxspeed":176.0}
{"name":"Train 3","type":"Train","avgspeed":143.26923076923077,"maxspeed":264.0}
{"name":"Road 4","type":"Road","avgspeed":82.615384615384613,"maxspeed":176.0}
{"name":"Train 11","type":"Train","avgspeed":131.52,"maxspeed":264.0}
{"name":"Road 84","type":"Road","avgspeed":117.24,"maxspeed":176.0}
{"name":"Road 73","type":"Road","avgspeed":131.46153846153845,"maxspeed":176.0}
{"name":"Road 53","type":"Road","avgspeed":122.80769230769231,"maxspeed":176.0}
{"name":"Road 33","type":"Road","avgspeed":111.69230769230769,"maxspeed":176.0}
{"name":"Road 58","type":"Road","avgspeed":144.46153846153845,"maxspeed":176.0}
{"name":"Train 51","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 39","type":"Road","avgspeed":106.15384615384616,"maxspeed":176.0}
{"name":"Train 33","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Train 1","type":"Train","avgspeed":97.07692307692308,"maxspeed":264.0}
{"name":"Road 65","type":"Road","avgspeed":82.34615384615384,"maxspeed":176.0}
{"name":"Train 15","type":"Train","avgspeed":0.0,"maxspeed":0.0}
{"name":"Road 70","type":"Road","avgspeed":127.88,"maxspeed":176.0}
{"name":"Road 55","type":"Road","avgspeed":123.5,"maxspeed":176.0}


And an example of PowerBI quick insights


Resources


GIT Repo of the modified OpenTTD project

https://svermaak@bitbucket.org/svermaak/openttd.git


OpenTTD Compiling steps

https://wiki.openttd.org/Compiling_on_Windows_using_Microsoft_Visual_C%2B%2B_2012


2
Comment
1 Comment
 

Expert Comment

by:Tommy Parsons
Excellent article.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Join & Write a Comment

Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Screencast - Getting to Know the Pipeline

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month