Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add via to the Transmodel trip query and make a proper Raptor implementation for it #6084

Merged
merged 65 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6abd293
refactor: Remove RaptorWorker usage
t2gran Jul 22, 2024
1420ab3
refactor: Rename DefaultRangeRaptorWorker to RangeRaptor
t2gran Jul 22, 2024
0ada612
refactor: Rename RaptorWorker interface - unused p.t.
t2gran Jul 22, 2024
97a2621
refactor: Split RangeRaptor in a pure driver and an algorithm impleme…
t2gran Jul 22, 2024
b952ad8
refactor: Use WorkerLifeCycle to inject round counter and remove Roun…
t2gran Jul 26, 2024
edda318
refactor: Reintroduce the RangeRaptorWorker interface - one level down.
t2gran Jul 26, 2024
07b7c22
refactor: Move RaptorStopNameResolver to package o.o.raptor.api.model
t2gran Jul 27, 2024
7dd0252
feature: Add raptor Via search API
t2gran Jul 30, 2024
1d6a7f1
refactor: Improve local field name: dynamicSearchWindowCalculator (fr…
t2gran Jul 30, 2024
5a7f9c8
refactor: Minor cleanups in Raptor - no logic changed.
t2gran Jul 30, 2024
c1bcc7e
refactor: Add CompositeUtil and more unit tests to the ParetoSet
t2gran Sep 9, 2024
6e6f69d
refactor: Arrange methods in AccessPaths
t2gran Aug 13, 2024
1fa7ad8
refactor: Extract builder out of SearchContext (o.o.r.rr.context)
t2gran Aug 4, 2024
8dbafdb
feature: Add via search to Raptor
t2gran Jul 26, 2024
d769612
refactor: Deprecate old vi search.
t2gran Sep 9, 2024
fe37d94
refactor: Rename field in PassThroughPoint
t2gran Sep 9, 2024
b672ff7
refactor: Deprecate ViaLocationMapper
t2gran Sep 9, 2024
1249901
refactor: Rename PassThroughPoint to ViaLocation
t2gran Sep 9, 2024
bab588e
refactor: Rename PassThroughLocationMapper to ViaLocationMapper
t2gran Sep 9, 2024
add5edc
refactor: Add parameters to the ViaLocation
t2gran Sep 9, 2024
5e00c29
refactor: Rename request getPassThroughPoints() to getViaLocations()
t2gran Sep 11, 2024
a534f33
refactor: Refactor PassThroughPoint request arguments and replace it …
t2gran Sep 11, 2024
756f7a4
refactor: Make to kinds of ViaLocation in request: PassThrough and Visit
t2gran Sep 13, 2024
26e41f4
refactor: Delete unused ViaConnection
t2gran Sep 13, 2024
496aa5d
refactor: Move via request classes into via package
t2gran Sep 13, 2024
14b8562
refactor: Hide legacy ViaSearch in Transmodel API in its own package
t2gran Sep 19, 2024
38b9d17
refactor: Make Transmodel scalars static and move from GqlUtil into T…
t2gran Sep 20, 2024
2e3b77a
feature: Add VIA to Transmodel trip request
t2gran Sep 20, 2024
05ad9ad
refactor: Move @timingData directive out of Scalars in Transmodel API
t2gran Sep 20, 2024
f1e2f9f
feature: Add @oneO directive to Transmodel Schema
t2gran Sep 20, 2024
adff75e
refactor: Rename raptor request classes to avoid using same name as i…
t2gran Sep 20, 2024
593656a
refactor: Deprecate Raptor PassThroughPoint
t2gran Sep 20, 2024
145ddd9
refactor: Rename ViaLocationDeprecatedTest to ViaLocationTest
t2gran Sep 20, 2024
d1853d0
feature: Map OTP request to Raptor request - last step to make the vi…
t2gran Sep 20, 2024
ff643d1
refactor: Move EncodedPolylineBeanWithStops from utils to framework.
t2gran Sep 22, 2024
68e8867
Add RaptorRouter interface for to allow top level instrumentation
t2gran Sep 23, 2024
4b475ff
Update src/main/java/org/opentripplanner/raptor/api/request/RaptorVia…
t2gran Sep 26, 2024
1e679e6
Apply suggestions from code review
t2gran Sep 26, 2024
ccfbbe5
refactor: Remove unused code in GqlUtil
t2gran Sep 27, 2024
55ba651
feature: Make via list input fields non-null
t2gran Sep 27, 2024
d8db27f
refactor: Extract ViaConnectionStopArrivalEventListener and improve doc
t2gran Sep 27, 2024
3119605
refactor: Improve JavaDoc on RaptorViaLocation
t2gran Sep 27, 2024
72c5da4
rename: PlanViaLocationInput to TripViaLocationInput
t2gran Oct 8, 2024
162be1c
Apply suggestions from code review
t2gran Oct 8, 2024
339c89f
Merge remote-tracking branch 'otp/dev-2.x' into via
t2gran Oct 8, 2024
f1aebf1
Merge remote-tracking branch 'otp/dev-2.x' into via
t2gran Oct 8, 2024
b638918
review: Remove obsolete doc
t2gran Oct 8, 2024
8380ab4
review: Remove unused accessPaths in McStopArrivals
t2gran Oct 8, 2024
5bacd28
review: Improve naming: "nextLeg"
t2gran Oct 8, 2024
ef3f91c
review: Rename TripQuery FIELD_VIA -> TRIP_VIA_PARAMETER
t2gran Oct 8, 2024
4928cbd
doc: Clarify OneOf directive validation
t2gran Oct 8, 2024
9431f92
doc: Improve doc for via GraphQL parameters
t2gran Oct 8, 2024
bf7d1af
doc: Add more JavaDoc to the validateOneOf()
t2gran Oct 8, 2024
24d4a02
Update src/main/java/org/opentripplanner/apis/transmodel/support/OneO…
t2gran Oct 9, 2024
eaf1fd2
Update src/main/java/org/opentripplanner/raptor/rangeraptor/standard/…
t2gran Oct 9, 2024
d8f3c85
Review - Rephrase the `visit` via field
t2gran Oct 9, 2024
c473233
Review - Fixing small issues in the Raptor implementation
t2gran Oct 9, 2024
867fd67
Review - Import and format requireNonNull egressPaths()
t2gran Oct 9, 2024
c9c23b7
refactor: Make GqlUtil a pure utility class
t2gran Oct 9, 2024
2537f14
refactor: Make requireNonNegativeShort++ explicit
t2gran Oct 9, 2024
3bf760b
refactor: Rename to result() in RangeRaptorWorker
t2gran Oct 9, 2024
58cdc26
doc: Improve JavaDoc for StopArrivalParetoSet
t2gran Oct 9, 2024
a1a5d4f
refactor: Improve doc and move coping state for next leg in Raptor.
t2gran Oct 9, 2024
47c6348
doc: Improve doc.
t2gran Oct 9, 2024
936fc2e
refactor: Make AccessPaths#calculateMaxNumberOfRides an instance method
t2gran Oct 10, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static void setBicycleWalkPreferences(
var mountTime = args.getGraphQLMountDismountTime();
if (mountTime != null) {
preferences.withMountDismountTime(
DurationUtils.requireNonNegativeShort(mountTime, "bicycle mount dismount time")
DurationUtils.requireNonNegativeMax30minutes(mountTime, "bicycle mount dismount time")
);
}
var cost = args.getGraphQLCost();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static RouteRequest toRouteRequest(
request.setLocale(GraphQLUtils.getLocale(environment, args.getGraphQLLocale()));
if (args.getGraphQLSearchWindow() != null) {
request.setSearchWindow(
DurationUtils.requireNonNegativeLong(args.getGraphQLSearchWindow(), "searchWindow")
DurationUtils.requireNonNegativeMax2days(args.getGraphQLSearchWindow(), "searchWindow")
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void setTransitPreferences(
var slack = board.getGraphQLSlack();
if (slack != null) {
transitPreferences.withDefaultBoardSlackSec(
(int) DurationUtils.requireNonNegativeMedium(slack, "board slack").toSeconds()
(int) DurationUtils.requireNonNegativeMax2hours(slack, "board slack").toSeconds()
);
}
var waitReluctance = board.getGraphQLWaitReluctance();
Expand All @@ -60,7 +60,7 @@ static void setTransitPreferences(
var slack = alight.getGraphQLSlack();
if (slack != null) {
transitPreferences.withDefaultAlightSlackSec(
(int) DurationUtils.requireNonNegativeMedium(slack, "alight slack").toSeconds()
(int) DurationUtils.requireNonNegativeMax2hours(slack, "alight slack").toSeconds()
);
}
}
Expand All @@ -73,7 +73,7 @@ static void setTransitPreferences(
var slack = transfer.getGraphQLSlack();
if (slack != null) {
transferPreferences.withSlack(
DurationUtils.requireNonNegativeMedium(slack, "transfer slack")
DurationUtils.requireNonNegativeMax2hours(slack, "transfer slack")
);
}
var maxTransfers = transfer.getGraphQLMaximumTransfers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.Map;
import java.util.stream.Collectors;
import org.opentripplanner.apis.transmodel.mapping.TransitIdMapper;
import org.opentripplanner.apis.transmodel.support.GqlUtil;
import org.opentripplanner.routing.api.request.RouteRequest;
import org.opentripplanner.standalone.api.OtpServerRequestContext;
import org.opentripplanner.transit.service.TransitModel;
Expand Down Expand Up @@ -75,8 +74,7 @@ public static void setUp(
}
tracingHeaderTags = config.tracingHeaderTags();
maxNumberOfResultFields = config.maxNumberOfResultFields();
GqlUtil gqlUtil = new GqlUtil(transitModel.getTimeZone());
schema = TransmodelGraphQLSchema.create(defaultRouteRequest, gqlUtil);
schema = TransmodelGraphQLSchema.create(defaultRouteRequest, transitModel.getTimeZone());
}

@POST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.opentripplanner.framework.concurrent.OtpRequestThreadFactory;
import org.opentripplanner.framework.lang.ObjectUtils;
import org.opentripplanner.standalone.api.OtpServerRequestContext;
import org.opentripplanner.transit.model.framework.EntityNotFoundException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -72,7 +73,7 @@ Response executeGraphQL(
return ExecutionResultMapper.timeoutResponse();
} catch (ResponseTooLargeException rtle) {
return ExecutionResultMapper.tooLargeResponse(rtle.getMessage());
} catch (CoercingParseValueException | UnknownOperationException e) {
} catch (EntityNotFoundException | CoercingParseValueException | UnknownOperationException e) {
return ExecutionResultMapper.badRequestResponse(e.getMessage());
} catch (Exception systemError) {
LOG.error(systemError.getMessage(), systemError);
Expand Down
Loading
Loading