| <?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</title> |
| <link>https://www.eclipse.org/mosaic/docs/building_scenarios/</link> |
| <atom:link href="https://www.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://www.eclipse.org/mosaic/images/logo.svg</url> |
| <title>Simulation Scenarios</title> |
| <link>https://www.eclipse.org/mosaic/docs/building_scenarios/</link> |
| </image> |
| |
| <item> |
| <title>Additional Scenario Configuration</title> |
| <link>https://www.eclipse.org/mosaic/docs/building_scenarios/scenario_configuration/</link> |
| <pubDate>Sun, 05 May 2019 00:00:00 +0100</pubDate> |
| <guid>https://www.eclipse.org/mosaic/docs/building_scenarios/scenario_configuration/</guid> |
| <description><p>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 |
| |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/scenario_convert">previous chapter</a>. For more detailed explanations of the configurations have a |
| look at |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/scenarios">this chapter</a>.<br> |
| If you already played with the |
| <a href="https://www.eclipse.org/mosaic/tutorials/barnim_basic">Barnim</a>-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.</p> |
| <pre><code class="language-FOLDER">└─ Barnim |
| ├─ application |
| ├─ cell |
| ├─ environment |
| ├─ mapping |
| ├─ ns3 |
| ├─ output |
| ├─ sns |
| ├─ sumo |
| └─ scenario_config.json .................. Basic configuration of the simulation scenario |
| </code></pre> |
| <h2 id="let-the-cars-loose">Let the cars loose</h2> |
| <p>As a starting point we&rsquo;ll look at the scenario that we created using this command:</p> |
| <pre><code>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 |
| </code></pre> |
| <p>We&rsquo;ll end up with a folder looking like this:</p> |
| <pre><code class="language-FOLDER">└─ steglitz |
| ├─ application |
| | └─ steglitz.db |
| ├─ mapping |
| | └─ mapping_config.json |
| ├─ sumo |
| | ├─ steglitz.net.xml |
| | └─ steglitz.sumocfg |
| └─ scenario_config.json .................. Basic configuration of the simulation scenario |
| </code></pre> |
| <p>If you have a look in the <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz_mapping_config.json" download><code>mapping_config.json</code></a>, |
| 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 |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/scenarios/#applications-and-mapping">here</a> |
| to get more details on possible adaptions.<br> |
| Below is a short video of the scenario displayed in the SUMO-GUI. We marked the three different routes the cars |
| follow.</p> |
| <p> |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/images/steglitz_routes.mp4">Watch scenario</a></p> |
| <h2 id="communication-simulators-cell-ns3-omnetpp-sns">Communication Simulators (cell, ns3, omnetpp, sns)</h2> |
| <p>We won&rsquo;t implement any functionality for the steglitz example here but rather have a look at the |
| |
| <a href="https://www.eclipse.org/mosaic/tutorials/barnim_basic">Barnim</a>-tutorial. In the &lt;a href=&quot;/docs/building_scenarios/files/barnim_mosaic_config.xml&quot; download</p> |
| <blockquote> |
| <p><code>scenario_config.json</code> |
| .xml`</a> of the Barnim scenario you can |
| see where the communication simulators are activated.</p> |
| </blockquote> |
| <pre><code class="language-json">&quot;federates&quot;: { |
| &quot;cell&quot;: false, |
| &quot;omnetpp&quot;: false, |
| &quot;ns3&quot;: false, |
| &quot;sns&quot;: true |
| } |
| </code></pre> |
| <p>Our |
| <a href="https://www.eclipse.org/mosaic/tutorials">tutorials</a> and |
| <a href="https://www.eclipse.org/mosaic/docs/simulators/application_simulator/#additional-examples">additional examples</a> |
| 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 |
| <a href="https://www.eclipse.org/mosaic/tutorials/barnim_basic/">Barnim scenario</a>. It |
| contains the most complete configurations and is well maintained.<br> |
| If you are an expert with one of the external network simulators ( |
| <a href="https://www.eclipse.org/mosaic/docs/simulators/network_simulator_ns3">ns3</a>, |
| <a href="https://www.eclipse.org/mosaic/docs/simulators/network_simulator_omnetpp">OMNeT++</a>) the Barnim scenario will also give |
| you an overview on how to configure those.</p> |
| <h2 id="other-simulators">Other Simulators</h2> |
| <p>Here we&rsquo;ll discuss two simulators integrated with Eclipse MOSAIC and their use-cases, namely the <code>Event Server</code> and the |
| <code>Battery Simulator</code>.</p> |
| <h3 id="event-server">Event server</h3> |
| <p>The event server can be used to emit events to vehicles inside it&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.<br> |
| 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 <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/eventserver_config.json" download><code>eventserver_config.json</code></a> to see how this can be |
| configured. If you want to use the event server make sure to have it enabled in the <code>scenario_config.json</code>.</p> |
| <h3 id="battery">Battery</h3> |
| <p>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 <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/battery_config.json" download><code>battery_config.json</code></a>, taken from the Barnim scenario. |
| The three models used are included with Eclipse MOSAIC and you can freely use them.</p> |
| <h2 id="output">Output</h2> |
| <p>There are various options to generate output results of your simulations (see the |
| |
| <a href="https://www.eclipse.org/mosaic/docs/visualization/filevis">visualization chapter</a>). Visualizing doesn&rsquo;t necessarily mean you |
| will end up with moving pictures of cars driving along your predefined routes.<br> |
| Let&rsquo;s get back to the steglitz-scenario and try to calculate the average travel time of our vehicles. |
| The first step is to create a file called <code>visualizer_config.xml</code> in a new directory called <code>visualizer</code>. |
| If you used the scenario-convert tool the file should be generated automatically.</p> |
| <pre><code class="language-FOLDER">└─ 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 |
| </code></pre> |
| <p>Next make sure the visualization federate is activated in the <code>scenario_config.json</code>.</p> |
| <pre><code>&lt;!-- Visualization --&gt; |
| &lt;federate id=&quot;visualizer&quot; active=&quot;true&quot;/&gt; |
| </code></pre> |
| <p>Now we have to configure the statistics visualizer itself. This <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz_visualizer_config.xml" download><code>visualizer_config.xml</code></a> contains the basic |
| configuration in order to calculate the average travel times for the vehicles. If you want to make adaptions, please |
| refer to |
| <a href="https://www.eclipse.org/mosaic/docs/visualization/statistics">statistics visualizer</a>.<br> |
| Go ahead and run the simulation one more time. Afterwards the log-directory should contain a file called |
| <code>AverageVehicleTravelTime.csv</code> in a directory called <code>StatisticsVisualizer</code>:</p> |
| <pre><code>group;group-value;total; |
| Car;186.369;336; |
| </code></pre> |
| <p>This tells us that there was a total amount of 336 vehicles of the type <code>car</code> in the simulation, which traveled |
| for 186.369 seconds on average.</p> |
| <p><strong>Conclusion</strong><br> |
| 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.</p> |
| </description> |
| </item> |
| |
| <item> |
| <title>Scenario Convert</title> |
| <link>https://www.eclipse.org/mosaic/docs/building_scenarios/scenario_convert/</link> |
| <pubDate>Sun, 05 May 2019 00:00:00 +0100</pubDate> |
| <guid>https://www.eclipse.org/mosaic/docs/building_scenarios/scenario_convert/</guid> |
| <description><div class="alert alert-note"> |
| <div> |
| The tool <strong>scenario-convert</strong> is available in MOSAIC Extended and can be used for free for research and academical purposes. |
| </div> |
| </div> |
| <p>Scenario-convert 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.<br> |
| It will create a database, which is the basis for all map-related tasks performed by Eclipse MOSAIC (e.g. navigation, |
| route calculation&hellip;).<br> |
| 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 <code>scenario-convert</code>, use existing |
| routes or build own routes via route generation tools (e.g. DUAROUTER by SUMO).</p> |
| <p>This chapter intends to highlight the most common workflows for the work with <code>scenario-convert</code>. |
| We will be using <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz.osm" download><code>this</code></a> 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 <code>scenario-convert</code>-script functions. |
| For a complete reference of the script please check |
| <a href="#reference-documentation-for-scenario-convert">here</a>.</p> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <figure id="figure-osm-file-of-steglitz"> |
| |
| |
| <a data-fancybox="" href="../images/osm_uncleaned.png" data-caption="OSM-File of Steglitz"> |
| |
| |
| <img src="../images/osm_uncleaned.png" alt="" > |
| </a> |
| |
| |
| |
| |
| <figcaption data-pre="Figure " data-post=":" class="numbered"> |
| OSM-File of Steglitz |
| </figcaption> |
| |
| |
| </figure> |
| |
| <h2 id="creating-a-complete-eclipse-mosaic-scenario-from-an-osm-file-with-one-command">Creating a complete Eclipse MOSAIC-scenario from an OSM-file with one command</h2> |
| <p>This is the most straight forward way to create a scenario from your OSM-file. |
| We will use the option <code>--osm2mosaic</code>, which is a combination of the options <code>--osm2db</code> |
| and <code>--db2mosaic</code>.<br> |
| Let&rsquo;s start off by showing you how a complete call could look like:</p> |
| <pre><code class="language-bash">java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm |
| </code></pre> |
| <div class="alert alert-note"> |
| <div> |
| Change <code>mosaic.version</code> to the current version you are using.<br> |
| In this section we use the scenario name <code>steglitz.*</code> as synonym for <code>path/to/steglitz.*</code>. |
| </div> |
| </div> |
| <p>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:</p> |
| <pre><code class="language-FOLDER">└─ &lt;working-directory&gt; |
| ├─ steglitz.osm |
| ├─ application |
| | └─ steglitz.db |
| ├─ cell2 |
| | ├─ cell2_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 |
| </code></pre> |
| <p>Let&rsquo;s walk through all these files:</p> |
| <ol> |
| <li>First the <code>steglitz.db</code> will be created using the <code>steglitz.osm</code>-file.</li> |
| <li>The <code>steglitz.db</code> will be used to create <code>steglitz.con.xml</code>, <code>steglitz.edg.xml</code> and <code>steglitz.nod.xml</code>, which are files used by SUMO.</li> |
| <li> |
| <a href="https://sumo.dlr.de/wiki/NETCONVERT" target="_blank" rel="noopener">SUMO Netconvert</a> is used to create <code>steglitz.net.xml</code>, which is a |
| <a href="https://sumo.dlr.de/wiki/Networks/SUMO_Road_Networks" target="_blank" rel="noopener">network representation</a> in SUMO.</li> |
| <li>Now the SUMO-configuration <code>steglitz.sumo.cfg</code> is written.</li> |
| <li>Afterwards the <code>mapping_config.json</code> and <code>scenario_config.json</code> are created and all files are moved to the right place. |
| In the <code>scenario_config.json</code> values like the center coordinate will automatically be set using data from the SUMO related files.</li> |
| </ol> |
| <p>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.</p> |
| <p><strong>Clean the OSM-file using Osmosis</strong><br> |
| Osmosis will automatically be used to create a new OSM-file with the suffix <code>_cleaned</code>. 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.</p> |
| <pre><code class="language-bash">java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm |
| </code></pre> |
| <div class="row"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <figure id="figure-uncleaned-osm-file"> |
| |
| |
| <a data-fancybox="" href="../images/osm_uncleaned.png" data-caption="Uncleaned OSM-file"> |
| |
| |
| <img src="../images/osm_uncleaned.png" alt="" > |
| </a> |
| |
| |
| |
| |
| <figcaption data-pre="Figure " data-post=":" class="numbered"> |
| Uncleaned OSM-file |
| </figcaption> |
| |
| |
| </figure> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <figure id="figure-cleaned-osm-file"> |
| |
| |
| <a data-fancybox="" href="../images/osm_cleaned.png" data-caption="Cleaned OSM-file"> |
| |
| |
| <img src="../images/osm_cleaned.png" alt="" > |
| </a> |
| |
| |
| |
| |
| <figcaption data-pre="Figure " data-post=":" class="numbered"> |
| Cleaned OSM-file |
| </figcaption> |
| |
| |
| </figure> |
| |
| </div> |
| <div class="row"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <figure id="figure-uncleaned-net-file"> |
| |
| |
| <a data-fancybox="" href="../images/netfile_uncleaned.png" data-caption="Uncleaned Net-file"> |
| |
| |
| <img src="../images/netfile_uncleaned.png" alt="" > |
| </a> |
| |
| |
| |
| |
| <figcaption data-pre="Figure " data-post=":" class="numbered"> |
| Uncleaned Net-file |
| </figcaption> |
| |
| |
| </figure> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <figure id="figure-cleaned-net-file"> |
| |
| |
| <a data-fancybox="" href="../images/netfile_cleaned.png" data-caption="Cleaned Net-file"> |
| |
| |
| <img src="../images/netfile_cleaned.png" alt="" > |
| </a> |
| |
| |
| |
| |
| <figcaption data-pre="Figure " data-post=":" class="numbered"> |
| Cleaned Net-file |
| </figcaption> |
| |
| |
| </figure> |
| |
| </div> |
| <p> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="gallery"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a data-fancybox="gallery-gallery" data-caption="Uncleaned OSM-file" href="https://www.eclipse.org/mosaic/mosaic/img/osm_uncleaned.png"> |
| <img data-src="https://www.eclipse.org/mosaic/mosaic/img/osm_uncleaned.png" alt=""> |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <a data-fancybox="gallery-gallery" data-caption="Cleaned OSM-File" href="https://www.eclipse.org/mosaic/mosaic/img/osm_cleaned.png"> |
| <img data-src="https://www.eclipse.org/mosaic/mosaic/img/osm_cleaned.png" alt=""> |
| </a> |
| |
| |
| |
| </div> |
| To avoid &ldquo;cleaning&rdquo; the OSM-file, please use the option &ldquo;skip-osm-filter&rdquo;.</p> |
| <pre><code class="language-bash">java -jar scenario-convert.jar --osm2mosaic -i steglitz.osm --skip-osm-filter |
| </code></pre> |
| <span class="todo"> |
| Modify &lsquo;gallery&rsquo; shortcode to display images correctly |
| </span> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div class="gallery"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| </div> |
| <p><strong>Generating Routes</strong><br> |
| The scenario-convert also offers the option <code>--generate-routes</code>, which will generate |
| a route-file, given some additional information. For example purposes we will run the |
| following command:</p> |
| <pre><code class="language-bash">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 |
| </code></pre> |
| <p>This will calculate three routes between the two given coordinates.</p> |
| <p>Alternatively you can use the following command in order to generate routes with node-id&rsquo;s as start and end point, which can be found in the <code>steglitz.nod.xml</code> file.</p> |
| <pre><code class="language-bash">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 |
| </code></pre> |
| <p>see |
| <a href="#reference-documentation-for-scenario-convert">below</a> for all command |
| line options.</p> |
| <p><strong>Exporting Traffic Lights</strong><br> |
| Another feature of the scenario-convert script is the ability to export traffic lights from the osm-file to |
| be used by SUMOs netconvert. The extended call would look like this:</p> |
| <pre><code class="language-bash">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 |
| --export-traffic-lights |
| </code></pre> |
| <p><strong>Conlusion</strong><br> |
| This wraps up one of the main workflows with the scenario-convert-script. |
| A quick reminder on what we achieved:</p> |
| <ul> |
| <li>Cleaned up an OSM-file to only contain relevant data.</li> |
| <li>Converted that OSM-file to formats that Eclipse MOSAIC/SUMO can handle.</li> |
| <li>Created the project structure for a scenario.</li> |
| <li>Calculated routes between two coordinates.</li> |
| </ul> |
| <p>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 |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/scenarios/">here (Simulation Scenarios)</a> and |
| |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/application_development/">here (Application Development)</a>.<br> |
| While this is the &lsquo;happy world&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.</p> |
| <h2 id="importing-routes-to-your-scenario">Importing Routes to your scenario</h2> |
| <p>As mentioned above your routes won&rsquo;t always be created by the scenario-convert script. We generated some routes |
| for the steglitz-scenario using SUMO&rsquo;s |
| <a href="http://sumo.dlr.de/wiki/DUAROUTER" target="_blank" rel="noopener">duarouter</a>, which you can find |
| |
| <a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz.rou.xml">here</a>. We&rsquo;ll start with only the <code>steglitz.osm</code> and |
| <code>steglitz.rou.xml</code> files:</p> |
| <pre><code class="language-FOLDER">└─ &lt;working-directory&gt; |
| ├─ steglitz.osm |
| └─ steglitz.rou.xml |
| </code></pre> |
| <p><strong>Creating the database</strong><br> |
| We&rsquo;ll start off by solely creating the database and applying OSMOSIS with the following command:</p> |
| <pre><code class="language-bash">java -jar scenario-convert.jar --osm2db -i steglitz.osm |
| </code></pre> |
| <p>The directory should look like this:</p> |
| <pre><code class="language-FOLDER">└─ &lt;working-directory&gt; |
| ├─ steglitz.db |
| ├─ steglitz.osm |
| ├─ steglitz.rou.xml |
| └─ steglitz_cleaned.osm |
| </code></pre> |
| <p><strong>Importing the route-file</strong></p> |
| <blockquote> |
| <p>This is the interesting part of this workflow. 👍</p> |
| </blockquote> |
| <p>Let&rsquo;s import our routes into the database.<br> |
| We achieve this by calling:</p> |
| <pre><code>java -jar scenario-convert.jar --sumo2db -i steglitz.rou.xml -d .\steglitz.db |
| </code></pre> |
| <p>Now all new routes are imported into our database. The following image shows a visualization of one of |
| the created routes.</p> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <figure id="figure-visualization-of-one-of-the-routes"> |
| |
| |
| <a data-fancybox="" href="../images/steglitz_route.png" data-caption="Visualization of one of the routes"> |
| |
| |
| <img src="../images/steglitz_route.png" alt="" > |
| </a> |
| |
| |
| |
| |
| <figcaption data-pre="Figure " data-post=":" class="numbered"> |
| Visualization of one of the routes |
| </figcaption> |
| |
| |
| </figure> |
| |
| <p><strong>Creating the scenario</strong><br> |
| The final step is to create the scenario from the files we created so far.</p> |
| <pre><code>java -jar scenario-convert.jar --db2mosaic -d .\steglitz.db |
| </code></pre> |
| <p>Instead of copying our SUMO-files this will generate all necessary files and move them into a Eclipse MOSAIC-conform |
| folder structure:</p> |
| <pre><code class="language-FOLDER">└─ &lt;working-directory&gt; |
| ├─ steglitz.osm |
| └─ steglitz |
| ├─ application |
| | └─ steglitz.db |
| ├─ mapping |
| | └─ mapping_config.json |
| ├─ sumo |
| | ├─ steglitz.net.xml |
| | └─ steglitz.sumocfg |
| └─ scenario_config.json |
| </code></pre> |
| <p>As you can see the resulting folder structure looks just like the final output from the first workflow described.</p> |
| <p><strong>Conclusion</strong><br> |
| 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.</p> |
| <h3 id="attached-files">Attached Files</h3> |
| <p>A list of all attached files in this chapter:</p> |
| <ul> |
| <li><a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz.osm" download>Steglitz OSM-file</a></li> |
| <li><a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz.rou.xml" download>Steglitz Route-file</a></li> |
| </ul> |
| <h2 id="reference-documentation-for-scenario-convert">Reference documentation for scenario-convert</h2> |
| <h3 id="usage-of-scenario-convert">Usage of scenario-convert</h3> |
| <p>The following listing shows an overview for the usage of scenario-convert:</p> |
| <span class="todo"> |
| New shortcode for embedding documents |
| </span> |
| <p><a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/ScenarioConvertFunctions.txt" download>scenarioConvertFunctions</a></p> |
| <h3 id="configuration-files-for-scenario-convert">Configuration-files for scenario-convert</h3> |
| <p>Scenario-convert offers a way to safe your conversion-parameters in a <code>JSON</code> configuration file using |
| the option <code>-c</code> or <code>--config-file</code>.<br> |
| The following listing shows how to save the options used in the example above:</p> |
| <p><a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/steglitz_config.json" download>steglitzConfigFile</a></p> |
| <h3 id="speed-files">Speed-files</h3> |
| <p>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 <code>--osm-speeds-file &lt;FILE&gt;</code>. In the speed properties file, for each way type a speed value can |
| be defined, according to the OSM |
| <a href="http://wiki.openstreetmap.org/wiki/Key:highway" target="_blank" rel="noopener"><code>highway</code></a> key.</p> |
| <p><a href="https://www.eclipse.org/mosaic/docs/building_scenarios/files/car-speeds.properties" download>speed-properties</a></p> |
| </description> |
| </item> |
| |
| </channel> |
| </rss> |