-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
29 lines (24 loc) · 866 Bytes
/
main.py
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
# Title : OpenSafe Mobility
# Objective : This repository contains all the necessary code to replicate OpenSafe Mobility workflow.
# Created by: Pranavesh Panakkal (pranavesh@rice.edu) and Jamie Ellen Padgett (jamie.padgett@rice.edu)
# Released on: 2022-04-07
# Version : 1.0
""""""
import hydra
from omegaconf import DictConfig
import logging
from modules.OpenSafeMobility import OpenSafeMobility
import schedule
import time
log = logging.getLogger(__name__)
@hydra.main(config_path="configs", config_name="config")
def main(config: DictConfig) -> None:
# Initiate OpenSafe Mobility Class
analysis = OpenSafeMobility(config=config)
# Define the scheduler and run the model
schedule.every(config.time_step).minutes.do(analysis.run)
while True:
schedule.run_pending()
time.sleep(1)
if __name__ == "__main__":
main()