交通住宿衔接
原能力
检查抵达、离开、入住、退房和最后一段接驳的时间差。(细化版 p.10–11)
首选项目
OpenTripPlanner(LGPL-3.0,局部按许可头)。 OpenTripPlanner
匹配范围
行程 legs 与日历时段对齐抵达和入住时间。
源码
OpenTripPlanner · public RoutingResponse route()
application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java · 193–206 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public RoutingResponse route() {
OTPRequestTimeoutException.checkForTimeout();
this.debugTimingAggregator.finishedPrecalculating();
var result = RoutingResult.empty();
try (var temporaryVerticesContainer = new TemporaryVerticesContainer()) {
this.currentLinkingContext = createLinkingContext(temporaryVerticesContainer);
if (OTPFeature.ParallelRouting.isOn()) {
// TODO: This is not using {@link OtpRequestThreadFactory} which means we do not get
// log-trace-parameters-propagation and graceful timeout handling here.
try {
var r1 = CompletableFuture.supplyAsync(() -> routeDirectStreet());
var r2 = CompletableFuture.supplyAsync(() -> routeDirectFlex());
icalendar · class Event(
src/icalendar/cal/event.py · 66–79 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class Event(Component):
"""A grouping of component properties that describe an event.
Description:
A "VEVENT" calendar component is a grouping of
component properties, possibly including "VALARM" calendar
components, that represents a scheduled amount of time on a
calendar. For example, it can be an activity; such as a one-hour
long, department meeting from 8:00 AM to 9:00 AM, tomorrow.
Generally, an event will take up time on an individual calendar.
Hence, the event will appear as an opaque interval in a search for
busy time. Alternately, the event can have its Time Transparency
set to "TRANSPARENT" in order to prevent blocking of the event in
searches for busy time.
实现与验收要点
住宿真实预订及入住/退房门槛,跨供应商衔接。