blob: 19a4d7042c7d052e6ee83715fa0526e11f147cbe [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>Slave &mdash; OpenPASS Documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<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/tabs.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/custom.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 type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<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 type="text/javascript" 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="World_OSI" href="world_osi.html" />
<link rel="prev" title="Agent Components" href="agent_components.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="main navigation">
<p class="caption"><span class="caption-text">Installation Guides</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/10_gui_installation_guide.html">GUI Installation Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/20_sim_installation_guide.html">Simulation Installation Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../installation_guide/21_pcm_installation_guide.html">PCM Installation Guide</a></li>
</ul>
<p class="caption"><span class="caption-text">User Guides</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/10_gui_user_guide.html">GUI User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../user_guide/20_sim_user_guide.html">Simulation User Guide</a></li>
</ul>
<p class="caption"><span class="caption-text">Advanced topics</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../10_documentation.html">Documentation Concept</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../20_simulator_advanced.html">Simulator</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="agent_components.html">Agent Components</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Slave</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#command-line-arguments">Command Line Arguments</a></li>
<li class="toctree-l3"><a class="reference internal" href="#scheduler">Scheduler</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#executing-phases">Executing phases</a></li>
<li class="toctree-l4"><a class="reference internal" href="#task-type-description">Task type description</a></li>
<li class="toctree-l4"><a class="reference internal" href="#task-priorities">Task priorities</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="world_osi.html">World_OSI</a></li>
</ul>
</li>
</ul>
<p class="caption"><span class="caption-text">Other Information</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../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="top navigation">
<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="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="../20_simulator_advanced.html">Simulator</a> &raquo;</li>
<li>Slave</li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/advanced_topics/simulator/slave.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="slave">
<span id="id1"></span><h1>Slave<a class="headerlink" href="#slave" title="Permalink to this headline"></a></h1>
<div class="section" id="command-line-arguments">
<span id="slave-commandlinearguments"></span><h2>Command Line Arguments<a class="headerlink" href="#command-line-arguments" title="Permalink to this headline"></a></h2>
<p>The slave can be configured by applying the following command line arguments.
Unspecified arguments will be defaulted (<em>default values in []</em>).</p>
<p>The slave supports the following arguments:</p>
<ul class="simple">
<li><p><em>–logLevel</em> [0] :
Logging level between 0 (minimum) and 5 (maximum - debug core)</p></li>
<li><p><em>–logFile</em> [OpenPassSlave.log]* :
Name of the log file</p></li>
<li><p><em>–lib</em> [lib] :
Path of the libraries (relative or absolute)</p></li>
<li><p><em>–configs</em> [configs] :
Path for writing outputs (relative or absolute)</p></li>
<li><p><em>–results</em> [results] :
Path for writing outputs (relative or absolute)</p></li>
</ul>
</div>
<div class="section" id="scheduler">
<span id="slave-scheduler"></span><h2>Scheduler<a class="headerlink" href="#scheduler" title="Permalink to this headline"></a></h2>
<p>The Scheduler handles the sequence of agent based and common tasks before, during and after simulation.</p>
<div class="section" id="executing-phases">
<h3>Executing phases<a class="headerlink" href="#executing-phases" title="Permalink to this headline"></a></h3>
<p>Each simulation run splits up into 3 phases: Bootstrap tasks, Stepping and Finalize tasks.</p>
<ol class="arabic simple">
<li><p>Initial task are grouped within the bootstrap tasks and are executed first and only once.
This includes updating the Observation modules and triggering all PreRun Spawners.</p></li>
<li><p>After this Spawning, PreAgent, NonRecurring, Recurring and Syncronize Tasks are processed for each timestep.
First all Runtime Spawners are triggered.
Whenever a new agent is spawned, all its components are parsed to <em>Trigger</em> and <em>Update</em> tasks, grouped and sorted by execution time as non-recurring and recurring tasks.
Next all PreAgents task are executed, which includes publishing the world state to the DataStore in triggering all EventDetectors and Manipulators
Non-recurring tasks are executed just once and will be deleted afterwards (<em>init</em> flag in ComponentRepository).
Right after execution of all agent-based tasks, the Syncronize phase synchronizes all changes to the world as world state for the next timestep.</p></li>
<li><p>The last phase is finalizing task, executed when an end condition is reached, such as end of simulation duration. Within this phase all EventDetectors and Manipulators are triggered and the Observation modules are updated one last time.</p></li>
</ol>
</div>
<div class="section" id="task-type-description">
<h3>Task type description<a class="headerlink" href="#task-type-description" title="Permalink to this headline"></a></h3>
<p>The scheduler handles 8 different task types:</p>
<ul class="simple">
<li><p><strong>Spawning</strong> - triggers agent spawning</p></li>
<li><p><strong>EventDetector</strong> - execute event detector</p></li>
<li><p><strong>Manipulator</strong> - execute manipulator</p></li>
<li><p><strong>Observation</strong> - update observation modules</p></li>
<li><p><strong>Trigger</strong> - execute trigger function of connected component</p></li>
<li><p><strong>Update</strong> - execute update output of connected component and resulting input</p></li>
<li><p><strong>SyncWorld</strong> - update world</p></li>
</ul>
<p>The following table gives an overview to all phases.</p>
<table class="tight-table docutils align-default">
<colgroup>
<col style="width: 11%" />
<col style="width: 6%" />
<col style="width: 34%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Phase</p></th>
<th class="head"><p>Changeable</p></th>
<th class="head"><p>Task types</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Bootstrap</p></td>
<td><p>no</p></td>
<td><p>Spawning (PreRun), Observation</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Spawning</p></td>
<td><p>no</p></td>
<td><p>Spawning (Runtime), Observation</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>PreAgent</p></td>
<td><p>no</p></td>
<td><p>SyncWorld (publishing), EventDetector, Manipulator</p></td>
<td></td>
</tr>
<tr class="row-odd"><td><p>Non recurring</p></td>
<td><p>yes</p></td>
<td><p>Trigger, Update</p></td>
<td><p>Only components defined as “Init”</p></td>
</tr>
<tr class="row-even"><td><p>Recurring</p></td>
<td><p>yes</p></td>
<td><p>Trigger, Update</p></td>
<td><p>Non Init components</p></td>
</tr>
<tr class="row-odd"><td><p>Syncronize</p></td>
<td><p>no</p></td>
<td><p>SyncWorld</p></td>
<td><p>Update the state of the agents and the virtual world (e.g. due to agent movements).</p></td>
</tr>
<tr class="row-even"><td><p>Finalize</p></td>
<td><p>no</p></td>
<td><p>EventDetector, Manipulator, Observation</p></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="task-priorities">
<h3>Task priorities<a class="headerlink" href="#task-priorities" title="Permalink to this headline"></a></h3>
<p>The order of the tasks within one phase depends on component priority and task type.
All tasks for a given timestamp are ordered by the SchedulerTasks priority, and divided into the aformentioned phases.</p>
<p>The following table shows the priorities for the non-component task types:</p>
<table class="tight-table docutils align-default">
<colgroup>
<col style="width: 13%" />
<col style="width: 7%" />
<col style="width: 81%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Task type</p></th>
<th class="head"><p>Priority</p></th>
<th class="head"><p>Notes</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Spawning</p></td>
<td><p>4</p></td>
<td><p>Highest priority, nothing can happen before any agent is instantiated.</p></td>
</tr>
<tr class="row-odd"><td><p>EventDetector</p></td>
<td><p>3</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>Manipulator</p></td>
<td><p>2</p></td>
<td><p>The manipulator task uses the event detector tasks as input. Therefore it is called afterwards.</p></td>
</tr>
<tr class="row-odd"><td><p>SyncGlobalData</p></td>
<td><p>1</p></td>
<td></td>
</tr>
<tr class="row-even"><td><p>Observation</p></td>
<td><p>0</p></td>
<td><p>Observation tasks have to be execute at the end.</p></td>
</tr>
</tbody>
</table>
<p>The priority of trigger and update tasks depend on the priority within the SystemConfig.
They are independent of non-component priorities.
Since trigger tasks prepare output signals, output tasks are right called after the corresponding trigger tasks.</p>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="world_osi.html" class="btn btn-neutral float-right" title="World_OSI" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="agent_components.html" class="btn btn-neutral float-left" title="Agent Components" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</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 type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>