mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
Remove the unsupported shuttleStopNearbyDegreeDelta option from InterchangeSystemBuilderArguments
This commit is contained in:
@@ -54,14 +54,6 @@ export interface InterchangeSystemBuilderArguments {
|
|||||||
* at a stop, in latitude/longitude degrees.
|
* at a stop, in latitude/longitude degrees.
|
||||||
*/
|
*/
|
||||||
shuttleStopArrivalDegreeDelta: number;
|
shuttleStopArrivalDegreeDelta: number;
|
||||||
|
|
||||||
/**
|
|
||||||
* The size of the threshold to detect when a shuttle is "near"
|
|
||||||
* a stop, in latitude/longitude degrees. To determine this value,
|
|
||||||
* find the distance at which the shuttle would normally take
|
|
||||||
* ~1 minute to reach the next stop.
|
|
||||||
*/
|
|
||||||
shuttleStopNearbyDegreeDelta: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class InterchangeSystem {
|
export class InterchangeSystem {
|
||||||
@@ -116,7 +108,6 @@ export class InterchangeSystem {
|
|||||||
const shuttleRepository = new RedisShuttleRepository(
|
const shuttleRepository = new RedisShuttleRepository(
|
||||||
createRedisClientForRepository(),
|
createRedisClientForRepository(),
|
||||||
args.shuttleStopArrivalDegreeDelta,
|
args.shuttleStopArrivalDegreeDelta,
|
||||||
args.shuttleStopNearbyDegreeDelta,
|
|
||||||
);
|
);
|
||||||
await shuttleRepository.connect();
|
await shuttleRepository.connect();
|
||||||
|
|
||||||
@@ -268,7 +259,6 @@ export class InterchangeSystem {
|
|||||||
private static buildInMemoryShuttleLoaderAndRepositories(args: InterchangeSystemBuilderArguments) {
|
private static buildInMemoryShuttleLoaderAndRepositories(args: InterchangeSystemBuilderArguments) {
|
||||||
const shuttleRepository = new UnoptimizedInMemoryShuttleRepository(
|
const shuttleRepository = new UnoptimizedInMemoryShuttleRepository(
|
||||||
args.shuttleStopArrivalDegreeDelta,
|
args.shuttleStopArrivalDegreeDelta,
|
||||||
args.shuttleStopNearbyDegreeDelta,
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let etaRepository: BaseInMemoryETARepository;
|
let etaRepository: BaseInMemoryETARepository;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ const supportedSystems: InterchangeSystemBuilderArguments[] = [
|
|||||||
name: "Chapman University",
|
name: "Chapman University",
|
||||||
useSelfUpdatingEtas: true,
|
useSelfUpdatingEtas: true,
|
||||||
shuttleStopArrivalDegreeDelta: 0.001,
|
shuttleStopArrivalDegreeDelta: 0.001,
|
||||||
shuttleStopNearbyDegreeDelta: 0.003,
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { ShuttleGetterSetterRepository } from "./ShuttleGetterSetterRepository";
|
import { ShuttleGetterSetterRepository } from "./ShuttleGetterSetterRepository";
|
||||||
import { IEta, IOrderedStop, IRoute, IShuttle, IStop, shuttleHasArrivedAtStop } from "../../entities/ShuttleRepositoryEntities";
|
import { IEta, IOrderedStop, IRoute, IShuttle, IStop, shuttleHasArrivedAtStop } from "../../entities/ShuttleRepositoryEntities";
|
||||||
import {
|
import {
|
||||||
ShuttleRepositoryEvent,
|
ShuttleRepositoryEvent,
|
||||||
ShuttleRepositoryEventListener,
|
ShuttleRepositoryEventListener,
|
||||||
ShuttleRepositoryEventName,
|
ShuttleRepositoryEventName,
|
||||||
ShuttleRepositoryEventPayloads,
|
ShuttleRepositoryEventPayloads,
|
||||||
ShuttleStopArrival,
|
ShuttleStopArrival,
|
||||||
ShuttleTravelTimeDataIdentifier,
|
ShuttleTravelTimeDataIdentifier,
|
||||||
ShuttleTravelTimeDateFilterArguments
|
ShuttleTravelTimeDateFilterArguments
|
||||||
} from "./ShuttleGetterRepository";
|
} from "./ShuttleGetterRepository";
|
||||||
import { BaseRedisRepository } from "../BaseRedisRepository";
|
import { BaseRedisRepository } from "../BaseRedisRepository";
|
||||||
import { RedisClientType } from "redis";
|
import { RedisClientType } from "redis";
|
||||||
@@ -17,7 +17,6 @@ export class RedisShuttleRepository extends BaseRedisRepository implements Shutt
|
|||||||
constructor(
|
constructor(
|
||||||
redisClient: RedisClientType = createRedisClientForRepository(),
|
redisClient: RedisClientType = createRedisClientForRepository(),
|
||||||
readonly shuttleStopArrivalDegreeDelta: number = 0.001,
|
readonly shuttleStopArrivalDegreeDelta: number = 0.001,
|
||||||
readonly shuttleStopNearbyDegreeDelta: number = 0.003,
|
|
||||||
) {
|
) {
|
||||||
super(redisClient);
|
super(redisClient);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,13 @@ import { ShuttleGetterSetterRepository } from "./ShuttleGetterSetterRepository";
|
|||||||
import { IOrderedStop, IRoute, IShuttle, IStop, shuttleHasArrivedAtStop } from "../../entities/ShuttleRepositoryEntities";
|
import { IOrderedStop, IRoute, IShuttle, IStop, shuttleHasArrivedAtStop } from "../../entities/ShuttleRepositoryEntities";
|
||||||
import { IEntityWithId } from "../../entities/SharedEntities";
|
import { IEntityWithId } from "../../entities/SharedEntities";
|
||||||
import {
|
import {
|
||||||
ShuttleRepositoryEvent,
|
ShuttleRepositoryEvent,
|
||||||
ShuttleRepositoryEventListener,
|
ShuttleRepositoryEventListener,
|
||||||
ShuttleRepositoryEventName,
|
ShuttleRepositoryEventName,
|
||||||
ShuttleRepositoryEventPayloads,
|
ShuttleRepositoryEventPayloads,
|
||||||
ShuttleStopArrival,
|
ShuttleStopArrival,
|
||||||
ShuttleTravelTimeDataIdentifier,
|
ShuttleTravelTimeDataIdentifier,
|
||||||
ShuttleTravelTimeDateFilterArguments,
|
ShuttleTravelTimeDateFilterArguments,
|
||||||
} from "./ShuttleGetterRepository";
|
} from "./ShuttleGetterRepository";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -23,7 +23,6 @@ export class UnoptimizedInMemoryShuttleRepository
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly shuttleStopArrivalDegreeDelta: number = 0.001,
|
readonly shuttleStopArrivalDegreeDelta: number = 0.001,
|
||||||
readonly shuttleStopNearbyDegreeDelta: number = 0.003,
|
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ const systemInfoForTesting: InterchangeSystemBuilderArguments = {
|
|||||||
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
|
parkingSystemId: ChapmanApiBasedParkingRepositoryLoader.id,
|
||||||
useSelfUpdatingEtas: false,
|
useSelfUpdatingEtas: false,
|
||||||
shuttleStopArrivalDegreeDelta: 0.001,
|
shuttleStopArrivalDegreeDelta: 0.001,
|
||||||
shuttleStopNearbyDegreeDelta: 0.003,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function buildSystemForTesting() {
|
export function buildSystemForTesting() {
|
||||||
|
|||||||
Reference in New Issue
Block a user