Skip to content

Improve TraCI traffic light tutorial - #18247

Open
Corvus-226 wants to merge 1 commit into
eclipse-sumo:mainfrom
Corvus-226:docs/8741-improve-traci-tls
Open

Improve TraCI traffic light tutorial#18247
Corvus-226 wants to merge 1 commit into
eclipse-sumo:mainfrom
Corvus-226:docs/8741-improve-traci-tls

Conversation

@Corvus-226

Copy link
Copy Markdown

Summary

This PR improves the TraCI traffic-light tutorial by separating route
generation from the online controller and replacing ambiguous numeric IDs
with descriptive element names.

Changes

  • move deterministic route generation from runner.py to generateRoutes.py;
  • keep runner.py as the one-command tutorial entry point;
  • rename the traffic-light ID to junction;
  • rename the northbound induction-loop ID to north_detector;
  • update cross.net.xml consistently with the source files while preserving the legacy network structure and simulation behavior;
  • include generateRoutes.py in the complex-test tutorial extraction;
  • update the tutorial documentation to describe the new file roles and IDs.

Validation

  • python -m py_compile runner.py generateRoutes.py
  • python generateRoutes.py
  • python runner.py --nogui
  • deterministic route output remains unchanged: 768 vehicles
  • simulation output remains unchanged: end time 3728.00 and all 768 trip records match the baseline
  • targeted TextTest tutorial/traci_tls/plain passes
  • extracted tutorial example runs successfully
  • mkdocs build
  • git diff --check

Note

The committed cross.net.xml changes are intentionally limited to the renamed
ID references. Regenerating this legacy tutorial network with current
netconvert introduces unrelated format and behavioral changes.

Closes #8741

Signed-off-by: Rock <1540095933@qq.com>
@namdre

namdre commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve traci TLS tutorial

2 participants