Skip to content

update demos and examples#277

Merged
toruseo merged 4 commits intomainfrom
develop
Mar 27, 2026
Merged

update demos and examples#277
toruseo merged 4 commits intomainfrom
develop

Conversation

@toruseo
Copy link
Copy Markdown
Owner

@toruseo toruseo commented Mar 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 27, 2026 07:54
@toruseo toruseo enabled auto-merge March 27, 2026 07:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates several UXsim demo scripts/notebooks to enable no_cyclic_routing in World(...), aiming to prevent cyclic (node-revisiting) routes in example scenarios.

Changes:

  • Enable no_cyclic_routing=True in selected English/Japanese example scripts.
  • Enable no_cyclic_routing=True in the Google Colab demo notebook.
  • Add brief inline explanation comments in the basic examples / notebook.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
demos_and_examples/example_04jp_automatic_network_generation.py Enables no_cyclic_routing for the JP automatic grid network example.
demos_and_examples/example_04en_automatic_network_generation.py Enables no_cyclic_routing for the EN automatic grid network example.
demos_and_examples/example_01jp_basic.py Enables no_cyclic_routing in the JP basic example (with inline comment).
demos_and_examples/example_01en_basic.py Enables no_cyclic_routing in the EN basic example (with inline comment).
demos_and_examples/example_00en_simple.py Enables no_cyclic_routing in the simplest EN example.
demos_and_examples/demo_notebook_05en_for_google_colab.ipynb Enables no_cyclic_routing in the Colab notebook’s large grid example (with inline comment).

Comment thread demos_and_examples/example_01jp_basic.py Outdated
name="", #シナリオ名称.空白でも可.結果保存のフォルダ名に使われる
deltan=5, #シミュレーション集計単位Δn.何台の車両をまとめて計算するか.計算コストは基本的にdeltan^2に逆比例する
tmax=1200, #総シミュレーション時間(s)
no_cyclic_routing=True, #車両がたまに同じリンクを複数回通るのを防止する
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a tab character between the comma and the comment after no_cyclic_routing=True. Please replace it with spaces to keep indentation/whitespace consistent and avoid editor-dependent alignment issues.

Suggested change
no_cyclic_routing=True, #車両がたまに同じリンクを複数回通るのを防止する
no_cyclic_routing=True, #車両がたまに同じリンクを複数回通るのを防止する

Copilot uses AI. Check for mistakes.
" name=\"large\",\n",
" deltan=10,\n",
" tmax=7200,\n",
" no_cyclic_routing=True, # This prevents unrealistic routing behaviors in which vehicles occasionally travel the same link multiple times\n",
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The notebook comment says no_cyclic_routing prevents vehicles from traveling the same link multiple times, but the current implementation prevents revisiting nodes (cycle prevention). Please update the comment text so Colab users aren’t misled about what the flag does.

Suggested change
" no_cyclic_routing=True, # This prevents unrealistic routing behaviors in which vehicles occasionally travel the same link multiple times\n",
" no_cyclic_routing=True, # This prevents routing cycles by disallowing paths that revisit the same node\n",

Copilot uses AI. Check for mistakes.
Comment thread demos_and_examples/example_01en_basic.py Outdated
@toruseo toruseo disabled auto-merge March 27, 2026 08:01
toruseo and others added 2 commits March 27, 2026 17:02
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@toruseo toruseo enabled auto-merge March 27, 2026 08:04
@toruseo toruseo merged commit 102a936 into main Mar 27, 2026
15 checks passed
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.

2 participants