-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfiguration.py
More file actions
55 lines (45 loc) · 1.17 KB
/
configuration.py
File metadata and controls
55 lines (45 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#Configuration
# This file contains the configuration for the application
SEARCH_LIMIT = {
"max_stops": 3,
"max_routes": 30,
}
# Emission factors for different type of flights in kg CO2 per passenger per km
# Source: https://www.carbonindependent.org/22.html
EMISSION_FACTORS = {
"short_haul": 0.257,
"medium_haul": 0.180,
"long_haul": 0.134
}
DISTANCE_THRESHOLD = {
"short_haul": 1500,
"medium_haul": 4000
}
# Ticket price based on distance and duration
TICKET_PRICE = {
"price_per_km": 0.1,
"price_per_min": 0.1,
"base_price": 50
}
# Penalty for each layover
PENALTY = {
"weight_factors": 1.2,
"stop_penalty": 500,
"duration_penalty": 90, # in minutes
"emit_penalty": 1.15, # 15% increase in emission
"price_penalty": 0.85 # 15% discount in price
}
# Default currency setting
SELECTED_CURRENCY = "SGD"
# Cabin class multipliers
CABIN_CLASS = {
"Economy": 1.0,
"Business": 2.5,
"First": 4.0
}
# API key for the flight ticket price API
# Note: This key is for testing purposes only and has limited usage
# RapidAPI key for the flight ticket price API
RAPIDAPI_KEY = "REDACTED_API_KEY"
CURRENCY = "SGD"
API_ON = False