blob: ea9de031035235cc509d7f0c20eb14412ce5ed1f [file] [log] [blame]
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PCM Simulation &mdash; OpenPASS Documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />
<link rel="stylesheet" href="../../_static/tabs.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/openPASS.ico"/>
<!--[if lt IE 9]>
<script src="../../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="PCM Evaluation" href="40_pcm_eval.html" />
<link rel="prev" title="System Editor" href="20_system_editor.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../../index.html" class="icon icon-home"> openPASS
<img src="../../_static/openPASS.png" class="logo" alt="Logo"/>
</a>
<div class="version">
9999.9999.9999
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Installation Guide</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/10_getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/20_install_prerequisites.html">Installing Prerequisites</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/30_install_openpass.html">Installing OpenPASS</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/50_further_guidance.html">Further Guidance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/60_conan.html">Building with Conan</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">User Guides</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../10_overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../20_tutorials.html">Tutorials</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../30_gui_plugins.html">GUI Plugins</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="10_projects.html">Project</a></li>
<li class="toctree-l2"><a class="reference internal" href="20_system_editor.html">System Editor</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">PCM Simulation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#simulation-input">Simulation Input</a></li>
<li class="toctree-l3"><a class="reference internal" href="#simulation-output">Simulation Output</a></li>
<li class="toctree-l3"><a class="reference internal" href="#simulation-configuration">Simulation Configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#variation">Variation</a></li>
<li class="toctree-l3"><a class="reference internal" href="#simulation-start">Simulation Start</a></li>
<li class="toctree-l3"><a class="reference internal" href="#save-load-experiment">Save / Load Experiment</a></li>
<li class="toctree-l3"><a class="reference internal" href="#result-folder-structure">Result Folder Structure</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="40_pcm_eval.html">PCM Evaluation</a></li>
<li class="toctree-l2"><a class="reference internal" href="50_result_visualization.html">Result Visualization</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../40_configs_in_depth.html">Configs in Depth</a></li>
<li class="toctree-l1"><a class="reference internal" href="../50_outputs_in_depth.html">Outputs in Depth</a></li>
<li class="toctree-l1"><a class="reference internal" href="../60_scenario_simulation.html">Simulator</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced topics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../advanced_topics/20_simulator_advanced.html">Simulator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../advanced_topics/30_testing.html">EndToEnd Test Framework</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Developer Information</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../developer_information/10_ide_support.html">IDE Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../developer_information/20_documentation.html">Documentation Concept</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Other Information</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../other_information/10_external_dependencies.html">External Dependencies</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other_information/20_glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../other_information/30_license.html">License</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">openPASS</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../30_gui_plugins.html">GUI Plugins</a> &raquo;</li>
<li>PCM Simulation</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/user_guide/gui_user_guide/30_pcm_sim.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="pcm-simulation">
<span id="pcm-sim"></span><h1>PCM Simulation<a class="headerlink" href="#pcm-simulation" title="Permalink to this headline"></a></h1>
<p>This plugin is used to configure and start a simulation based pcm data or simulation configuration sets of previous simulations.</p>
<div class="section" id="simulation-input">
<h2>Simulation Input<a class="headerlink" href="#simulation-input" title="Permalink to this headline"></a></h2>
<ul>
<li><p><strong>UseCase: Database</strong></p>
<blockquote>
<div><ul class="simple">
<li><p>Select the radio button <code class="docutils literal notranslate"><span class="pre">PCM</span> <span class="pre">Database</span></code></p></li>
<li><p>Select a PCM database file</p></li>
</ul>
</div></blockquote>
</li>
</ul>
<img alt="../../_images/input_db.png" src="../../_images/input_db.png" />
<ul>
<li><p><strong>UseCase: Resimulation</strong></p>
<blockquote>
<div><ul class="simple">
<li><p>Select the radio button <code class="docutils literal notranslate"><span class="pre">Simulation</span> <span class="pre">Results</span></code></p></li>
<li><p>Select a folder with previous Results</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The selected output folder must be different to the input folder</p>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>To ensure that the previous results are correctly read, the folder structure of the results has to follow the structure the GUI itself generates when the simulation is started from a database.
Only the configuration files of the default folders are loaded. No variation is loaded and taken into account at this place.</p>
</div>
</div></blockquote>
</li>
</ul>
<img alt="../../_images/input_resim.png" src="../../_images/input_resim.png" />
</div>
<div class="section" id="simulation-output">
<h2>Simulation Output<a class="headerlink" href="#simulation-output" title="Permalink to this headline"></a></h2>
<blockquote>
<div><ul>
<li><p>In <code class="docutils literal notranslate"><span class="pre">Result</span> <span class="pre">Folder</span></code> you can select a folder where the output shall be written</p></li>
<li><p>In <code class="docutils literal notranslate"><span class="pre">Log</span> <span class="pre">Level</span></code> you can define at what level a logging output shall be produced</p>
<blockquote>
<div><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">Error</span></code> - Log only Errors</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Warning</span></code> - Log additionally warnings</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Info</span></code> - Log additionally information</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">Debug</span></code> - Log additionally debug information</p></li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
<img alt="../../_images/output.png" src="../../_images/output.png" />
</div>
<div class="section" id="simulation-configuration">
<h2>Simulation Configuration<a class="headerlink" href="#simulation-configuration" title="Permalink to this headline"></a></h2>
<p>At this point, the User is able to choose what system configuration shall be used for each agent.
The User can either select one or multiple system configuration files (comma separated).
In the case of multiple files are configured, there will be unique sets of simulation configuration files generated for each possible combination, which are placed in folders named / coded like <code class="docutils literal notranslate"><span class="pre">&lt;Car1_Index&gt;-&lt;Car2_Index&gt;-&lt;Other_Index&gt;</span></code> e.g. <code class="docutils literal notranslate"><span class="pre">1-0-2</span></code></p>
<img alt="../../_images/system_config.png" src="../../_images/system_config.png" />
</div>
<div class="section" id="variation">
<h2>Variation<a class="headerlink" href="#variation" title="Permalink to this headline"></a></h2>
<ul>
<li><p>The random seed can be set to a specific initial random seed by <code class="docutils literal notranslate"><span class="pre">using</span> <span class="pre">a</span> <span class="pre">given</span> <span class="pre">value</span></code> or just by <code class="docutils literal notranslate"><span class="pre">using</span> <span class="pre">the</span> <span class="pre">case</span> <span class="pre">number</span></code></p></li>
<li><p>The number runs can with different random seed can be set by changing <code class="docutils literal notranslate"><span class="pre">Variation</span> <span class="pre">Count</span></code></p></li>
<li><p>The original trajectory can be shifted randomly by setting the <code class="docutils literal notranslate"><span class="pre">Shift</span> <span class="pre">radius</span></code> for <em>Car1</em> and <em>Car2</em></p>
<blockquote>
<div><ul class="simple">
<li><p>Given a shift radius R for a vehicle</p></li>
<li><p>For each position P in trajectory, it shifted position P’ is calculated by randomly generating a distance D (D&lt;= R) and a relative angle in polar coordinate</p></li>
</ul>
<div class="math">
<p><img src="../../_images/math/483636c85068dd3159fa50e49105a8ada221aaec.png" alt="`x_{\text{new}}(t) = x(t) + \delta x`
`y_{\text{new}}(t) = x(y) + \delta y`"/></p>
</div></div></blockquote>
</li>
</ul>
<img alt="../../_images/trajectory_shifting.png" src="../../_images/trajectory_shifting.png" />
<ul>
<li><p>The original velocity can be scaled randomly by setting the <code class="docutils literal notranslate"><span class="pre">Max</span> <span class="pre">scale</span></code> for <em>Car1</em> and <em>Car2</em></p></li>
<li><p>Given a velocity deviation :math <cite>delta V</cite> for a vehicle</p></li>
<li><p>In a trajectory, a position P_{i} is represented as</p>
<blockquote>
<div><div class="math">
<p><img src="../../_images/math/6320e0b9994d88e6de4c1c19af9f9f2f027bd7ff.png" alt="`x(t) = x_{0} + \int_{0}^{t} v_{x} (t) dt`
`y(t) = y_{0} + \int_{0}^{t} v_{y} (t) dt`"/></p>
</div></div></blockquote>
</li>
<li><p>The new position P_{i} can be represented as</p>
<div class="math">
<p><img src="../../_images/math/8ffb1c6ecf28ce9d5aa3c83bceed6ed16c0da9bb.png" alt="`x(t) = x_{0} + k \int_{0}^{t} v_{x} (t) dt`
`y(t) = y_{0} + k \int_{0}^{t} v_{y} (t) dt`"/></p>
</div></li>
<li><p>with a scaling factor k</p></li>
</ul>
<img alt="../../_images/velocity_scaling.png" src="../../_images/velocity_scaling.png" />
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The additional random seeds which are used by the variation are chosen randomly depending on the initial random seed.
Therefore they´re reproducible</p>
</div>
<img alt="../../_images/variation.png" src="../../_images/variation.png" />
</div>
<div class="section" id="simulation-start">
<h2>Simulation Start<a class="headerlink" href="#simulation-start" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p>Select one or multiple simulation cases (by pressing the CTRL / SHIFT key)</p></li>
<li><p>Press the button <code class="docutils literal notranslate"><span class="pre">Start</span> <span class="pre">Simulation</span></code></p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The User can interrupt the simulation process by pressing <code class="docutils literal notranslate"><span class="pre">Stop</span> <span class="pre">Simulation</span></code>.
The simulation will stop after the current simulation is finished.
Therefore it won´t start the remaining simulations anymore.</p>
</div>
<img alt="../../_images/select.png" src="../../_images/select.png" />
</div>
<div class="section" id="save-load-experiment">
<h2>Save / Load Experiment<a class="headerlink" href="#save-load-experiment" title="Permalink to this headline"></a></h2>
<p>Every change in the gui can be saved as in “Experiment” in an text file.
This file can later be loaded to retrieve the previous used configuration of the “Experiment”.</p>
<img alt="../../_images/experiment.png" src="../../_images/experiment.png" />
</div>
<div class="section" id="result-folder-structure">
<span id="id1"></span><h2>Result Folder Structure<a class="headerlink" href="#result-folder-structure" title="Permalink to this headline"></a></h2>
<ul>
<li><p>&lt;Result Folder Name&gt; (e.g. <em>result_pcm</em>)</p>
<blockquote>
<div><ul>
<li><p>&lt;Case Name&gt; (e.g. <em>1000208</em>)</p>
<blockquote>
<div><ul>
<li><p>&lt;System Configuration combination code&gt; (e.g. <em>1-0-2</em>)</p>
<blockquote>
<div><ul class="simple">
<li><p>&lt;Variation Name&gt; (e.g. <em>default</em> or <em>Var_00001</em>)</p></li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</li>
</ul>
</div>
</div>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="20_system_editor.html" class="btn btn-neutral float-left" title="System Editor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="40_pcm_eval.html" class="btn btn-neutral float-right" title="PCM Evaluation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2021 OpenPASS Working Group.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>