Add aggregate_orders() function
- the function queries the database and aggregates the ad-hoc orders by pixel and time steps into a demand time series - implement "heavy" integration tests for `aggregate_orders()` - make `pandas` a package dependency - streamline the `Config`
This commit is contained in:
parent
e8c97dd7da
commit
d5b3efbca1
10 changed files with 460 additions and 6 deletions
|
|
@ -26,14 +26,38 @@ def random_schema_name() -> str:
|
|||
class Config:
|
||||
"""Configuration that applies in all situations."""
|
||||
|
||||
# Application-specific settings
|
||||
# -----------------------------
|
||||
|
||||
# Date after which the real-life data is discarded.
|
||||
CUTOFF_DAY = datetime.datetime(2017, 2, 1)
|
||||
|
||||
# If a scheduled pre-order is made within this
|
||||
# time horizon, we treat it as an ad-hoc order.
|
||||
QUASI_AD_HOC_LIMIT = datetime.timedelta(minutes=45)
|
||||
|
||||
# Operating hours of the platform.
|
||||
SERVICE_START = 11
|
||||
SERVICE_END = 23
|
||||
|
||||
# Side lengths (in meters) for which pixel grids are created.
|
||||
# They are the basis for the aggregated demand forecasts.
|
||||
GRID_SIDE_LENGTHS = [707, 1000, 1414]
|
||||
|
||||
# Time steps (in minutes) used to aggregate the
|
||||
# individual orders into time series.
|
||||
TIME_STEPS = [60]
|
||||
|
||||
# Training horizons (in full weeks) used
|
||||
# to train the forecasting models.
|
||||
TRAINING_HORIZONS = [8]
|
||||
|
||||
# The demand forecasting methods used in the simulations.
|
||||
FORECASTING_METHODS = ['hets', 'rtarima']
|
||||
|
||||
# Implementation-specific settings
|
||||
# --------------------------------
|
||||
|
||||
DATABASE_URI = os.getenv('DATABASE_URI')
|
||||
|
||||
# The PostgreSQL schema that holds the tables with the original data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue