From bd9a4bcc0907d470ad8ac647eb6b489b8a5c9166 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Mon, 30 Sep 2024 13:59:19 +0100 Subject: [PATCH 1/3] add missing transit modes in InputModeWeight --- .../org/opentripplanner/apis/gtfs/schema.graphqls | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls index 839fd3c6d61..00eb1eac565 100644 --- a/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls +++ b/application/src/main/resources/org/opentripplanner/apis/gtfs/schema.graphqls @@ -3838,18 +3838,28 @@ input InputModeWeight { BUS: Float "The weight of CABLE_CAR traverse mode. Values over 1 add cost to cable car travel and values under 1 decrease cost" CABLE_CAR: Float + "The weight of CARPOOL traverse mode. Values over 1 add cost to carpool travel and values under 1 decrease cost" + CARPOOL: Float + "The weight of COACH traverse mode. Values over 1 add cost to coach travel and values under 1 decrease cost" + COACH: Float "The weight of FERRY traverse mode. Values over 1 add cost to ferry travel and values under 1 decrease cost" FERRY: Float "The weight of FUNICULAR traverse mode. Values over 1 add cost to funicular travel and values under 1 decrease cost" FUNICULAR: Float "The weight of GONDOLA traverse mode. Values over 1 add cost to gondola travel and values under 1 decrease cost" GONDOLA: Float + "The weight of MONORAIL traverse mode. Values over 1 add cost to monorail travel and values under 1 decrease cost" + MONORAIL: Float "The weight of RAIL traverse mode. Values over 1 add cost to rail travel and values under 1 decrease cost" RAIL: Float "The weight of SUBWAY traverse mode. Values over 1 add cost to subway travel and values under 1 decrease cost" SUBWAY: Float + "The weight of TAXI traverse mode. Values over 1 add cost to taxi travel and values under 1 decrease cost" + TAXI: Float "The weight of TRAM traverse mode. Values over 1 add cost to tram travel and values under 1 decrease cost" TRAM: Float + "The weight of TROLLEYBUS traverse mode. Values over 1 add cost to trolleybus travel and values under 1 decrease cost" + TROLLEYBUS: Float } input InputPreferred { From 535bd748abc6b6a96567192ad7560950531a5c22 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Tue, 1 Oct 2024 20:00:58 +0100 Subject: [PATCH 2/3] update generated code --- .../gtfs/generated/GraphQLDataFetchers.java | 9 ++++ .../apis/gtfs/generated/GraphQLTypes.java | 51 +++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 7532faf28bd..9d147138c80 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1,9 +1,11 @@ //THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; +import graphql.relay.Connection; import graphql.relay.Connection; import graphql.relay.DefaultEdge; import graphql.relay.Edge; +import graphql.relay.Edge; import graphql.schema.DataFetcher; import graphql.schema.TypeResolver; import java.util.Currency; @@ -25,8 +27,12 @@ import org.opentripplanner.apis.gtfs.model.FeedPublisher; import org.opentripplanner.apis.gtfs.model.PlanPageInfo; import org.opentripplanner.apis.gtfs.model.RideHailingProvider; +import org.opentripplanner.apis.gtfs.model.RouteTypeModel; +import org.opentripplanner.apis.gtfs.model.StopOnRouteModel; +import org.opentripplanner.apis.gtfs.model.StopOnTripModel; import org.opentripplanner.apis.gtfs.model.StopPosition; import org.opentripplanner.apis.gtfs.model.TripOccupancy; +import org.opentripplanner.apis.gtfs.model.UnknownModel; import org.opentripplanner.ext.fares.model.FareRuleSet; import org.opentripplanner.ext.ridehailing.model.RideEstimate; import org.opentripplanner.model.StopTimesInPattern; @@ -49,6 +55,8 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParking; +import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; @@ -59,6 +67,7 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; +import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.basic.Money; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 3cd98b15652..79046b21e97 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -1,6 +1,7 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -972,24 +973,34 @@ public static class GraphQLInputModeWeightInput { private Double AIRPLANE; private Double BUS; private Double CABLE_CAR; + private Double CARPOOL; + private Double COACH; private Double FERRY; private Double FUNICULAR; private Double GONDOLA; + private Double MONORAIL; private Double RAIL; private Double SUBWAY; + private Double TAXI; private Double TRAM; + private Double TROLLEYBUS; public GraphQLInputModeWeightInput(Map args) { if (args != null) { this.AIRPLANE = (Double) args.get("AIRPLANE"); this.BUS = (Double) args.get("BUS"); this.CABLE_CAR = (Double) args.get("CABLE_CAR"); + this.CARPOOL = (Double) args.get("CARPOOL"); + this.COACH = (Double) args.get("COACH"); this.FERRY = (Double) args.get("FERRY"); this.FUNICULAR = (Double) args.get("FUNICULAR"); this.GONDOLA = (Double) args.get("GONDOLA"); + this.MONORAIL = (Double) args.get("MONORAIL"); this.RAIL = (Double) args.get("RAIL"); this.SUBWAY = (Double) args.get("SUBWAY"); + this.TAXI = (Double) args.get("TAXI"); this.TRAM = (Double) args.get("TRAM"); + this.TROLLEYBUS = (Double) args.get("TROLLEYBUS"); } } @@ -1005,6 +1016,14 @@ public Double getGraphQLCable_Car() { return this.CABLE_CAR; } + public Double getGraphQLCarpool() { + return this.CARPOOL; + } + + public Double getGraphQLCoach() { + return this.COACH; + } + public Double getGraphQLFerry() { return this.FERRY; } @@ -1017,6 +1036,10 @@ public Double getGraphQLGondola() { return this.GONDOLA; } + public Double getGraphQLMonorail() { + return this.MONORAIL; + } + public Double getGraphQLRail() { return this.RAIL; } @@ -1025,10 +1048,18 @@ public Double getGraphQLSubway() { return this.SUBWAY; } + public Double getGraphQLTaxi() { + return this.TAXI; + } + public Double getGraphQLTram() { return this.TRAM; } + public Double getGraphQLTrolleybus() { + return this.TROLLEYBUS; + } + public void setGraphQLAirplane(Double AIRPLANE) { this.AIRPLANE = AIRPLANE; } @@ -1041,6 +1072,14 @@ public void setGraphQLCable_Car(Double CABLE_CAR) { this.CABLE_CAR = CABLE_CAR; } + public void setGraphQLCarpool(Double CARPOOL) { + this.CARPOOL = CARPOOL; + } + + public void setGraphQLCoach(Double COACH) { + this.COACH = COACH; + } + public void setGraphQLFerry(Double FERRY) { this.FERRY = FERRY; } @@ -1053,6 +1092,10 @@ public void setGraphQLGondola(Double GONDOLA) { this.GONDOLA = GONDOLA; } + public void setGraphQLMonorail(Double MONORAIL) { + this.MONORAIL = MONORAIL; + } + public void setGraphQLRail(Double RAIL) { this.RAIL = RAIL; } @@ -1061,9 +1104,17 @@ public void setGraphQLSubway(Double SUBWAY) { this.SUBWAY = SUBWAY; } + public void setGraphQLTaxi(Double TAXI) { + this.TAXI = TAXI; + } + public void setGraphQLTram(Double TRAM) { this.TRAM = TRAM; } + + public void setGraphQLTrolleybus(Double TROLLEYBUS) { + this.TROLLEYBUS = TROLLEYBUS; + } } public static class GraphQLInputPreferredInput { From 0660e757e4df5a23d78b8dc4f096382c44d29cbe Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Fri, 11 Oct 2024 15:21:12 +0100 Subject: [PATCH 3/3] remove duplicate imports from generated files --- .../apis/gtfs/generated/GraphQLDataFetchers.java | 9 --------- .../apis/gtfs/generated/GraphQLTypes.java | 1 - 2 files changed, 10 deletions(-) diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java index 9d147138c80..7532faf28bd 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLDataFetchers.java @@ -1,11 +1,9 @@ //THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; -import graphql.relay.Connection; import graphql.relay.Connection; import graphql.relay.DefaultEdge; import graphql.relay.Edge; -import graphql.relay.Edge; import graphql.schema.DataFetcher; import graphql.schema.TypeResolver; import java.util.Currency; @@ -27,12 +25,8 @@ import org.opentripplanner.apis.gtfs.model.FeedPublisher; import org.opentripplanner.apis.gtfs.model.PlanPageInfo; import org.opentripplanner.apis.gtfs.model.RideHailingProvider; -import org.opentripplanner.apis.gtfs.model.RouteTypeModel; -import org.opentripplanner.apis.gtfs.model.StopOnRouteModel; -import org.opentripplanner.apis.gtfs.model.StopOnTripModel; import org.opentripplanner.apis.gtfs.model.StopPosition; import org.opentripplanner.apis.gtfs.model.TripOccupancy; -import org.opentripplanner.apis.gtfs.model.UnknownModel; import org.opentripplanner.ext.fares.model.FareRuleSet; import org.opentripplanner.ext.ridehailing.model.RideEstimate; import org.opentripplanner.model.StopTimesInPattern; @@ -55,8 +49,6 @@ import org.opentripplanner.routing.graphfinder.PatternAtStop; import org.opentripplanner.routing.graphfinder.PlaceAtDistance; import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; -import org.opentripplanner.routing.vehicle_parking.VehicleParking; import org.opentripplanner.routing.vehicle_parking.VehicleParkingSpaces; import org.opentripplanner.routing.vehicle_parking.VehicleParkingState; import org.opentripplanner.service.realtimevehicles.model.RealtimeVehicle; @@ -67,7 +59,6 @@ import org.opentripplanner.service.vehiclerental.model.VehicleRentalPlace; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStation; import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; -import org.opentripplanner.service.vehiclerental.model.VehicleRentalStationUris; import org.opentripplanner.service.vehiclerental.model.VehicleRentalSystem; import org.opentripplanner.service.vehiclerental.model.VehicleRentalVehicle; import org.opentripplanner.transit.model.basic.Money; diff --git a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java index 79046b21e97..e4ecd2be02a 100644 --- a/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java +++ b/application/src/main/java/org/opentripplanner/apis/gtfs/generated/GraphQLTypes.java @@ -1,7 +1,6 @@ // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. package org.opentripplanner.apis.gtfs.generated; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors;