blob: c93bcc3dca2e63e884b6a8356ca3c089b6168a63 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Simulation Scenarios | Eclipse MOSAIC – A Multi-Domain and Multi-Scale Simulation Framework for Connected and Automated Mobility</title>
<link>https://staging.eclipse.org/mosaic/docs/building_scenarios/</link>
<atom:link href="https://staging.eclipse.org/mosaic/docs/building_scenarios/index.xml" rel="self" type="application/rss+xml" />
<description>Simulation Scenarios</description>
<generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Sun, 05 May 2019 00:00:00 +0100</lastBuildDate>
<image>
<url>https://staging.eclipse.org/mosaic/images/logo.svg</url>
<title>Simulation Scenarios</title>
<link>https://staging.eclipse.org/mosaic/docs/building_scenarios/</link>
</image>
<item>
<title>Scenario Convert</title>
<link>https://staging.eclipse.org/mosaic/docs/building_scenarios/scenario_convert/</link>
<pubDate>Sun, 05 May 2019 00:00:00 +0100</pubDate>
<guid>https://staging.eclipse.org/mosaic/docs/building_scenarios/scenario_convert/</guid>
<description>&lt;div class=&#34;alert alert-extended&#34;&gt;
&lt;span class=&#34;extended-icon&#34; style=&#34;background-image: url(/mosaic/img/alert-extended.svg)&#34;&gt;&lt;/span&gt;
&lt;div&gt;
&lt;p&gt;The tool &lt;strong&gt;scenario-convert&lt;/strong&gt; is part of &lt;strong&gt;
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/download/#overview&#34;&gt;
MOSAIC Extended
&lt;/a&gt;
&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;However, you can use scenario-convert &lt;strong&gt;for free&lt;/strong&gt; to generate scenarios which are executable with Eclipse MOSAIC. &lt;strong&gt;
&lt;a href=&#34;https://www.dcaiti.tu-berlin.de/research/simulation/download/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
Get it here
&lt;/a&gt;
.&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&#34;text-align: center;&#34;&gt;
&lt;a class=&#34;mosaic-btn mosaic-btn-primary&#34; href=&#34;https://www.dcaiti.tu-berlin.de/research/simulation/download/&#34; title=&#34;Download scenario-convert from DCAITI mirror&#34;&gt;&lt;i class=&#34;fas fa-download&#34;&gt;&lt;/i&gt;Download scenario-convert from DCAITI mirror&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;scenario-convert&lt;/strong&gt; is a useful tool, which can be used to create new scenarios or import and export data from
external sources like OpenStreetMap, SUMO etc into your existing scenarios.&lt;br&gt;
It will create a database, which is the basis for all map-related tasks performed by Eclipse MOSAIC (e.g. navigation,
route calculation&amp;hellip;).&lt;br&gt;
Based on a MOSAIC database, scenario-convert can export the data to SUMO-conform formats.
Furthermore one can choose, whether to use routes generated by &lt;code&gt;scenario-convert&lt;/code&gt;, use existing
routes or build own routes via route generation tools (e.g. DUAROUTER by SUMO).&lt;/p&gt;
&lt;p&gt;This chapter intends to highlight the most common workflows for the work with &lt;code&gt;scenario-convert&lt;/code&gt;.
We will be using
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/steglitz.osm&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
steglitz.osm
&lt;/a&gt;
OSM-file for most of the
use cases So feel free to follow along with the steps to get a better understanding on how the &lt;code&gt;scenario-convert&lt;/code&gt;-script functions.&lt;/p&gt;
&lt;div class=&#34;alert alert-note&#34;&gt;
&lt;div&gt;
&lt;p&gt;
&lt;a href=&#34;#reference-documentation-for-scenario-convert&#34;&gt;
Here
&lt;/a&gt;
you can find a complete reference to all options scenario-convert offers.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;figure id=&#34;figure-osm-file-of-steglitz&#34;&gt;
&lt;a data-fancybox=&#34;&#34; href=&#34;../images/osm_uncleaned.png&#34; data-caption=&#34;OSM-File of Steglitz&#34;&gt;
&lt;img src=&#34;../images/osm_uncleaned.png&#34; alt=&#34;&#34; &gt;
&lt;/a&gt;
&lt;figcaption data-pre=&#34;Figure &#34; data-post=&#34;:&#34; class=&#34;numbered&#34;&gt;
OSM-File of Steglitz
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id=&#34;creating-a-complete-eclipse-mosaic-scenario-from-an-osm-file-with-one-command&#34;&gt;Creating a complete Eclipse MOSAIC-scenario from an OSM-file with one command&lt;/h2&gt;
&lt;p&gt;This is the most straight forward way to create a scenario from your OSM-file.
We will use the option &lt;code&gt;--osm2mosaic&lt;/code&gt;, which is a combination of the options &lt;code&gt;--osm2db&lt;/code&gt;
and &lt;code&gt;--db2mosaic&lt;/code&gt;.&lt;br&gt;
Let&amp;rsquo;s start off by showing you how a complete call could look like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;alert alert-note&#34;&gt;
&lt;div&gt;
&lt;p&gt;In this section we use the scenario name &lt;code&gt;steglitz.*&lt;/code&gt; as synonym for &lt;code&gt;path/to/steglitz.*&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This achieves a couple of things. First off the script is going to create a SQLite-database,
which is used by Eclipse MOSAIC. Furthermore, a directory will be created, which should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ &amp;lt;working-directory&amp;gt;
└─ steglitz
├─ steglitz.osm
├─ application
| └─ steglitz.db
├─ cell
| ├─ cell_config.json
| ├─ network.json
| └─ regions.json
├─ environment
| └─ environment_config.json
├─ mapping
| └─ mapping_config.json
├─ ns3
| ├─ ns3_config.json
| └─ ns3_federate_config.xml
├─ omnetpp
| ├─ omnetpp_config.json
| └─ omnetpp.ini
├─ output
| └─ output_config.xml
├─ sns
| └─ sns_config.json
├─ sumo
| ├─ steglitz.net.xml
| └─ steglitz.sumocfg
└─ scenario_config.json .................. Basic configuration of the simulation scenario
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Let&amp;rsquo;s walk through all these files:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First the &lt;code&gt;steglitz.db&lt;/code&gt; will be created using the &lt;code&gt;steglitz.osm&lt;/code&gt;-file.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;steglitz.db&lt;/code&gt; will be used to create &lt;code&gt;steglitz.con.xml&lt;/code&gt;, &lt;code&gt;steglitz.edg.xml&lt;/code&gt; and &lt;code&gt;steglitz.nod.xml&lt;/code&gt;, which are files used by SUMO.&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;https://sumo.dlr.de/wiki/NETCONVERT&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
SUMO Netconvert
&lt;/a&gt;
is used to create &lt;code&gt;steglitz.net.xml&lt;/code&gt;, which is a
&lt;a href=&#34;https://sumo.dlr.de/wiki/Networks/SUMO_Road_Networks&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
network representation
&lt;/a&gt;
in SUMO.&lt;/li&gt;
&lt;li&gt;Now the SUMO-configuration &lt;code&gt;steglitz.sumo.cfg&lt;/code&gt; is written.&lt;/li&gt;
&lt;li&gt;Afterwards the &lt;code&gt;mapping_config.json&lt;/code&gt; and &lt;code&gt;scenario_config.json&lt;/code&gt; are created and all files are moved to the right place.
In the &lt;code&gt;scenario_config.json&lt;/code&gt; values like the center coordinate will automatically be set using data from the SUMO related files.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;While this is technically sufficient to start working on your scenario there are a couple of other things
you can do to achieve better results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Clean the OSM-file using Osmosis&lt;/strong&gt;&lt;br&gt;
Osmosis will automatically be used to create a new OSM-file with the suffix &lt;code&gt;_cleaned&lt;/code&gt;. The created
file will contain much less clutter and usually is better suited for simulation purposes.
Check the images below to see the difference the clean-up process can make.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;row&#34;&gt;
&lt;div class=&#34;col-6&#34;&gt;
&lt;figure id=&#34;figure-uncleaned-osm-file&#34;&gt;
&lt;a data-fancybox=&#34;&#34; href=&#34;../images/osm_uncleaned.png&#34; data-caption=&#34;Uncleaned OSM-file&#34;&gt;
&lt;img src=&#34;../images/osm_uncleaned.png&#34; alt=&#34;&#34; &gt;
&lt;/a&gt;
&lt;figcaption data-pre=&#34;Figure &#34; data-post=&#34;:&#34; class=&#34;numbered&#34;&gt;
Uncleaned OSM-file
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;div class=&#34;col-6&#34;&gt;
&lt;figure id=&#34;figure-cleaned-osm-file&#34;&gt;
&lt;a data-fancybox=&#34;&#34; href=&#34;../images/osm_cleaned.png&#34; data-caption=&#34;Cleaned OSM-file&#34;&gt;
&lt;img src=&#34;../images/osm_cleaned.png&#34; alt=&#34;&#34; &gt;
&lt;/a&gt;
&lt;figcaption data-pre=&#34;Figure &#34; data-post=&#34;:&#34; class=&#34;numbered&#34;&gt;
Cleaned OSM-file
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;row&#34;&gt;
&lt;div class=&#34;col-6&#34;&gt;
&lt;figure id=&#34;figure-uncleaned-net-file&#34;&gt;
&lt;a data-fancybox=&#34;&#34; href=&#34;../images/netfile_uncleaned.png&#34; data-caption=&#34;Uncleaned Net-file&#34;&gt;
&lt;img src=&#34;../images/netfile_uncleaned.png&#34; alt=&#34;&#34; &gt;
&lt;/a&gt;
&lt;figcaption data-pre=&#34;Figure &#34; data-post=&#34;:&#34; class=&#34;numbered&#34;&gt;
Uncleaned Net-file
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;div class=&#34;col-6&#34;&gt;
&lt;figure id=&#34;figure-cleaned-net-file&#34;&gt;
&lt;a data-fancybox=&#34;&#34; href=&#34;../images/netfile_cleaned.png&#34; data-caption=&#34;Cleaned Net-file&#34;&gt;
&lt;img src=&#34;../images/netfile_cleaned.png&#34; alt=&#34;&#34; &gt;
&lt;/a&gt;
&lt;figcaption data-pre=&#34;Figure &#34; data-post=&#34;:&#34; class=&#34;numbered&#34;&gt;
Cleaned Net-file
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To avoid &amp;ldquo;cleaning&amp;rdquo; the OSM-file, please use the option &amp;ldquo;skip-osm-filter&amp;rdquo;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm --skip-osm-filter
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Generating Routes&lt;/strong&gt;&lt;br&gt;
The scenario-convert also offers the option &lt;code&gt;--generate-routes&lt;/code&gt;, which will generate
a route-file, given some additional information. For example purposes we will run the
following command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm --generate-routes
--route-begin-latlon 52.4551693,13.3193474 --route-end-latlon 52.4643101,13.3206834 --number-of-routes 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This will calculate three routes between the two given coordinates.&lt;/p&gt;
&lt;p&gt;Alternatively you can use the following command in order to generate routes with node-id&amp;rsquo;s as start and end point, which can be found in the &lt;code&gt;steglitz.nod.xml&lt;/code&gt; file.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm -o --generate-routes
--route-begin-node-id 267350668 --route-end-node-id 313139970 --number-of-routes 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;See
&lt;a href=&#34;#reference-documentation-for-scenario-convert&#34;&gt;
below
&lt;/a&gt;
for all command line options.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conlusion&lt;/strong&gt;&lt;br&gt;
This wraps up one of the main workflows with the scenario-convert-script.
A quick reminder on what we achieved:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cleaned up an OSM-file to only contain relevant data.&lt;/li&gt;
&lt;li&gt;Converted that OSM-file to formats that Eclipse MOSAIC/SUMO can handle.&lt;/li&gt;
&lt;li&gt;Created the project structure for a scenario.&lt;/li&gt;
&lt;li&gt;Calculated routes between two coordinates.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With all of this you can now start further developing your scenario. For a more detailed description on the next steps
please have a look
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/&#34;&gt;
here (Simulation Scenarios)
&lt;/a&gt;
and
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/develop_applications/&#34;&gt;
here (Application Development)
&lt;/a&gt;
.&lt;br&gt;
While this is the &amp;lsquo;happy world&amp;rsquo; workflow it is often necessary to manually adapt routes and
insert them into your scenario. The following workflow
will explain how that is done and you will also get a more detailed overview of the scenario-convert-functions.&lt;/p&gt;
&lt;h2 id=&#34;importing-routes-to-your-scenario&#34;&gt;Importing Routes to your scenario&lt;/h2&gt;
&lt;p&gt;As mentioned above your routes won&amp;rsquo;t always be created by the scenario-convert script. We generated some routes
for the steglitz-scenario using SUMO&amp;rsquo;s
&lt;a href=&#34;http://sumo.dlr.de/wiki/DUAROUTER&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
duarouter
&lt;/a&gt;
, which you can find
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/steglitz.rou.xml&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
here
&lt;/a&gt;
. We&amp;rsquo;ll start with only the &lt;code&gt;steglitz.osm&lt;/code&gt; and
&lt;code&gt;steglitz.rou.xml&lt;/code&gt; files:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ &amp;lt;working-directory&amp;gt;
├─ steglitz.osm
└─ steglitz.rou.xml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Creating the database&lt;/strong&gt;&lt;br&gt;
We&amp;rsquo;ll start off by solely creating the database and applying OSMOSIS with the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;java -jar scenario-convert.jar --osm2db -i steglitz.osm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The directory should look like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ &amp;lt;working-directory&amp;gt;
├─ steglitz.db
├─ steglitz.osm
├─ steglitz.rou.xml
└─ steglitz_cleaned.osm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Importing the route-file&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s import our routes into the database.&lt;br&gt;
We achieve this by calling:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;java -jar scenario-convert.jar --sumo2db -i steglitz.rou.xml -d .\steglitz.db
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now all new routes are imported into our database. The following image shows a visualization of one of
the created routes.&lt;/p&gt;
&lt;figure id=&#34;figure-visualization-of-one-of-the-routes&#34;&gt;
&lt;a data-fancybox=&#34;&#34; href=&#34;../images/steglitz_route.png&#34; data-caption=&#34;Visualization of one of the routes&#34;&gt;
&lt;img src=&#34;../images/steglitz_route.png&#34; alt=&#34;&#34; &gt;
&lt;/a&gt;
&lt;figcaption data-pre=&#34;Figure &#34; data-post=&#34;:&#34; class=&#34;numbered&#34;&gt;
Visualization of one of the routes
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Creating the scenario&lt;/strong&gt;&lt;br&gt;
The final step is to create the scenario from the files we created so far.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;java -jar scenario-convert.jar --db2mosaic -d .\steglitz.db
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Instead of copying our SUMO-files this will generate all necessary files and move them into a Eclipse MOSAIC-conform
folder structure:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ &amp;lt;working-directory&amp;gt;
├─ steglitz.osm
└─ steglitz
├─ application
| └─ steglitz.db
├─ mapping
| └─ mapping_config.json
├─ sumo
| ├─ steglitz.net.xml
| └─ steglitz.sumocfg
└─ scenario_config.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see the resulting folder structure looks just like the final output from the first workflow described.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
You should now know how you can manually add routes to your scenario and have a deeper understanding of the way that
some of the script parameters work.&lt;/p&gt;
&lt;h3 id=&#34;attached-files&#34;&gt;Attached Files&lt;/h3&gt;
&lt;p&gt;A list of all attached files in this chapter:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/steglitz.osm&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
Steglitz OSM-file
&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/steglitz.rou.xml&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
Steglitz Route-file
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;reference-documentation-for-scenario-convert&#34;&gt;Reference documentation for scenario-convert&lt;/h2&gt;
&lt;h3 id=&#34;usage-of-scenario-convert&#34;&gt;Usage of scenario-convert&lt;/h3&gt;
&lt;p&gt;The following listing shows an overview for the usage of scenario-convert:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;usage: scenario-convert [OPERATION] [OPTIONS]
Examples:
1. Import an osm file and write data into database
&amp;gt; scenario-convert --osm2db -i &amp;lt;OSMFILE&amp;gt; [-d &amp;lt;DATABASE&amp;gt;]
2. Export database content to SUMO-readable files
&amp;gt; scenario-convert --db2sumo -d &amp;lt;DATABASE&amp;gt; [-s &amp;lt;SUMOPREFIX&amp;gt;]
3. Import a SUMO routefile into a database
&amp;gt; scenario-convert --sumo2db -d &amp;lt;DATABASE&amp;gt; -i &amp;lt;ROUTEFILE&amp;gt;.rou.xml
4. Combine steps 1 and 2
&amp;gt; scenario-convert --osm2sumo -d &amp;lt;DATABASE&amp;gt; -i &amp;lt;OSMFILE&amp;gt; [-s &amp;lt;SUMOPREFIX&amp;gt;]
5. Export db content to Shapefile format
&amp;gt; scenario-convert --db2shp -d &amp;lt;DATABASE&amp;gt;
6. Import an srtm file and write elevation data to nodes of an existing database
&amp;gt; scenario-convert --srtm2db -i &amp;lt;SRTMFILE&amp;gt; -d &amp;lt;DATABASE&amp;gt;
7. Create a complete MOSAIC scenario from an osm file
&amp;gt; scenario-convert --osm2mosaic -i &amp;lt;OSMFILE&amp;gt;
8. Create a scenario database from an SUMO net file
&amp;gt; scenario-convert --sumo2db -i &amp;lt;NETFILE&amp;gt;.net.xml
9. Calculate a route from node 123 to node 456
&amp;gt; scenario-convert --generate-routes -d &amp;lt;DATABASE&amp;gt; --route-begin-node-id 123 --route-end-node-id 456
The following arguments are available:
-h,--help Prints this help screen.
-c,--config-file &amp;lt;PATH&amp;gt; Optional, refers to a configuration file which contains all parameters in
JSON format.
--osm2db Converts a OpenStreetMap file to a new scenario database.
--sumo2db Imports a SUMO Network/Routefile. Be aware that you may have to re-export an
imported network.
--srtm2db Imports an SRTM file and writes elevation data to nodes.
--db2sumo Exports the network to SUMO node and edge files.
--db2shp Exports the database into Shapefile format.
--db2mosaic Creates directory structure for a MOSAIC scenario based on the database
contents.
--osm2sumo Combination of osm2db and db2sumo.
--osm2mosaic Combination of osm2db and db2mosaic.
--update Updates the database to the current scheme.
-d,--database &amp;lt;PATH&amp;gt; The path to the database.
For import: File to import to. If not given, a new file is created.
For export: File to load from.
For update operations: file to update.
-i,--input &amp;lt;PATH&amp;gt; Defines an input file to use in an import. File type depends on the import
operation (OSM File/Database file/SUMO net file/SUMO rou file).
-s,--sumo-prefix &amp;lt;STRING&amp;gt; Prefix for the generated sumo files (uses database name when not defined).
-f,--force Force overwrite of existing files instead of incrementing file names.
-m,--mapping-file &amp;lt;PATH&amp;gt; Uses the given mapping configuration to export existing vehicleTypes and
vehicles data to *.rou.xml.
--import-lat &amp;lt;DOUBLE&amp;gt; Center latitude of imported region to project coordinates.
--import-lon &amp;lt;DOUBLE&amp;gt; Center longitude of imported region to project coordinates.
--import-zone &amp;lt;STRING&amp;gt; UTM zone of location for projecting coords in default format (e.g. 32n).
-g,--generate-routes Generates route(s) from one point to another. The begin and end for the route
must be known (see below options).
--route-begin-lat &amp;lt;DOUBLE&amp;gt; Latitude of the starting point, needs --route-begin-lon as well.
--route-begin-lon &amp;lt;DOUBLE&amp;gt; Longitude of the starting point, needs --route-begin-lat as well.
--route-begin-latlon &amp;lt;DOUBLE,DOUBLE&amp;gt; [latitude],[longitude] of the starting point.
--route-begin-node-id &amp;lt;STRING&amp;gt; OSM node id of the starting point (use instead of lat/lon).
--route-end-lat &amp;lt;DOUBLE&amp;gt; Latitude of the starting point, needs --route-end-lon as well.
--route-end-lon &amp;lt;DOUBLE&amp;gt; Longitude of the starting point, needs --route-end-lat as well.
--route-end-latlon &amp;lt;DOUBLE,DOUBLE&amp;gt; [latitude],[longitude] of the ending point.
--route-end-node-id &amp;lt;STRING&amp;gt; OSM node id of the ending point (use instead of lat/lon).
--route-matrix &amp;lt;STRING,STRING,...&amp;gt; Calculates all possible routes starting and ending at the given nodes, given
as comma-separated list (e.g. 12345,87123,89123)
--number-of-routes &amp;lt;INTEGER&amp;gt; Defines the number of alternative routes to be calculated (default=1).
--skip-osm-filter Skips automatic filtering of the OSM file (only with osm2xxx).
--skip-turn-restrictions Ignore all defined turn restrictions on OSM import.
--skip-graph-cleanup Turns off the removal of unconnected parts from the main traffic network
graph . Since several components of MOSAIC require one main graph without
disconnected ways and nodes, this option should be used only if the cleanup
procedure is faulty.
--skip-netconvert Skips starting sumo netconvert for creating netfile (only with xxx2sumo).
--skip-traffic-lights-export Skips exporting traffic light information for nodes (only with xxx2sumo).
--osm-speeds-file &amp;lt;PATH&amp;gt; Define a property file which contains speed information which are used to set
the speed for OSM ways without a max speed tag (only with osm2xxx).
--osm-speeds-overwrite If set to true , the maxspeed tags of ways are ignored and replaced by either
default values , or by speed information defined via the --osm-speeds-file
option (only with osm2xxx).
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;configuration-files-for-scenario-convert&#34;&gt;Configuration-files for scenario-convert&lt;/h3&gt;
&lt;p&gt;Scenario-convert offers a way to safe your conversion-parameters in a &lt;code&gt;JSON&lt;/code&gt; configuration file using
the option &lt;code&gt;-c&lt;/code&gt; or &lt;code&gt;--config-file&lt;/code&gt;.&lt;br&gt;
The following listing shows how to save the options used in the example above:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
&amp;#34;operatingMode&amp;#34;: &amp;#34;osm2mosaic&amp;#34;,
&amp;#34;inputFile&amp;#34;: &amp;#34;steglitz.osm&amp;#34;,
&amp;#34;executeOsmosis&amp;#34;: true,
&amp;#34;generateRoutes&amp;#34;: true,
&amp;#34;routeBeginLatLon&amp;#34;: &amp;#34;52.457616,13.318392&amp;#34;,
&amp;#34;routeEndLatLon&amp;#34;: &amp;#34;52.454774,13.333554&amp;#34;,
&amp;#34;numberOfRoutes&amp;#34;: 3
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&#34;speed-files&#34;&gt;Speed-files&lt;/h3&gt;
&lt;p&gt;Below you can find a properties file which can be used during the import of OSM data
in order to define speeds for ways, which do not have a maxspeeds-tag defined. For this purpose use the
option &lt;code&gt;--osm-speeds-file &amp;lt;FILE&amp;gt;&lt;/code&gt;. In the speed properties file, for each way type a speed value can
be defined, according to the OSM
&lt;a href=&#34;http://wiki.openstreetmap.org/wiki/Key:highway&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
&lt;code&gt;highway&lt;/code&gt;
&lt;/a&gt;
key.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# the unit the speed values are defined in [kmh, ms]
speed.unit = kmh
# the default speed for all way types which are not defined here
speed.default = 30
# autobahn
highway.motorway = 130
highway.motorway_link = 70
# bundesstrasse (germany)
highway.trunk = 70
highway.trunk_link = 65
# linking bigger town
highway.primary = 65
highway.primary_link = 60
# linking towns &amp;#43; villages
highway.secondary = 60
highway.secondary_link = 50
#streets without middle line separation
highway.tertiary = 50
highway.tertiary_link = 40
highway.residential = 30
#special roads
highway.living_street = 5
highway.service = 20
# unclassified roads
highway.unclassified = 30
highway.road = 20
# forest tracks
highway.track 15
&lt;/code&gt;&lt;/pre&gt;
</description>
</item>
<item>
<title>Additional Scenario Configuration</title>
<link>https://staging.eclipse.org/mosaic/docs/building_scenarios/scenario_configuration/</link>
<pubDate>Sun, 05 May 2019 00:00:00 +0100</pubDate>
<guid>https://staging.eclipse.org/mosaic/docs/building_scenarios/scenario_configuration/</guid>
<description>&lt;p&gt;This chapter aims to give you a brief overview of additional simulators and visualizers that can be used with Eclipse MOSAIC.
We will continue with the tutorial-style explanations following up on the Steglitz-example from the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/scenario_convert/&#34;&gt;
previous chapter
&lt;/a&gt;
. For more detailed explanations of the configurations have a
look at
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/&#34;&gt;
this chapter
&lt;/a&gt;
.&lt;br&gt;
If you already played with the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/tutorials/barnim_basic/&#34;&gt;
Barnim
&lt;/a&gt;
-tutorial you probably noticed, that it contains far
more folders in the scenario structure compared to the Steglitz example. Those additional directories contain
configurations for various simulators.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ Barnim
├─ application
├─ cell
├─ environment
├─ mapping
├─ ns3
├─ output
├─ sns
├─ sumo
└─ scenario_config.json .................. Basic configuration of the simulation scenario
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;let-the-cars-loose&#34;&gt;Let the cars loose&lt;/h2&gt;
&lt;p&gt;As a starting point we&amp;rsquo;ll look at the scenario that we created using this command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm -o --generate-routes
--route-begin-latlon 52.4551693,13.3193474 --route-end-latlon 52.4643101,13.3206834 --number-of-routes 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We&amp;rsquo;ll end up with a folder looking like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ steglitz
├─ application
| └─ steglitz.db
├─ mapping
| └─ mapping_config.json
├─ sumo
| ├─ steglitz.net.xml
| └─ steglitz.sumocfg
└─ scenario_config.json .................. Basic configuration of the simulation scenario
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you have a look in the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/steglitz_mapping_config.json&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
mapping_config.json
&lt;/a&gt;
,
you can see that the scenario-convert script automatically assigns cars to the three routes created. You can use this
file as a blueprint for your own scenario, have a look
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/#applications-and-mapping&#34;&gt;
here
&lt;/a&gt;
to get more details on possible adaptions.&lt;br&gt;
Below is a short video of the scenario displayed in the SUMO-GUI. We marked the three different routes the cars
follow.&lt;/p&gt;
&lt;video controls &gt;
&lt;source src=&#34;../images/steglitz_routes.mp4&#34; type=&#34;video/mp4&#34;&gt;
&lt;/video&gt;
&lt;h2 id=&#34;communication-simulators-cell-ns3-omnetpp-sns&#34;&gt;Communication Simulators (cell, ns3, omnetpp, sns)&lt;/h2&gt;
&lt;p&gt;We won&amp;rsquo;t implement any functionality for the steglitz example here but rather have a look at the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/tutorials/barnim_basic/&#34;&gt;
Barnim
&lt;/a&gt;
-tutorial. In the &lt;code&gt;scenario_config.json&lt;/code&gt; of the Barnim scenario you can see where the
communication simulators are activated:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;&amp;quot;federates&amp;quot;: {
&amp;quot;cell&amp;quot;: false,
&amp;quot;omnetpp&amp;quot;: false,
&amp;quot;ns3&amp;quot;: false,
&amp;quot;sns&amp;quot;: true
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Our
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/tutorials/&#34;&gt;
tutorials
&lt;/a&gt;
and
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/tutorials/additional_examples/&#34;&gt;
additional examples
&lt;/a&gt;
demonstrate use cases for
communication usages and you should have a look at them if you are uncertain where to start. Furthermore we
recommend copying the configuration-files for the simulator you are going to use from the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/tutorials/barnim_basic/&#34;&gt;
Barnim scenario
&lt;/a&gt;
. It
contains the most complete configurations and is well maintained.&lt;br&gt;
If you are an expert with one of the external network simulators (
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/simulators/network_simulator_ns3/&#34;&gt;
ns3
&lt;/a&gt;
,
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/simulators/network_simulator_omnetpp/&#34;&gt;
OMNeT++
&lt;/a&gt;
) the Barnim scenario will also give
you an overview on how to configure those.&lt;/p&gt;
&lt;h2 id=&#34;other-simulators&#34;&gt;Other Simulators&lt;/h2&gt;
&lt;p&gt;Here we&amp;rsquo;ll discuss two simulators integrated with Eclipse MOSAIC and their use-cases, namely the &lt;code&gt;Event Server&lt;/code&gt; and the
&lt;code&gt;Battery Simulator&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;event-server&#34;&gt;Event server&lt;/h3&gt;
&lt;p&gt;The event server can be used to emit events to vehicles inside it&amp;rsquo;s predefined borders. In the Barnim scenario
an event server is used to simulate an icy area, which is then noticed by the sensor of a weather server RSU.&lt;br&gt;
Every defined event requires a type, a defined geographical area (e.g. circular, rectangular), the strength and a time frame. Have a look
at the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/eventserver_config.json&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
eventserver_config.json
&lt;/a&gt;
to see how this can be
configured. If you want to use the event server make sure to have it enabled in the &lt;code&gt;scenario_config.json&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;battery&#34;&gt;Battery&lt;/h3&gt;
&lt;p&gt;The battery simulator is used to simulate electric vehicles. It offers a lot of customization, because you can
dynamically load your own battery, vehicle and environment models. Have a look a the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/building_scenarios/files/battery_config.json&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;
battery_config.json
&lt;/a&gt;
, taken from the Barnim scenario.
The three models used are included with Eclipse MOSAIC and you can freely use them.&lt;/p&gt;
&lt;h2 id=&#34;output&#34;&gt;Output&lt;/h2&gt;
&lt;p&gt;There are various options to generate output results of your simulations (see the
&lt;a href=&#34;https://staging.eclipse.org/mosaic/mosaic/docs/visualization/filevis/&#34;&gt;
visualization chapter
&lt;/a&gt;
).&lt;/p&gt;
&lt;p&gt;The first step is to create a file called &lt;code&gt;output_config.xml&lt;/code&gt; in a new directory called &lt;code&gt;output&lt;/code&gt;.
If you used the scenario-convert tool the file should be generated automatically.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-plaintext&#34;&gt;└─ steglitz
├─ application
| └─ steglitz.db
├─ mapping
| └─ mapping_config.json
├─ output
| └─ output_config.xml
├─ sumo
| ├─ steglitz.net.xml
| └─ steglitz.sumocfg
└─ scenario_config.json .................. Basic configuration of the simulation scenario
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example configuration for output generation can be taken from the example scenarios from the tutorials section.&lt;/p&gt;
&lt;p&gt;Next make sure the visualization federate is activated in the &lt;code&gt;scenario_config.json&lt;/code&gt;.&lt;/p&gt;
&lt;!--
```xml
&lt;!-- Visualization -- &gt;
&lt;federate id=&#34;output&#34; active=&#34;true&#34;/&gt;
```
Now we have to configure the statistics visualizer itself. This [visualizer_config.xml](/docs/building_scenarios/files/steglitz_visualizer_config.xml) contains the basic
configuration in order to calculate the average travel times for the vehicles. If you want to make adaptions, please
refer to [statistics visualizer](/docs/visualization/statistics).
Go ahead and run the simulation one more time. Afterwards the log-directory should contain a file called
`AverageVehicleTravelTime.csv` in a directory called `StatisticsVisualizer`:
```csv
group;group-value;total;
Car;186.369;336;
```
This tells us that there was a total amount of 336 vehicles of the type `Car` in the simulation, which traveled
for 186.369 seconds on average.
--&gt;
&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
After this small, hands-on introduction to visualizers you should know where to configure them and after some additional
reading, you should be able to configure different types of visualizers for your use-cases.&lt;/p&gt;
</description>
</item>
</channel>
</rss>