From f7de60fafe891957535b4c9bd7619692c3966274 Mon Sep 17 00:00:00 2001 From: Sylvain Briat Date: Tue, 31 Oct 2023 09:14:07 +0100 Subject: [PATCH] add match config --- .env.dist | 22 ++++++++++++++++++++++ src/app.module.ts | 2 ++ 2 files changed, 24 insertions(+) diff --git a/.env.dist b/.env.dist index 76c3a27..c94eb59 100644 --- a/.env.dist +++ b/.env.dist @@ -18,6 +18,8 @@ REDIS_PORT=6379 # CARPOOL # default carpool departure time margin (in seconds) DEPARTURE_TIME_MARGIN=900 +# default validity duration (in days) for recurrent ads +RECURRENT_AD_VALIDITY_DURATION=365 # default role ROLE=passenger # seats proposed as driver / requested as passenger @@ -26,6 +28,26 @@ SEATS_REQUESTED=1 # accept only same frequency requests STRICT_FREQUENCY=false +# MATCH +# algorithm type +ALGORITHM=PASSENGER_ORIENTED +# max distance in metres between driver +# route and passenger pick-up / drop-off +REMOTENESS=15000 +# use passenger proportion +USE_PROPORTION=true +# minimal driver proportion +PROPORTION=0.3 +# use azimuth calculation +USE_AZIMUTH=true +# azimuth margin +AZIMUTH_MARGIN=10 +# margin duration in seconds +MARGIN_DURATION=900 +# max detour ratio +MAX_DETOUR_DISTANCE_RATIO=0.3 +MAX_DETOUR_DURATION_RATIO=0.3 + # PAGINATION # number of results per page PER_PAGE=10 diff --git a/src/app.module.ts b/src/app.module.ts index 644e029..12f75fe 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -17,6 +17,7 @@ import paginationConfig from './config/pagination.config'; import serviceConfig from './config/service.config'; import redisConfig from './config/redis.config'; import { Transport } from '@nestjs/microservices'; +import matchConfig from './config/match.config'; @Module({ imports: [ @@ -25,6 +26,7 @@ import { Transport } from '@nestjs/microservices'; load: [ brokerConfig, carpoolConfig, + matchConfig, paginationConfig, redisConfig, serviceConfig,