Skip to content

Commit

Permalink
change type of some parameters for profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
chraibi committed Mar 2, 2024
1 parent ba3453b commit 9732747
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
14 changes: 5 additions & 9 deletions calculate_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
import numpy.typing as npt
import pandas as pd
import pedpy as pp
from tqdm import tqdm
from joblib import Parallel, delayed
from pedpy import (
DensityMethod,
SpeedMethod,
compute_grid_cell_polygon_intersection_area,
compute_speed_profile,
get_grid_cells,
)
from pedpy import (DensityMethod, SpeedMethod,
compute_grid_cell_polygon_intersection_area,
compute_speed_profile, get_grid_cells)
from tqdm import tqdm

from log_config import setup_logging
from profile_config_data import Config
Expand Down Expand Up @@ -90,7 +86,7 @@ def calculate(
logging.info(f"Results in {result_file}")


def main(config: Config):
def main(config: Config) -> None:
"""Contains main logic for calculation of profiles."""
setup_logging()
grid_size = config.grid_size
Expand Down
2 changes: 1 addition & 1 deletion create_profile_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import pandas as pd
import pedpy as pp
from tqdm import tqdm
from joblib import Parallel, delayed
from pedpy.column_identifier import FRAME_COL, ID_COL
from tqdm import tqdm

from log_config import setup_logging
from profile_config_data import Config
Expand Down
6 changes: 3 additions & 3 deletions profile_config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class Config:
fps: int
walkable_area: pedpy.WalkableArea
grid_size: float
rmax: int
vmax: int
jmax: int
rmax: float
vmax: float
jmax: float
6 changes: 3 additions & 3 deletions run_profile_calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

import glob

from profile_config_data import Config
from pedpy import WalkableArea

import calculate_profiles
import create_profile_data
import ploting_profiles
from profile_config_data import Config


def run_all() -> None:
Expand All @@ -24,9 +24,9 @@ def run_all() -> None:
walkable_area=WalkableArea(area),
profile_data_file="AppData/profile_data.pkl",
result_file="AppData/density_speed_profiles.pkl",
rmax=3,
rmax=3.0,
vmax=1.2,
jmax=2,
jmax=2.0,
)

# Run the modules in sequence
Expand Down

0 comments on commit 9732747

Please sign in to comment.