Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions test/performance/helsinki/build-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"dataImportReport": true,
"areaVisibility": true,
"staticParkAndRide": false,
"subwayAccessTime": 200,
"maxAreaNodes": 50,
"maxTransferDuration": "26m",
"multiThreadElevationCalculations": true,
"transitServiceStart": "-P2W",
"transitServiceEnd": "P12W",
"transitModelTimeZone": "Europe/Helsinki",
"fares": "hsl",
"transferRequests": [
{ "modes": "WALK" },
{
"modes": "WALK",
"wheelchairAccessibility": {
"enabled": true,
"maxSlope": 0.125
}
}
],
"gtfsDefaults" : {
"stationTransferPreference" : "recommended"
},
"osmDefaults": {
"timeZone": "Europe/Helsinki",
"osmTagMapping": "finland",
"includeOsmSubwayEntrances": true
},
"demDefaults": {
"elevationUnitMultiplier": 0.1
},
"emissions": {
"carAvgCo2PerKm": 170,
"carAvgOccupancy": 1.3
}
}

184 changes: 184 additions & 0 deletions test/performance/helsinki/generate_test_cases.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
import csv

fieldnames = ["testCaseId", "description", "departure", "fromLat",
"fromLon", "toLat", "toLon", "origin", "destination", "modes", "category"]

locations = [

# Helsinki
{
"coordinates": "60.169665, 24.934652",
"name": "Kamppi"
},
{
"coordinates": "60.179022, 24.924151",
"name": "Töölöntori"
},
{
"coordinates": "60.22070, 24.86094",
"name": "Pitäjänmäki"
},
{
"coordinates": "60.20863, 25.07946",
"name": "Itäkeskus"
},
{
"coordinates": "60.148237,24.985142",
"name": "Suomenlinna"
},
# Espoo
{
"coordinates": "60.18234, 24.82531",
"name": "Otaniemi"
},
{
"coordinates": "60.205940, 24.656711",
"name": "Espoon Keskusta"
},
{
"coordinates": "60.15509, 24.74546",
"name": "Matinkylä"
},
{
"coordinates": "60.19586, 24.58912",
"name": "Kauklahti"
},
{
"coordinates": "60.29030, 24.56324",
"name": "Nuuksio"
},
{
"coordinates": "60.17892, 24.65813",
"name": "Latokaski"
},

# Vantaa
{
"coordinates": "60.29246, 25.03861",
"name": "Tikkurila"
},
# Airpot
{
"coordinates": "60.317508, 24.969089",
"name": "Airport"
},
# Kirkkonummi
{
"coordinates": "60.12640, 24.43613",
"name": "Kirkkonummi"
}
]

scooter_locations = [
{
"coordinates": "60.169665, 24.934652",
"name": "Kamppi"
},
{
"coordinates": "60.179022, 24.924151",
"name": "Töölöntori"
},
{
"coordinates": "60.18234, 24.82531",
"name": "Otaniemi"
},
{
"coordinates": "60.198349, 24.875654",
"name": "Munkkiniemi"
},
{
"coordinates": "60.199712, 24.939437",
"name": "Pasila"
},
{
"coordinates": "60.155454, 24.945134",
"name": "Eira"
},
{
"coordinates": "60.184945,24.982309",
"name": "Kalasatama"
},
{
"coordinates": "60.15654,24.86665",
"name": "Lauttasaari"
},
{
"coordinates": "60.18534,25.00162",
"name": "Kulosaari"
},
]
departure_times = ["06:00", "13:00", "22:00"]


failing_cases = [27, 66, 105, 144, 159, 183, 222,
300, 339, 420, 459, 498, 537, 566, 568, 570]


rows = []


def parse_coords(input):
split = input.split(",")
return {
"lat": split[0],
"lon": split[1]
}


counter = 0
for start in locations:
for end in locations:
if end["coordinates"] is not start["coordinates"]:

start_coords = parse_coords(start["coordinates"])
end_coords = parse_coords(end["coordinates"])
for departure in departure_times:
counter = counter + 1
if counter in failing_cases:
print("FAILED: ", start["name"],
" ", end["name"], " ", departure)
else:
rows.append({
"testCaseId": counter,
"description": f'{start["name"]} to {end["name"]} (transit)',
"departure": departure,
"fromLat": start_coords["lat"],
"fromLon": start_coords["lon"],
"toLat": end_coords["lat"],
"toLon": end_coords["lon"],
"origin": start["name"],
"destination": end["name"],
"modes": "TRANSIT|WALK",
"category": "transit"
})
# Generate scooter test
for start in scooter_locations:
for end in scooter_locations:
if end["coordinates"] != start["coordinates"]:
start_coords = parse_coords(start["coordinates"])
end_coords = parse_coords(end["coordinates"])
departure = departure_times[0] # Use just the first time
counter += 1
if counter in failing_cases:
print("FAILED:", start["name"], "→",
end["name"], "@", departure, "(scooter)")
else:
rows.append({
"testCaseId": counter,
"description": f'{start["name"]} to {end["name"]} (scooter)',
"departure": departure,
"fromLat": start_coords["lat"],
"fromLon": start_coords["lon"],
"toLat": end_coords["lat"],
"toLon": end_coords["lon"],
"origin": start["name"],
"destination": end["name"],
"modes": "SCOOTER_RENT|WALK",
"category": "scooter"
})

print(counter)
with open('travelSearch.csv', 'w', encoding='UTF8', newline='') as f:
writer = csv.DictWriter(f, fieldnames=fieldnames)
writer.writeheader()
writer.writerows(rows)
101 changes: 101 additions & 0 deletions test/performance/helsinki/speed-test-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
// Run all test-cases on the given date
"testDate": "2025-03-25",
"feedId": "hsl",
// Relative paths supported like "../../data/otp-ci/graph-${otp.serialization.version.id}.obj"
// Default: "graph.obj"
"graph": "graph.obj",
"routingDefaults": {
"transferSlack": "1m30s",
"waitReluctance": 0.95,
"bicycle": {
"boardCost": 120,
"reluctance": 1.7,
"optimization": "safest-streets"
},
"car": {
"reluctance": 10
},
"walk": {
"speed": 1.3,
"reluctance": 1.75,
"stairsReluctance": 1.65,
"stairsTimeFactor": 2,
"boardCost": 120
},
"accessEgress": {
"maxDuration": "1h"
},
"elevatorBoardTime": 60,
"maxDirectStreetDuration": "90m",
"maxJourneyDuration": "12h",
"streetRoutingTimeout": "6s",
"wheelchairAccessibility": {
"stop": {
"onlyConsiderAccessible": false,
"unknownCost": 0,
"inaccessibleCost": 100000
},
"maxSlope": 0.125
},
"itineraryFilters": {
"transitGeneralizedCostLimit": {
"costLimitFunction": "600 + 1.5x"
},
"nonTransitGeneralizedCostLimit": "400 + 1.5x"
},
"transitReluctanceForMode": {
"BUS": 1.2,
"SUBWAY": 0.9,
"RAIL": 0.95
},
"unpreferredCost": "1700 + 1.2x",
"unpreferred": {
"routes": [
"HSL:7191",
"HSL:7191A",
"HSL:7192",
"HSL:7192T",
"HSL:7192KM",
"HSL:7192M",
"HSL:7192V",
"HSL:7193",
"HSL:7193V",
"HSL:7193VK",
"HSL:7194V",
"HSL:7194VK",
"HSL:7194VT",
"HSL:7195",
"HSL:7275",
"HSL:7280",
"HSL:7346",
"HSL:7375",
"HSL:7375V",
"HSL:7453",
"HSL:7455",
"HSL:7455A",
"HSL:7456",
"HSL:7456A",
"HSL:7456N",
"HSL:7457",
"HSL:7457A",
"HSL:7459",
"HSL:7464",
"HSL:7465",
"HSL:7465B",
"HSL:7848",
"HSL:7999",
"HSL:1008X"
]
}
},
"updaters": [
{
"type" : "vehicle-rental",
"sourceType" : "gbfs",
"frequency" : "1h",
"url" : "file:///home/henrik/hsl/OpenTripPlanner/test/performance/helsinki/data/gbfs.json",
"geofencingZones": true
}
]
}
Loading
Loading