Python Package to perform simple Traffic Interventions and to run various Traffic Simulations.
Project description
Traffic-Interventions
Installation
python -m pip install --upgrade pip
pip install --upgrade trafficinterventions
Documentation
All relevant files can be found here
Interventions
Sample Usage : Edge Manipulation
import trafficinterventions
ce = trafficinterventions.ChangeEdges.ChangeEdges(fileName="sample.xml")
# Sample Intervention
ce.disallowAppendTypes(["bus"], ["-100"], "new_file.xml")
Sample Usage : Lane Manipulation
import trafficinterventions
cl = trafficinterventions.ChangeLanes.ChangeLanes(fileName="sample.xml")
# Sample Intervention
ce.changePriorityLanes(["highway.cycleway"], 100, "new_file.xml")
Simulations
Sample Usage: Speed Camera Placement
import trafficinterventions
sc = trafficinterventions.SpeedCamera.SpeedCamera(
maxTimeSteps= 1000,
nearestNeighbourDisallow= 250.0,
gridArray=[-10000,10000,10000,-10000],
pathCFG="map.sumocfg",
outPath="Outputs/",
summaryFilePath="summary.txt",
numLocs=5
)
# Run the simulation and get outputs
sc.runSimulation()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for trafficinterventions-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6ee8264549e5587f130111e9c6da640f141c78d5b43e495bbe8929877b3e457 |
|
MD5 | 82c1720027412371df196d9cb7f9a81e |
|
BLAKE2b-256 | 485638f15c1b9799ee40836d2d105ab6a77cf7d3efc6275d53cd4cf99d7a11f7 |
Close
Hashes for trafficinterventions-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bb741eaf7bb7e8564ca4d6107f7018d79f38a9d4576ba9f52697f8924d42895 |
|
MD5 | e68ceff74dda9b029ef6da027fce5969 |
|
BLAKE2b-256 | a4fd9594f04c9afe42ff28bc419068b1dd939780e966d57d74a5fc1b6860b08f |