API Reference

RealTwin API

RealTwin([input_config_file])

The real-twin developed by ORNL Applied Research and Mobility System (ARMS) group that enables the simulation of twin-structured cities.

Utility Functions

util_lib.venv_create(*[, venv_name, ...])

Create a virtual environment in the specified folder with the specified name.

util_lib.venv_delete(*[, venv_name, ...])

Delete the virtual environment in the specified folder with the specified name.

util_lib.download_elevation_tif_by_bbox(...)

Download elevation data (TIFF) from USGS National Map based on a bounding box.

util_lib.download_single_file_from_web(url, ...)

Downloads a large file from a URL in chunks and saves it to the specified destination.

util_lib.find_executable_from_PATH_on_win(...)

Find the executable from the system PATH.

util_lib.prepare_config_file([dest_dir])

Create a default/demo configuration file for the RealTwin package.

Installation and Environment

func_lib.install_sumo([sel_dir, ...])

Install the SUMO simulator.

func_lib.install_sumo_windows([...])

Install SUMO onto the windows system.

func_lib.install_sumo_linux([sumo_version, ...])

Install SUMO onto the linux system.

func_lib.install_sumo_macos([sumo_version, ...])

Install SUMO onto the mac system.

func_lib.is_sumo_installed(*[, ext, ...])

Check if SUMO is installed on the system.

func_lib.is_aimsun_installed(*[, ext, ...])

Check if AIMSUN is installed on the system.

func_lib.is_vissim_installed(*[, ext, ...])

Check if VISSIM is installed on the system.

Load Inputs

func_lib.load_input_config(path_config)

load input configuration from yaml file

func_lib.get_bounding_box_from(vertices)

get the bounding box from the vertices string

Abstract Scenario Generation

func_lib.AbstractScenario([input_config])

Initialize an Abstract Scenario

func_lib.load_traffic_volume(demand_data)

load traffic volume data from file

func_lib.load_control_signal(path_signal)

load control signal data from file

func_lib.load_traffic_turning_ratio(df_volume)

load traffic turning ratio data from file

func_lib.OpenDriveNetwork([net_name, ...])

The OpenDriveNetwork class to generate OpenDrive network

func_lib.OSMRoad([output_dir])

The OSMRoad class to generate network from OpenStreetMap

Concrete Scenario Generation

func_lib.ConcreteScenario()

Initialize and Generate Concrete Scenario from Abstract Scenario

Prepare Simulation Documents

func_lib.SimPrep(**kwargs)

Prepare simulation from concrete scenario

func_lib.SUMOPrep(**kwargs)

The class to handle the SUMO simulation for the real-twin developed by ORNL ARMS group.

func_lib.AimsunPrep()

constructor

func_lib.VissimPrep(**kwargs)

Class to prepare VISSIM simulation environment.

Calibration

func_lib.cali_sumo(*[, sel_algo, ...])

Run SUMO calibration based on the selected algorithm and input configuration.

func_lib.cali_aimsun(*[, sel_algo, ...])

Run SUMO calibration based on the selected algorithm and input configuration.

func_lib.cali_vissim(*[, sel_algo, ...])

Run VISSIM calibration using the specified algorithm and input configuration.

func_lib.BehaviorCali([scenario_config, ...])

Behavior Optimization class for SUMO calibration

func_lib.TurnInflowCali([scenario_config, ...])

Turn and Inflow Optimization class for SUMO calibration.