realtwin.func_lib.TurnInflowCali
- class realtwin.func_lib.TurnInflowCali(scenario_config: dict = None, turn_inflow_config: dict = None, verbose: bool = True)[source]
Turn and Inflow Optimization class for SUMO calibration.
See also
Problem_dict: https://mealpy.readthedocs.io/en/latest/pages/general/simple_guide.html termination_dict: https://mealpy.readthedocs.io/en/latest/pages/general/advance_guide.html#stopping-condition-termination
- Parameters:
scenario_config (dict) – the configuration for the scenario.
turn_inflow_config (dict) – the configuration for the turn and inflow.
verbose (bool) – whether to print the information. Defaults to True.
Note
- We use the mealpy library for optimization. mealpy is a Python library for optimization algorithms.
The scenario_config parameter is used and can be modified from the input_config.yaml file.
The turn_inflow_config parameter is used and can be modified from the input_config.yaml file.
- __init__(scenario_config: dict = None, turn_inflow_config: dict = None, verbose: bool = True)[source]
Initialize the TurnInflowCalib class with scenario and turn inflow configurations.
Methods
__init__([scenario_config, ...])Initialize the TurnInflowCalib class with scenario and turn inflow configurations.
run_GA(**kwargs)Run Genetic Algorithm (GA) for behavior optimization.
run_SA(**kwargs)Run Simulated Annealing (SA) for behavior optimization.
run_TS(**kwargs)Run Tabu Search (TS) for behavior optimization.
run_vis(output_dir, model)Save the results of the optimization.