SUMO は,さまざまな形態のオブジェクト(車両,公共交通機関,歩行者)の交通シミュレーションを行う.
などの機能がある. 次のアプリから構成される.
先人に感謝
Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
Windows での cmake のインストール: 別ページ »で説明
【関連する外部ページ】
cmake の公式ダウンロードページ: https://cmake.org/download/
Windows での Python 3.10 のインストール,pip と setuptools の更新: 別ページ »で説明
Python の公式ページ: https://www.python.org/
チュートリアルを含む全機能をインストール.
公式サイトで Windows 版のバイナリも配布されているが,そちらを使うと, チュートリアルを使えるようにするのが面倒そうだったので, ソースコードから最新版をインストールする.
Eclipse SUMO のインストールに必要な前提ソフトウエアがダウンロードされる(ダウンロードしたものは,あとで,Eclipse SUMO のインストールに使用される).
mkdir c:\Librerias cd c:\Librerias rmdir /s /q SUMOLibraries git clone --recursive https://github.com/DLR-TS/SUMOLibraries
ファイルの調整は,インストール時のエラーを回避するためのもの
cd %HOMEPATH% rmdir /s /q sumo git clone --recursive https://github.com/eclipse/sumo mkdir %HOMEPATH%\sumo\cmake copy c:\Librerias\SUMOLibraries\proj-9.0.0\cmake\proj_config.cmake.in %HOMEPATH%\sumo\cmake
cd %HOMEPATH% cd sumo rmdir /s /q build mkdir build cd build cmake -G "Visual Studio 17 2022" -A x64 -T host=x64 -DSUMO_LIBRARIES=c:/Librerias/SUMOLibraries .. cmake --build . --config RELEASE cmake --build . --config RELEASE --target install
nodes タグと node タグを使用
edges タグと edge タグを使用
routes タグ, vType タグ,routeタグ,vehicleタグを使用
次のコマンドを実行.
sumo -c quickstart.sumocfg --netstate-dump quickstart.dump
※ SUMOに付属しているtraceExporter.py を用いて,ファイル変換できる
次の手順は ns-2/ns-3 形式に変換している例
sumo -c .\quickstart.sumocfg --fcd-output sumoTrace.xml python 'C:\Program Files (x86)\DLR\Sumo\tools\traceExporter.py' --fcd-input .\sumoTrace.xml --ns2mobility-output ns2mobility.tcl
<nodes> <node id="1" x="-250.0" y="0.0" /> <node id="2" x="+250.0" y="0.0" /> <node id="3" x="+251.0" y="0.0" /> </nodes> <edges> <edge from="1" id="1to2" to="2" /> <edge from="2" id="out" to="3" /> </edges> <routes> <vType accel="1.0" decel="5.0" id="Car" length="2.0" maxSpeed="100.0" sigma="0.0" /> <route id="route0" edges="1to2 out"/> <vehicle depart="1" id="veh0" route="route0" type="Car" /> </routes> <configuration> <input> <net-file value="hello.net.xml"/> <route-files value="hello.rou.xml"/> </input> <time> <begin value="0"/> <end value="10000"/> </time> </configuration>
sumo -c quickstart.sumocfg --netstate-dump quickstart.dump sumo-gui -c quickstart.sumocfg