<|start_filename|>docs/build/html/introduction/glossary.html<|end_filename|>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Glossary of terms &#8212; YAFS 0.3 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Basic Concepts" href="basic.html" />
    <link rel="prev" title="Installation" href="installation.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="glossary-of-terms">
<h1>Glossary of terms<a class="headerlink" href="#glossary-of-terms" title="Permalink to this headline">¶</a></h1>
<p>Below there is a list of the main concepts and equivalences with terms of other works. To deepen in them, it is necessary to resort to related works in this field.</p>
<ul class="simple">
<li><strong>Module</strong> is a part of the application that it can be deployed in a computational or any other type of device.</li>
<li><strong>Entity</strong>, is the abstraction of any type of device</li>
<li><strong>Link</strong> a network connection between two entities</li>
<li><strong>Pure Source</strong> is a special type of node who only generates messages (i.e. sensor devices)</li>
<li><strong>Pure Sink</strong> is a special type of node who only receives messages (i.e. actuator devices)</li>
<li><strong>Placement</strong>, this module controls the allocation of application module</li>
<li><strong>Message</strong> is the representation of a network package that it enables the action of a application module.</li>
</ul>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">OVERVIEW</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#acknowledge">Acknowledge</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">YAFS in 5 Minutes</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">Glossary of terms</a></li>
<li class="toctree-l2"><a class="reference internal" href="basic.html">Basic Concepts</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/index.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../api_reference/index.html">API REFERENCE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../about/index.html">ABOUT</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../contents.html">Documentation overview</a><ul>
  <li><a href="index.html">YAFS in 5 Minutes</a><ul>
      <li>Previous: <a href="installation.html" title="previous chapter">Installation</a></li>
      <li>Next: <a href="basic.html" title="next chapter">Basic Concepts</a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2017, <NAME>, <NAME>.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
      |
      <a href="../_sources/introduction/glossary.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

<|start_filename|>docs/build/html/api_reference/yafs.population.html<|end_filename|>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>yafs.population &#8212; YAFS 0.3 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="yafs.placement" href="yafs.placement.html" />
    <link rel="prev" title="yafs.application" href="yafs.application.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-yafs.population">
<span id="yafs-population"></span><h1><code class="docutils literal"><span class="pre">yafs.population</span></code><a class="headerlink" href="#module-yafs.population" title="Permalink to this headline">¶</a></h1>
<p>This type of algorithm have two main functions:</p>
<blockquote>
<div><p><em>initial_allocation</em>: invoked at the start of the simulation</p>
<p><em>run</em> invoked according to the assigned temporal distribution.</p>
</div></blockquote>
<dl class="class">
<dt id="yafs.population.Population">
<em class="property">class </em><code class="descclassname">yafs.population.</code><code class="descname">Population</code><span class="sig-paren">(</span><em>name</em>, <em>activation_dist=None</em>, <em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Population" title="Permalink to this definition">¶</a></dt>
<dd><p>A population algorithm controls how the message generation of the sensor modules is associated in the nodes of the topology.
This assignment is based on a generation controller to each message. And a generation control is assigned to a node or to several
in the topology both during the initiation and / or during the execution of the simulation.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">A class interface</p>
</div>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">name (str): associated name</p>
<p class="last">activation_dist (function): a distribution function to active the <em>run</em> function in execution time</p>
</dd>
<dt>Kwargs:</dt>
<dd>param (dict): the parameters of the <em>activation_dist</em></dd>
</dl>
<dl class="method">
<dt id="yafs.population.Population.get_next_activation">
<code class="descname">get_next_activation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.get_next_activation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Population.get_next_activation" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>the next time to be activated in the simulation</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.population.Population.initial_allocation">
<code class="descname">initial_allocation</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.initial_allocation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Population.initial_allocation" title="Permalink to this definition">¶</a></dt>
<dd><p>Given an ecosystem and an application, it starts the allocation of pure sources in the topology.</p>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">override required</p>
</div>
</dd></dl>

<dl class="method">
<dt id="yafs.population.Population.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>sim</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Population.run" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be invoked during the simulation to change the assignment of the modules that generate the messages.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>sim (:mod: yafs.core.Sim)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.population.Population.set_sink_control">
<code class="descname">set_sink_control</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.set_sink_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Population.set_sink_control" title="Permalink to this definition">¶</a></dt>
<dd><p>localization of sink modules</p>
</dd></dl>

<dl class="method">
<dt id="yafs.population.Population.set_src_control">
<code class="descname">set_src_control</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.set_src_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Population.set_src_control" title="Permalink to this definition">¶</a></dt>
<dd><p>Stores the drivers of each message generator.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>values (dict):</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.population.Statical">
<em class="property">class </em><code class="descclassname">yafs.population.</code><code class="descname">Statical</code><span class="sig-paren">(</span><em>name</em>, <em>activation_dist=None</em>, <em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Statical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.population.Statical" title="Permalink to this definition">¶</a></dt>
<dd><p>This implementation of a population algorithm statically assigns the generation of a source in a node of the topology. It is only invoked in the initialization.</p>
<p>Extends: :mod: Population</p>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">OVERVIEW</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#acknowledge">Acknowledge</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/index.html">YAFS in 5 Minutes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/index.html">Examples</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">API REFERENCE</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="yafs.html"><code class="docutils literal"><span class="pre">yafs</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.core.html"><code class="docutils literal"><span class="pre">yafs.core</span></code> — Simulator engine</a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.topology.html"><code class="docutils literal"><span class="pre">yafs.topology</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.application.html"><code class="docutils literal"><span class="pre">yafs.application</span></code></a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">yafs.population</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.placement.html"><code class="docutils literal"><span class="pre">yafs.placement</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.selection.html"><code class="docutils literal"><span class="pre">yafs.selection</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.distribution.html"><code class="docutils literal"><span class="pre">yafs.distribution</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.stats.html"><code class="docutils literal"><span class="pre">yafs.stats</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.metrics.html"><code class="docutils literal"><span class="pre">yafs.metrics</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.utils.html"><code class="docutils literal"><span class="pre">yafs.utils</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../about/index.html">ABOUT</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../contents.html">Documentation overview</a><ul>
  <li><a href="index.html">API REFERENCE</a><ul>
      <li>Previous: <a href="yafs.application.html" title="previous chapter"><code class="docutils literal"><span class="pre">yafs.application</span></code></a></li>
      <li>Next: <a href="yafs.placement.html" title="next chapter"><code class="docutils literal"><span class="pre">yafs.placement</span></code></a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2017, <NAME>, <NAME>.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
      |
      <a href="../_sources/api_reference/yafs.population.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

<|start_filename|>docs/build/html/examples/tutorial_example.html<|end_filename|>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Tutorial Example &#8212; YAFS 0.3 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="API REFERENCE" href="../api_reference/index.html" />
    <link rel="prev" title="Examples" href="index.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="tutorial-example">
<span id="id1"></span><h1>Tutorial Example<a class="headerlink" href="#tutorial-example" title="Permalink to this headline">¶</a></h1>
<p>In this section, we explain the examples from Tutorial/ directory but you can see most sophisticated implemented cases:</p>
<ul class="simple">
<li><strong>Tutorial/main1.py</strong> The most basic case: cloud allocation, and  minimum  path routing,</li>
<li><strong>Tutorial/main2.py</strong> Using first case, we scale the modules in the cloud and we use a round robin scheduler.</li>
<li><strong>Tutorial/main3.py</strong> Using second case, we show how to implement a dynamic control</li>
<li><strong>VRGameFog-IFogSim-WL/main.py</strong> This implemention have been used to compare YAFS simulator with iFogSim, implementing a close setup of the experiments.</li>
<li><strong>FogCentrality/experiment1.py</strong> In this case, we have analysed how the topology and the allocation of modules affects in the latency time.</li>
<li><strong>FogCentrality/experiment2.py</strong></li>
<li><strong>DynamicAllocation/.py</strong> It is a demo of how to implement a dynamic allocation of modules according a customized distribution. We use a random euclidean network from a Graphml format, and several selection, population, and allocation implementations.</li>
<li><strong>DynamicFailuresOnNodes/main.py</strong> From a euclidean random network we dynamically remove nodes.</li>
<li><strong>DynamicWorkload/main.py</strong> In this case, we simulate the movement of users in the network. In each step of the customized distribution nodes are allocated in the next node of the path to reach the point on all modules are.</li>
</ul>
<p>TODO Explain with detail the first three cases.</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">OVERVIEW</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#acknowledge">Acknowledge</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/index.html">YAFS in 5 Minutes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Examples</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">Tutorial Example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../api_reference/index.html">API REFERENCE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../about/index.html">ABOUT</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../contents.html">Documentation overview</a><ul>
  <li><a href="index.html">Examples</a><ul>
      <li>Previous: <a href="index.html" title="previous chapter">Examples</a></li>
      <li>Next: <a href="../api_reference/index.html" title="next chapter">API REFERENCE</a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2017, <NAME>, <NAME>.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
      |
      <a href="../_sources/examples/tutorial_example.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

<|start_filename|>docs/build/html/api_reference/yafs.html<|end_filename|>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>yafs &#8212; YAFS 0.3 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="yafs.core — Simulator engine" href="yafs.core.html" />
    <link rel="prev" title="API REFERENCE" href="index.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-yafs">
<span id="yafs"></span><h1><code class="docutils literal"><span class="pre">yafs</span></code><a class="headerlink" href="#module-yafs" title="Permalink to this headline">¶</a></h1>
<p>The <code class="docutils literal"><span class="pre">yafs</span></code> module is the main component who perform the simulation.</p>
<p>The following tables list all of the available components in this module.</p>
<div class="section" id="core">
<h2>Core<a class="headerlink" href="#core" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Sim</span></code>(topology[,&nbsp;name_register,&nbsp;…])</td>
<td>This class contains the cloud event-discrete simulation environment and it controls the structure variables.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="topology">
<h2>Topology<a class="headerlink" href="#topology" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Topology</span></code>([logger])</td>
<td>This class unifies the functions to deal with <strong>Complex Networks</strong> as a network topology within of the simulator.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="application">
<h2>Application<a class="headerlink" href="#application" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Application</span></code>(name)</td>
<td>An application is defined by a DAG between modules that generate, compute and receive messages.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">Message</span></code>(name,&nbsp;src,&nbsp;dst[,&nbsp;instructions,&nbsp;…])</td>
<td>A message is set by the following values:</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="population">
<h2>Population<a class="headerlink" href="#population" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Population</span></code>(name[,&nbsp;activation_dist,&nbsp;logger])</td>
<td>A population algorithm controls how the message generation of the sensor modules is associated in the nodes of the topology.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">Statical</span></code>(name[,&nbsp;activation_dist,&nbsp;logger])</td>
<td>This implementation of a population algorithm statically assigns the generation of a source in a node of the topology.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="placement">
<h2>Placement<a class="headerlink" href="#placement" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Placement</span></code>(name[,&nbsp;activation_dist,&nbsp;logger])</td>
<td>A placement (or allocation) algorithm controls where to locate the service modules and their replicas in the different nodes of the topology, according to load criteria, or other objectives.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">ClusterPlacement</span></code>(name[,&nbsp;activation_dist,&nbsp;logger])</td>
<td>This implementation locates the services of the application in the cheapest cluster regardless of where the sources or sinks are located.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="selection">
<h2>Selection<a class="headerlink" href="#selection" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Selection</span></code>([logger])</td>
<td>A selection algorithm provide the route among topology entities for that a message reach the destiny module.</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">OneRandomPath</span></code>([logger])</td>
<td>Among all the possible options, it returns a random path.</td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">First_ShortestPath</span></code>([logger])</td>
<td>Among all possible shorter paths, returns the first.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="metrics">
<h2>Metrics<a class="headerlink" href="#metrics" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Metrics</span></code>([default_results_path])</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="distribution">
<h2>Distribution<a class="headerlink" href="#distribution" title="Permalink to this headline">¶</a></h2>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">Distribution</span></code>(name)</td>
<td>Abstract class</td>
</tr>
<tr class="row-even"><td><code class="xref py py-obj docutils literal"><span class="pre">deterministic_distribution</span></code>(time,&nbsp;**kwargs)</td>
<td></td>
</tr>
<tr class="row-odd"><td><code class="xref py py-obj docutils literal"><span class="pre">exponential_distribution</span></code>(lambd[,&nbsp;seed])</td>
<td></td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="yafs.Sim">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Sim</code><span class="sig-paren">(</span><em>topology</em>, <em>name_register='events_log.json'</em>, <em>link_register='links_log.json'</em>, <em>redis=None</em>, <em>purge_register=True</em>, <em>logger=None</em>, <em>default_results_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim" title="Permalink to this definition">¶</a></dt>
<dd><p>This class contains the cloud event-discrete simulation environment and it controls the structure variables.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>topology (object) - the associate (<code class="xref py py-mod docutils literal"><span class="pre">Topology</span></code>) of the environment. There is only one.</dd>
<dt>Kwargs:</dt>
<dd><p class="first">name_register (str): database file name where are registered the events.</p>
<p>purge_register (boolean): True - clean the database</p>
<p class="last">logger (logger) - logger</p>
</dd>
</dl>
<p><strong>Main variables to coordinate with algorithm:</strong></p>
<dl class="attribute">
<dt id="yafs.Sim.FORWARD_METRIC">
<code class="descname">FORWARD_METRIC</code><em class="property"> = 'FWD_M'</em><a class="headerlink" href="#yafs.Sim.FORWARD_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Sim.LINK_METRIC">
<code class="descname">LINK_METRIC</code><em class="property"> = 'LINK'</em><a class="headerlink" href="#yafs.Sim.LINK_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Sim.NODE_METRIC">
<code class="descname">NODE_METRIC</code><em class="property"> = 'COMP_M'</em><a class="headerlink" href="#yafs.Sim.NODE_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Sim.SINK_METRIC">
<code class="descname">SINK_METRIC</code><em class="property"> = 'SINK_M'</em><a class="headerlink" href="#yafs.Sim.SINK_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Sim.SOURCE_METRIC">
<code class="descname">SOURCE_METRIC</code><em class="property"> = 'SRC_M'</em><a class="headerlink" href="#yafs.Sim.SOURCE_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.add_mobile_agent">
<code class="descname">add_mobile_agent</code><span class="sig-paren">(</span><em>gme</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.add_mobile_agent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.add_mobile_agent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.deploy_app">
<code class="descname">deploy_app</code><span class="sig-paren">(</span><em>app</em>, <em>placement</em>, <em>population</em>, <em>selector</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_app"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.deploy_app" title="Permalink to this definition">¶</a></dt>
<dd><p>This process is responsible for linking the <em>application</em> to the different algorithms (placement, population, and service)</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">app (object): <code class="xref py py-mod docutils literal"><span class="pre">Application</span></code> class</p>
<p>placement (object): <code class="xref py py-mod docutils literal"><span class="pre">Placement</span></code> class</p>
<p>population (object): <code class="xref py py-mod docutils literal"><span class="pre">Population</span></code> class</p>
<p class="last">selector (object): <code class="xref py py-mod docutils literal"><span class="pre">Selector</span></code> class</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.deploy_module">
<code class="descname">deploy_module</code><span class="sig-paren">(</span><em>app_name</em>, <em>module</em>, <em>services</em>, <em>ids</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.deploy_module" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.deploy_monitor">
<code class="descname">deploy_monitor</code><span class="sig-paren">(</span><em>name</em>, <em>function</em>, <em>distribution</em>, <em>**param</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_monitor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.deploy_monitor" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a DES process for user purpose</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">name (string) name of monitor</p>
<p>function (function): function that will be invoked within the simulator with the user’s code</p>
<p class="last">distribution (function): a temporary distribution function</p>
</dd>
<dt>Kwargs:</dt>
<dd>param (dict): the parameters of the <em>distribution</em> function</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.deploy_sink">
<code class="descname">deploy_sink</code><span class="sig-paren">(</span><em>app_name</em>, <em>node</em>, <em>module</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_sink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.deploy_sink" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a DES process for deploy pure SINK modules (actuators)
This function its used by (<code class="xref py py-mod docutils literal"><span class="pre">Placement</span></code>): algorithm
Internatlly, there is not a DES PROCESS for this type of behaviour</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">app_name (str): application name</p>
<p>node (int): entity.id of the topology who will create the messages</p>
<p class="last">module (str): module</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.deploy_source">
<code class="descname">deploy_source</code><span class="sig-paren">(</span><em>app_name</em>, <em>id_node</em>, <em>msg</em>, <em>distribution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.deploy_source" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a DES process for deploy pure source modules (sensors)
This function its used by (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">app_name (str): application name</p>
<p>id_node (int): entity.id of the topology who will create the messages</p>
<p class="last">distribution (function): a temporary distribution function</p>
</dd>
<dt>Kwargs:</dt>
<dd>param - the parameters of the <em>distribution</em> function</dd>
<dt>Returns:</dt>
<dd>id (int) the same input <em>id</em></dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.draw_allocated_topology">
<code class="descname">draw_allocated_topology</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.draw_allocated_topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.draw_allocated_topology" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.generate_animation">
<code class="descname">generate_animation</code><span class="sig-paren">(</span><em>pathFile</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.generate_animation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.generate_animation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.get_DES">
<code class="descname">get_DES</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_DES"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.get_DES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.get_DES_from_Service_In_Node">
<code class="descname">get_DES_from_Service_In_Node</code><span class="sig-paren">(</span><em>node</em>, <em>app_name</em>, <em>service</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_DES_from_Service_In_Node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.get_DES_from_Service_In_Node" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.get_alloc_entities">
<code class="descname">get_alloc_entities</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_alloc_entities"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.get_alloc_entities" title="Permalink to this definition">¶</a></dt>
<dd><p>It returns a dictionary of deployed services
key : id-node
value: a list of deployed services</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.get_assigned_structured_modules_from_DES">
<code class="descname">get_assigned_structured_modules_from_DES</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_assigned_structured_modules_from_DES"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.get_assigned_structured_modules_from_DES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.load_user_tracks">
<code class="descname">load_user_tracks</code><span class="sig-paren">(</span><em>tracks</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.load_user_tracks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.load_user_tracks" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.print_debug_assignaments">
<code class="descname">print_debug_assignaments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.print_debug_assignaments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.print_debug_assignaments" title="Permalink to this definition">¶</a></dt>
<dd><p>This functions prints debug information about the assignment of DES process - Topology ID - Source Module or Modules</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.register_event_entity">
<code class="descname">register_event_entity</code><span class="sig-paren">(</span><em>next_event_dist</em>, <em>event_type='node_up'</em>, <em>**args</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.register_event_entity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.register_event_entity" title="Permalink to this definition">¶</a></dt>
<dd><p>TODO</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.remove_node">
<code class="descname">remove_node</code><span class="sig-paren">(</span><em>id_node_topology</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.remove_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.remove_node" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>until</em>, <em>test_initial_deploy=False</em>, <em>show_progress_monitor=True</em>, <em>mobile_behaviour=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Start the simulation</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>until (int): Defines a stop time. If None the simulation runs until some internal algorithm changes the var <em>yafs.core.sim.stop</em> to True</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.set_coverage_class">
<code class="descname">set_coverage_class</code><span class="sig-paren">(</span><em>class_name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.set_coverage_class"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.set_coverage_class" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.set_mobile_fog_entities">
<code class="descname">set_mobile_fog_entities</code><span class="sig-paren">(</span><em>mobile_fog_entities</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.set_mobile_fog_entities"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.set_mobile_fog_entities" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.set_movement_control">
<code class="descname">set_movement_control</code><span class="sig-paren">(</span><em>evol</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.set_movement_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.set_movement_control" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Sim.start_process">
<code class="descname">start_process</code><span class="sig-paren">(</span><em>id</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.start_process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.start_process" title="Permalink to this definition">¶</a></dt>
<dd><p>All pure source modules (sensors) are controlled by this boolean.
Using this function (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm can start one source</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>id.source (int): the identifier of the DES process.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.stop_process">
<code class="descname">stop_process</code><span class="sig-paren">(</span><em>id</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.stop_process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.stop_process" title="Permalink to this definition">¶</a></dt>
<dd><p>All pure source modules (sensors) are controlled by this boolean.
Using this function (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm can stop one source</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>id.source (int): the identifier of the DES process.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Sim.undeploy_module">
<code class="descname">undeploy_module</code><span class="sig-paren">(</span><em>app_name</em>, <em>service_name</em>, <em>idtopo</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.undeploy_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Sim.undeploy_module" title="Permalink to this definition">¶</a></dt>
<dd><p>removes all modules deployed in a node
modules with the same name = service_name
from app_name
deployed in id_topo</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Topology">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Topology</code><span class="sig-paren">(</span><em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology" title="Permalink to this definition">¶</a></dt>
<dd><p>This class unifies the functions to deal with <strong>Complex Networks</strong> as a network topology within of the simulator. In addition, it facilitates its creation, and assignment of attributes.</p>
<dl class="attribute">
<dt id="yafs.Topology.LINK_BW">
<code class="descname">LINK_BW</code><em class="property"> = 'BW'</em><a class="headerlink" href="#yafs.Topology.LINK_BW" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Topology.LINK_PR">
<code class="descname">LINK_PR</code><em class="property"> = 'PR'</em><a class="headerlink" href="#yafs.Topology.LINK_PR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Topology.NODE_IPT">
<code class="descname">NODE_IPT</code><em class="property"> = 'IPT'</em><a class="headerlink" href="#yafs.Topology.NODE_IPT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Topology.add_node">
<code class="descname">add_node</code><span class="sig-paren">(</span><em>nodes</em>, <em>edges=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.add_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.add_node" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a list of nodes in the topology</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">nodes (list): a list of identifiers</p>
<p class="last">edges (list): a list of destination edges</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.create_random_topology">
<code class="descname">create_random_topology</code><span class="sig-paren">(</span><em>nxGraphGenerator</em>, <em>params</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.create_random_topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.create_random_topology" title="Permalink to this definition">¶</a></dt>
<dd><p>It generates the topology from a Graph generators of NetworkX</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>nxGraphGenerator (function): a graph generator function</dd>
<dt>Kwargs:</dt>
<dd>params (dict): a list of parameters of <em>nxGraphGenerator</em> function</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.create_topology_from_graph">
<code class="descname">create_topology_from_graph</code><span class="sig-paren">(</span><em>G</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.create_topology_from_graph"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.create_topology_from_graph" title="Permalink to this definition">¶</a></dt>
<dd><p>It generates the topology from a NetworkX graph</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>G (<em>networkx.classes.graph.Graph</em>)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.draw_png">
<code class="descname">draw_png</code><span class="sig-paren">(</span><em>path_file</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.draw_png"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.draw_png" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Topology.find_IDs">
<code class="descname">find_IDs</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.find_IDs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.find_IDs" title="Permalink to this definition">¶</a></dt>
<dd><p>Search for nodes with the same attributes that value</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>value (dict). example value = {“model”: “m-“}. Only one key is admitted</dd>
<dt>Returns:</dt>
<dd>A list with the ID of each node that have the same attribute that the value.value</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.get_edge">
<code class="descname">get_edge</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.get_edge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.get_edge" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>key (str): a edge identifier, i.e. (1,9)</dd>
<dt>Returns:</dt>
<dd>list: a list of edge attributes</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.get_edges">
<code class="descname">get_edges</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.get_edges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.get_edges" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>list: a list of graph edges, i.e.: ((1,0),(0,2),…)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.get_info">
<code class="descname">get_info</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.get_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.get_info" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Topology.get_node">
<code class="descname">get_node</code><span class="sig-paren">(</span><em>key</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.get_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.get_node" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>key (int): a node identifier</dd>
<dt>Returns:</dt>
<dd>list: a list of node features</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.get_nodes">
<code class="descname">get_nodes</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.get_nodes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.get_nodes" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>list: a list of all nodes features</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.get_nodes_att">
<code class="descname">get_nodes_att</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.get_nodes_att"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.get_nodes_att" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>A dictionary with the features of the nodes</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.load">
<code class="descname">load</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.load"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.load" title="Permalink to this definition">¶</a></dt>
<dd><p>It generates the topology from a JSON file
see project example: Tutorial_JSONModelling</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>data (str): a json</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.load_all_node_attr">
<code class="descname">load_all_node_attr</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.load_all_node_attr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.load_all_node_attr" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Topology.load_graphml">
<code class="descname">load_graphml</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.load_graphml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.load_graphml" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Topology.remove_node">
<code class="descname">remove_node</code><span class="sig-paren">(</span><em>id_node</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.remove_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.remove_node" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a node of the topology</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>id_node (int): node identifier</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.size">
<code class="descname">size</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.size" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>an int with the number of nodes</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Topology.write">
<code class="descname">write</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/topology.html#Topology.write"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Topology.write" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Application">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Application</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application" title="Permalink to this definition">¶</a></dt>
<dd><p>An application is defined by a DAG between modules that generate, compute and receive messages.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>name (str): The name must be unique within the same topology.</dd>
<dt>Returns:</dt>
<dd>an application</dd>
</dl>
<dl class="attribute">
<dt id="yafs.Application.TYPE_MODULE">
<code class="descname">TYPE_MODULE</code><em class="property"> = 'MODULE'</em><a class="headerlink" href="#yafs.Application.TYPE_MODULE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Application.TYPE_SINK">
<code class="descname">TYPE_SINK</code><em class="property"> = 'SINK'</em><a class="headerlink" href="#yafs.Application.TYPE_SINK" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Application.TYPE_SOURCE">
<code class="descname">TYPE_SOURCE</code><em class="property"> = 'SOURCE'</em><a class="headerlink" href="#yafs.Application.TYPE_SOURCE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Application.add_service_module">
<code class="descname">add_service_module</code><span class="sig-paren">(</span><em>module_name</em>, <em>message_in</em>, <em>message_out=''</em>, <em>distribution=''</em>, <em>module_dest=[]</em>, <em>p=[]</em>, <em>**param</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.add_service_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.add_service_module" title="Permalink to this definition">¶</a></dt>
<dd><p>Link to each non-pure module a management of transfering of messages</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">module_name (str): module name</p>
<p>message_in (Message): input message</p>
<p>message_out (Message): output message. If Empty the module is a sink</p>
<p>distribution (function): a function with a distribution function</p>
<p>module_dest (list): a list of modules who can receive this message. Broadcasting.</p>
<p class="last">p (list): a list of probabilities to send this message. Broadcasting</p>
</dd>
<dt>Kwargs:</dt>
<dd>param (dict): the parameters for <em>distribution</em> function</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Application.add_service_source">
<code class="descname">add_service_source</code><span class="sig-paren">(</span><em>module_name</em>, <em>distribution=None</em>, <em>message=None</em>, <em>module_dest=[]</em>, <em>p=[]</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.add_service_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.add_service_source" title="Permalink to this definition">¶</a></dt>
<dd><p>Link to each non-pure module a management for creating messages</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">module_name (str): module name</p>
<p>distribution (function): a function with a distribution function</p>
<p>message (Message): the message</p>
<p>module_dest (list): a list of modules who can receive this message. Broadcasting.</p>
<p class="last">p (list): a list of probabilities to send this message. Broadcasting</p>
</dd>
<dt>Kwargs:</dt>
<dd>param_distribution (dict): the parameters for <em>distribution</em> function</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Application.add_source_messages">
<code class="descname">add_source_messages</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.add_source_messages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.add_source_messages" title="Permalink to this definition">¶</a></dt>
<dd><p>Add in the application those messages that come from pure sources (sensors). This distinction allows them to be controlled by the (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Application.get_message">
<code class="descname">get_message</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.get_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.get_message" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns: a message instance from the identifier name</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Application.get_pure_modules">
<code class="descname">get_pure_modules</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.get_pure_modules"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.get_pure_modules" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>a list of pure source and sink modules</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Application.get_sink_modules">
<code class="descname">get_sink_modules</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.get_sink_modules"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.get_sink_modules" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>a list of sink modules</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Application.set_modules">
<code class="descname">set_modules</code><span class="sig-paren">(</span><em>data</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Application.set_modules"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Application.set_modules" title="Permalink to this definition">¶</a></dt>
<dd><p>Pure source or sink modules must be typified</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>data (dict) : a set of characteristic of modules</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Message">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Message</code><span class="sig-paren">(</span><em>name</em>, <em>src</em>, <em>dst</em>, <em>instructions=0</em>, <em>bytes=0</em>, <em>broadcasting=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/application.html#Message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Message" title="Permalink to this definition">¶</a></dt>
<dd><p>A message is set by the following values:</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">name (str): a name, unique for each application</p>
<p>src (str): the name of module who send this message</p>
<p>dst (dst): the nsame of module who recibe this message</p>
<p>inst (int): the number of instrucctions to be executed ((by default 0), Instead of MIPS, we use IPt since the time is relative to the simulation units.</p>
<p class="last">bytes (int): the size in bytes (by default 0)</p>
</dd>
<dt>Internal args used in the <strong>yafs.core</strong> are:</dt>
<dd><p class="first">timestamp (float): simulation time. Instant of time that was created.</p>
<p>path (list): a list of entities of the topology that has to travel to reach its target module from its source module.</p>
<p>dst_int (int): an identifier of the intermediate entity in which it is in the process of transmission.</p>
<p class="last">app_name (str): the name of the application</p>
</dd>
</dl>
</dd></dl>

<dl class="class">
<dt id="yafs.Population">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Population</code><span class="sig-paren">(</span><em>name</em>, <em>activation_dist=None</em>, <em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Population" title="Permalink to this definition">¶</a></dt>
<dd><p>A population algorithm controls how the message generation of the sensor modules is associated in the nodes of the topology.
This assignment is based on a generation controller to each message. And a generation control is assigned to a node or to several
in the topology both during the initiation and / or during the execution of the simulation.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">A class interface</p>
</div>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">name (str): associated name</p>
<p class="last">activation_dist (function): a distribution function to active the <em>run</em> function in execution time</p>
</dd>
<dt>Kwargs:</dt>
<dd>param (dict): the parameters of the <em>activation_dist</em></dd>
</dl>
<dl class="method">
<dt id="yafs.Population.get_next_activation">
<code class="descname">get_next_activation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.get_next_activation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Population.get_next_activation" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>the next time to be activated in the simulation</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Population.initial_allocation">
<code class="descname">initial_allocation</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.initial_allocation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Population.initial_allocation" title="Permalink to this definition">¶</a></dt>
<dd><p>Given an ecosystem and an application, it starts the allocation of pure sources in the topology.</p>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">override required</p>
</div>
</dd></dl>

<dl class="method">
<dt id="yafs.Population.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>sim</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Population.run" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be invoked during the simulation to change the assignment of the modules that generate the messages.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>sim (:mod: yafs.core.Sim)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Population.set_sink_control">
<code class="descname">set_sink_control</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.set_sink_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Population.set_sink_control" title="Permalink to this definition">¶</a></dt>
<dd><p>localization of sink modules</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Population.set_src_control">
<code class="descname">set_src_control</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Population.set_src_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Population.set_src_control" title="Permalink to this definition">¶</a></dt>
<dd><p>Stores the drivers of each message generator.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>values (dict):</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Statical">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Statical</code><span class="sig-paren">(</span><em>name</em>, <em>activation_dist=None</em>, <em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Statical"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Statical" title="Permalink to this definition">¶</a></dt>
<dd><p>This implementation of a population algorithm statically assigns the generation of a source in a node of the topology. It is only invoked in the initialization.</p>
<p>Extends: :mod: Population</p>
<dl class="method">
<dt id="yafs.Statical.get_next_activation">
<code class="descname">get_next_activation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#yafs.Statical.get_next_activation" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>the next time to be activated in the simulation</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Statical.initial_allocation">
<code class="descname">initial_allocation</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/population.html#Statical.initial_allocation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Statical.initial_allocation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Statical.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>sim</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.Statical.run" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be invoked during the simulation to change the assignment of the modules that generate the messages.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>sim (:mod: yafs.core.Sim)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Statical.set_sink_control">
<code class="descname">set_sink_control</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.Statical.set_sink_control" title="Permalink to this definition">¶</a></dt>
<dd><p>localization of sink modules</p>
</dd></dl>

<dl class="method">
<dt id="yafs.Statical.set_src_control">
<code class="descname">set_src_control</code><span class="sig-paren">(</span><em>values</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.Statical.set_src_control" title="Permalink to this definition">¶</a></dt>
<dd><p>Stores the drivers of each message generator.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>values (dict):</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Placement">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Placement</code><span class="sig-paren">(</span><em>name</em>, <em>activation_dist=None</em>, <em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#Placement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Placement" title="Permalink to this definition">¶</a></dt>
<dd><p>A placement (or allocation) algorithm controls where to locate the service modules and their replicas in the different nodes of the topology, according to load criteria, or other objectives.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">A class interface</p>
</div>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">name (str): associated name</p>
<p class="last">activation_dist (function): a distribution function to active the <em>run</em> function in execution time</p>
</dd>
<dt>Kwargs:</dt>
<dd>param (dict): the parameters of the <em>activation_dist</em></dd>
</dl>
<dl class="method">
<dt id="yafs.Placement.get_next_activation">
<code class="descname">get_next_activation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#Placement.get_next_activation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Placement.get_next_activation" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>the next time to be activated</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Placement.initial_allocation">
<code class="descname">initial_allocation</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#Placement.initial_allocation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Placement.initial_allocation" title="Permalink to this definition">¶</a></dt>
<dd><p>Given an ecosystem, it starts the allocation of modules in the topology.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>sim (:mod:yafs.core.Sim)
app_name (String)</dd>
</dl>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">override required</p>
</div>
</dd></dl>

<dl class="method">
<dt id="yafs.Placement.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>sim</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#Placement.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Placement.run" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be invoked during the simulation to change the assignment of the modules to the topology</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>sim (:mod: yafs.core.Sim)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.Placement.scaleService">
<code class="descname">scaleService</code><span class="sig-paren">(</span><em>scale</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#Placement.scaleService"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Placement.scaleService" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.ClusterPlacement">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">ClusterPlacement</code><span class="sig-paren">(</span><em>name</em>, <em>activation_dist=None</em>, <em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#ClusterPlacement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.ClusterPlacement" title="Permalink to this definition">¶</a></dt>
<dd><p>This implementation locates the services of the application in the cheapest cluster regardless of where the sources or sinks are located.</p>
<p>It only runs once, in the initialization.</p>
<dl class="method">
<dt id="yafs.ClusterPlacement.get_next_activation">
<code class="descname">get_next_activation</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#yafs.ClusterPlacement.get_next_activation" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>the next time to be activated</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.ClusterPlacement.initial_allocation">
<code class="descname">initial_allocation</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/placement.html#ClusterPlacement.initial_allocation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.ClusterPlacement.initial_allocation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.ClusterPlacement.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>sim</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.ClusterPlacement.run" title="Permalink to this definition">¶</a></dt>
<dd><p>This method will be invoked during the simulation to change the assignment of the modules to the topology</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>sim (:mod: yafs.core.Sim)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.ClusterPlacement.scaleService">
<code class="descname">scaleService</code><span class="sig-paren">(</span><em>scale</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.ClusterPlacement.scaleService" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Selection">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Selection</code><span class="sig-paren">(</span><em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#Selection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Selection" title="Permalink to this definition">¶</a></dt>
<dd><p>A selection algorithm provide the route among topology entities for that a message reach the destiny module.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">A class interface</p>
</div>
<dl class="method">
<dt id="yafs.Selection.get_path">
<code class="descname">get_path</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em>, <em>message</em>, <em>topology_src</em>, <em>alloc_DES</em>, <em>alloc_module</em>, <em>traffic</em>, <em>from_des</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#Selection.get_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Selection.get_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Args:</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>sim</strong> – </li>
<li><strong>message</strong> – </li>
<li><strong>link</strong> – </li>
<li><strong>alloc_DES</strong> – </li>
<li><strong>alloc_module</strong> – </li>
<li><strong>traffic</strong> – </li>
<li><strong>ctime</strong> – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:param from_des
:return:</p>
<blockquote>
<div>both empty arrays implies that the message will not send to the destination.</div></blockquote>
<p>Returns:</p>
<blockquote>
<div><p>a path among nodes</p>
<p>an identifier of the module</p>
</div></blockquote>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">override required</p>
</div>
</dd></dl>

<dl class="method">
<dt id="yafs.Selection.get_path_from_failure">
<code class="descname">get_path_from_failure</code><span class="sig-paren">(</span><em>sim</em>, <em>message</em>, <em>link</em>, <em>alloc_DES</em>, <em>alloc_module</em>, <em>traffic</em>, <em>ctime</em>, <em>from_des</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#Selection.get_path_from_failure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Selection.get_path_from_failure" title="Permalink to this definition">¶</a></dt>
<dd><p>This function is call when some link of a message path is broken or unavailable. A new one from that point should be calculated.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>sim</strong> – </li>
<li><strong>message</strong> – </li>
<li><strong>link</strong> – </li>
<li><strong>alloc_DES</strong> – </li>
<li><strong>alloc_module</strong> – </li>
<li><strong>traffic</strong> – </li>
<li><strong>ctime</strong> – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:param from_des
:return:</p>
<blockquote>
<div>both empty arrays implies that the message will not send to the destination.</div></blockquote>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">this function is optional</p>
</div>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.OneRandomPath">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">OneRandomPath</code><span class="sig-paren">(</span><em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#OneRandomPath"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.OneRandomPath" title="Permalink to this definition">¶</a></dt>
<dd><p>Among all the possible options, it returns a random path.</p>
<dl class="method">
<dt id="yafs.OneRandomPath.get_path">
<code class="descname">get_path</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em>, <em>message</em>, <em>topology_src</em>, <em>alloc_DES</em>, <em>alloc_module</em>, <em>traffic</em>, <em>from_des</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#OneRandomPath.get_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.OneRandomPath.get_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.OneRandomPath.get_path_from_failure">
<code class="descname">get_path_from_failure</code><span class="sig-paren">(</span><em>sim</em>, <em>message</em>, <em>link</em>, <em>alloc_DES</em>, <em>alloc_module</em>, <em>traffic</em>, <em>ctime</em>, <em>from_des</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.OneRandomPath.get_path_from_failure" title="Permalink to this definition">¶</a></dt>
<dd><p>This function is call when some link of a message path is broken or unavailable. A new one from that point should be calculated.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>sim</strong> – </li>
<li><strong>message</strong> – </li>
<li><strong>link</strong> – </li>
<li><strong>alloc_DES</strong> – </li>
<li><strong>alloc_module</strong> – </li>
<li><strong>traffic</strong> – </li>
<li><strong>ctime</strong> – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:param from_des
:return:</p>
<blockquote>
<div>both empty arrays implies that the message will not send to the destination.</div></blockquote>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">this function is optional</p>
</div>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.First_ShortestPath">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">First_ShortestPath</code><span class="sig-paren">(</span><em>logger=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#First_ShortestPath"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.First_ShortestPath" title="Permalink to this definition">¶</a></dt>
<dd><p>Among all possible shorter paths, returns the first.</p>
<dl class="method">
<dt id="yafs.First_ShortestPath.get_path">
<code class="descname">get_path</code><span class="sig-paren">(</span><em>sim</em>, <em>app_name</em>, <em>message</em>, <em>topology_src</em>, <em>alloc_DES</em>, <em>alloc_module</em>, <em>traffic</em>, <em>from_des</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/selection.html#First_ShortestPath.get_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.First_ShortestPath.get_path" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.First_ShortestPath.get_path_from_failure">
<code class="descname">get_path_from_failure</code><span class="sig-paren">(</span><em>sim</em>, <em>message</em>, <em>link</em>, <em>alloc_DES</em>, <em>alloc_module</em>, <em>traffic</em>, <em>ctime</em>, <em>from_des</em><span class="sig-paren">)</span><a class="headerlink" href="#yafs.First_ShortestPath.get_path_from_failure" title="Permalink to this definition">¶</a></dt>
<dd><p>This function is call when some link of a message path is broken or unavailable. A new one from that point should be calculated.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>sim</strong> – </li>
<li><strong>message</strong> – </li>
<li><strong>link</strong> – </li>
<li><strong>alloc_DES</strong> – </li>
<li><strong>alloc_module</strong> – </li>
<li><strong>traffic</strong> – </li>
<li><strong>ctime</strong> – </li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>:param from_des
:return:</p>
<blockquote>
<div>both empty arrays implies that the message will not send to the destination.</div></blockquote>
<div class="admonition attention">
<p class="first admonition-title">Attention</p>
<p class="last">this function is optional</p>
</div>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Metrics">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Metrics</code><span class="sig-paren">(</span><em>default_results_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/metrics.html#Metrics"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Metrics" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="yafs.Metrics.TIME_LATENCY">
<code class="descname">TIME_LATENCY</code><em class="property"> = 'time_latency'</em><a class="headerlink" href="#yafs.Metrics.TIME_LATENCY" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Metrics.TIME_RESPONSE">
<code class="descname">TIME_RESPONSE</code><em class="property"> = 'time_response'</em><a class="headerlink" href="#yafs.Metrics.TIME_RESPONSE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Metrics.TIME_SERVICE">
<code class="descname">TIME_SERVICE</code><em class="property"> = 'time_service'</em><a class="headerlink" href="#yafs.Metrics.TIME_SERVICE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Metrics.TIME_TOTAL_RESPONSE">
<code class="descname">TIME_TOTAL_RESPONSE</code><em class="property"> = 'time_total_response'</em><a class="headerlink" href="#yafs.Metrics.TIME_TOTAL_RESPONSE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Metrics.TIME_WAIT">
<code class="descname">TIME_WAIT</code><em class="property"> = 'time_wait'</em><a class="headerlink" href="#yafs.Metrics.TIME_WAIT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Metrics.WATT_SERVICE">
<code class="descname">WATT_SERVICE</code><em class="property"> = 'byService'</em><a class="headerlink" href="#yafs.Metrics.WATT_SERVICE" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.Metrics.WATT_UPTIME">
<code class="descname">WATT_UPTIME</code><em class="property"> = 'byUptime'</em><a class="headerlink" href="#yafs.Metrics.WATT_UPTIME" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Metrics.close">
<code class="descname">close</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/metrics.html#Metrics.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Metrics.close" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Metrics.insert">
<code class="descname">insert</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/metrics.html#Metrics.insert"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Metrics.insert" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.Metrics.insert_link">
<code class="descname">insert_link</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/metrics.html#Metrics.insert_link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Metrics.insert_link" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.Distribution">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">Distribution</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/distribution.html#Distribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Distribution" title="Permalink to this definition">¶</a></dt>
<dd><p>Abstract class</p>
<dl class="method">
<dt id="yafs.Distribution.next">
<code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/distribution.html#Distribution.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.Distribution.next" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.deterministic_distribution">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">deterministic_distribution</code><span class="sig-paren">(</span><em>time</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/distribution.html#deterministic_distribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.deterministic_distribution" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="yafs.deterministic_distribution.next">
<code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/distribution.html#deterministic_distribution.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.deterministic_distribution.next" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="yafs.exponential_distribution">
<em class="property">class </em><code class="descclassname">yafs.</code><code class="descname">exponential_distribution</code><span class="sig-paren">(</span><em>lambd</em>, <em>seed=1</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/distribution.html#exponential_distribution"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.exponential_distribution" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="yafs.exponential_distribution.next">
<code class="descname">next</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/distribution.html#exponential_distribution.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.exponential_distribution.next" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">OVERVIEW</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#acknowledge">Acknowledge</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/index.html">YAFS in 5 Minutes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/index.html">Examples</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">API REFERENCE</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">yafs</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="#core">Core</a></li>
<li class="toctree-l3"><a class="reference internal" href="#topology">Topology</a></li>
<li class="toctree-l3"><a class="reference internal" href="#application">Application</a></li>
<li class="toctree-l3"><a class="reference internal" href="#population">Population</a></li>
<li class="toctree-l3"><a class="reference internal" href="#placement">Placement</a></li>
<li class="toctree-l3"><a class="reference internal" href="#selection">Selection</a></li>
<li class="toctree-l3"><a class="reference internal" href="#metrics">Metrics</a></li>
<li class="toctree-l3"><a class="reference internal" href="#distribution">Distribution</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="yafs.core.html"><code class="docutils literal"><span class="pre">yafs.core</span></code> — Simulator engine</a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.topology.html"><code class="docutils literal"><span class="pre">yafs.topology</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.application.html"><code class="docutils literal"><span class="pre">yafs.application</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.population.html"><code class="docutils literal"><span class="pre">yafs.population</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.placement.html"><code class="docutils literal"><span class="pre">yafs.placement</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.selection.html"><code class="docutils literal"><span class="pre">yafs.selection</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.distribution.html"><code class="docutils literal"><span class="pre">yafs.distribution</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.stats.html"><code class="docutils literal"><span class="pre">yafs.stats</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.metrics.html"><code class="docutils literal"><span class="pre">yafs.metrics</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.utils.html"><code class="docutils literal"><span class="pre">yafs.utils</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../about/index.html">ABOUT</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../contents.html">Documentation overview</a><ul>
  <li><a href="index.html">API REFERENCE</a><ul>
      <li>Previous: <a href="index.html" title="previous chapter">API REFERENCE</a></li>
      <li>Next: <a href="yafs.core.html" title="next chapter"><code class="docutils literal"><span class="pre">yafs.core</span></code> — Simulator engine</a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2017, <NAME>, <NAME>.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
      |
      <a href="../_sources/api_reference/yafs.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>

<|start_filename|>docs/build/html/genindex.html<|end_filename|>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Index &#8212; YAFS 0.3 documentation</title>
    <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="#" />
    <link rel="search" title="Search" href="search.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            

<h1 id="index">Index</h1>

<div class="genindex-jumpbox">
 <a href="#A"><strong>A</strong></a>
 | <a href="#B"><strong>B</strong></a>
 | <a href="#C"><strong>C</strong></a>
 | <a href="#D"><strong>D</strong></a>
 | <a href="#E"><strong>E</strong></a>
 | <a href="#F"><strong>F</strong></a>
 | <a href="#G"><strong>G</strong></a>
 | <a href="#H"><strong>H</strong></a>
 | <a href="#I"><strong>I</strong></a>
 | <a href="#J"><strong>J</strong></a>
 | <a href="#L"><strong>L</strong></a>
 | <a href="#M"><strong>M</strong></a>
 | <a href="#N"><strong>N</strong></a>
 | <a href="#O"><strong>O</strong></a>
 | <a href="#P"><strong>P</strong></a>
 | <a href="#R"><strong>R</strong></a>
 | <a href="#S"><strong>S</strong></a>
 | <a href="#T"><strong>T</strong></a>
 | <a href="#U"><strong>U</strong></a>
 | <a href="#V"><strong>V</strong></a>
 | <a href="#W"><strong>W</strong></a>
 | <a href="#Y"><strong>Y</strong></a>
 
</div>
<h2 id="A">A</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.add_mobile_agent">add_mobile_agent() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.add_mobile_agent">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.add_node">add_node() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.add_node">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.add_service_module">add_service_module() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.add_service_module">(yafs.application.Application method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.add_service_source">add_service_source() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.add_service_source">(yafs.application.Application method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Application.add_source_messages">add_source_messages() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.add_source_messages">(yafs.application.Application method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.alloc_DES">alloc_DES (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.alloc_module">alloc_module (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.alloc_source">alloc_source (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Application">Application (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application">(class in yafs.application)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.average_loop_response">average_loop_response() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.average_messages_not_transmitted">average_messages_not_transmitted() (yafs.stats.Stats method)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="B">B</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.bytes_transmitted">bytes_transmitted() (yafs.stats.Stats method)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Metrics.close">close() (yafs.Metrics method)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.close">(yafs.metrics.Metrics method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.ClusterPlacement">ClusterPlacement (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.ClusterPlacement">(class in yafs.placement)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.compute_times_df">compute_times_df() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.count_messages">count_messages() (yafs.stats.Stats method)</a>
</li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.create_points">create_points() (in module yafs.utils)</a>
</li>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.create_pos">create_pos() (in module yafs.utils)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Topology.create_random_topology">create_random_topology() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.create_random_topology">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.create_topology_from_graph">create_topology_from_graph() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.create_topology_from_graph">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.deploy_app">deploy_app() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.deploy_app">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.deploy_module">deploy_module() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.deploy_module">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.deploy_monitor">deploy_monitor() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.deploy_monitor">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.deploy_sink">deploy_sink() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.deploy_sink">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.deploy_source">deploy_source() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.deploy_source">(yafs.Sim method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.deterministic_distribution">deterministic_distribution (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.deterministic_distribution">(class in yafs.distribution)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.distribution.html#yafs.distribution.deterministicDistribution">deterministicDistribution (class in yafs.distribution)</a>
</li>
      <li><a href="api_reference/yafs.distribution.html#yafs.distribution.deterministicDistributionStartPoint">deterministicDistributionStartPoint (class in yafs.distribution)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Distribution">Distribution (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.Distribution">(class in yafs.distribution)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.draw_allocated_topology">draw_allocated_topology() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.draw_allocated_topology">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.draw_png">draw_png() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.draw_png">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.draw_topology">draw_topology() (in module yafs.utils)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="E">E</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.placement.html#yafs.placement.EdgePlacement">EdgePlacement (class in yafs.placement)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.entity_metrics">entity_metrics (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.env">env (yafs.core.Sim attribute)</a>
</li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.exponential_distribution">exponential_distribution (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.exponential_distribution">(class in yafs.distribution)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.distribution.html#yafs.distribution.exponentialDistribution">exponentialDistribution (class in yafs.distribution)</a>
</li>
      <li><a href="api_reference/yafs.distribution.html#yafs.distribution.exponentialDistributionStartPoint">exponentialDistributionStartPoint (class in yafs.distribution)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="F">F</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Topology.find_IDs">find_IDs() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.find_IDs">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.First_ShortestPath">First_ShortestPath (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.First_ShortestPath">(class in yafs.selection)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.FORWARD_METRIC">FORWARD_METRIC (yafs.core.Sim attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.FORWARD_METRIC">(yafs.Sim attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.fractional_selectivity">fractional_selectivity() (in module yafs.utils)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.generate_animation">generate_animation() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.generate_animation">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.get_alloc_entities">get_alloc_entities() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.get_alloc_entities">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.get_assigned_structured_modules_from_DES">get_assigned_structured_modules_from_DES() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.get_assigned_structured_modules_from_DES">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.get_DES">get_DES() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.get_DES">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.get_DES_from_Service_In_Node">get_DES_from_Service_In_Node() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.get_DES_from_Service_In_Node">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.get_df_modules">get_df_modules() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.get_df_service_utilization">get_df_service_utilization() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Topology.get_edge">get_edge() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.get_edge">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.get_edges">get_edges() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.get_edges">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.get_info">get_info() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.get_info">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.get_message">get_message() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.get_message">(yafs.application.Application method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.ClusterPlacement.get_next_activation">get_next_activation() (yafs.ClusterPlacement method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Placement.get_next_activation">(yafs.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Population.get_next_activation">(yafs.Population method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Statical.get_next_activation">(yafs.Statical method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.ClusterPlacement.get_next_activation">(yafs.placement.ClusterPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.EdgePlacement.get_next_activation">(yafs.placement.EdgePlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacement.get_next_activation">(yafs.placement.JSONPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacementOnCloud.get_next_activation">(yafs.placement.JSONPlacementOnCloud method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.NoPlacementOfModules.get_next_activation">(yafs.placement.NoPlacementOfModules method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.Placement.get_next_activation">(yafs.placement.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.population.html#yafs.population.Population.get_next_activation">(yafs.population.Population method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Topology.get_node">get_node() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.get_node">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.get_nodes">get_nodes() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.get_nodes">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.get_nodes_att">get_nodes_att() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.get_nodes_att">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.First_ShortestPath.get_path">get_path() (yafs.First_ShortestPath method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.OneRandomPath.get_path">(yafs.OneRandomPath method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Selection.get_path">(yafs.Selection method)</a>
</li>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.First_ShortestPath.get_path">(yafs.selection.First_ShortestPath method)</a>
</li>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.OneRandomPath.get_path">(yafs.selection.OneRandomPath method)</a>
</li>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.Selection.get_path">(yafs.selection.Selection method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.First_ShortestPath.get_path_from_failure">get_path_from_failure() (yafs.First_ShortestPath method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.OneRandomPath.get_path_from_failure">(yafs.OneRandomPath method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Selection.get_path_from_failure">(yafs.Selection method)</a>
</li>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.First_ShortestPath.get_path_from_failure">(yafs.selection.First_ShortestPath method)</a>
</li>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.OneRandomPath.get_path_from_failure">(yafs.selection.OneRandomPath method)</a>
</li>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.Selection.get_path_from_failure">(yafs.selection.Selection method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.get_pure_modules">get_pure_modules() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.get_pure_modules">(yafs.application.Application method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.get_random_node">get_random_node() (in module yafs.utils)</a>
</li>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.get_shortest_random_path">get_shortest_random_path() (in module yafs.utils)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Application.get_sink_modules">get_sink_modules() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.get_sink_modules">(yafs.application.Application method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.get_watt">get_watt() (yafs.stats.Stats method)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="H">H</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.haversine_distance">haversine_distance() (in module yafs.utils)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="I">I</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.ClusterPlacement.initial_allocation">initial_allocation() (yafs.ClusterPlacement method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Placement.initial_allocation">(yafs.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Population.initial_allocation">(yafs.Population method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Statical.initial_allocation">(yafs.Statical method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.ClusterPlacement.initial_allocation">(yafs.placement.ClusterPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.EdgePlacement.initial_allocation">(yafs.placement.EdgePlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacement.initial_allocation">(yafs.placement.JSONPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacementOnCloud.initial_allocation">(yafs.placement.JSONPlacementOnCloud method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.NoPlacementOfModules.initial_allocation">(yafs.placement.NoPlacementOfModules method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.Placement.initial_allocation">(yafs.placement.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.population.html#yafs.population.Population.initial_allocation">(yafs.population.Population method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Metrics.insert">insert() (yafs.Metrics method)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.insert">(yafs.metrics.Metrics method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Metrics.insert_link">insert_link() (yafs.Metrics method)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.insert_link">(yafs.metrics.Metrics method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="J">J</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacement">JSONPlacement (class in yafs.placement)</a>
</li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacementOnCloud">JSONPlacementOnCloud (class in yafs.placement)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.last_busy_time">last_busy_time (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Topology.LINK_BW">LINK_BW (yafs.Topology attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.LINK_BW">(yafs.topology.Topology attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.LINK_METRIC">LINK_METRIC (yafs.core.Sim attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.LINK_METRIC">(yafs.Sim attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.LINK_PR">LINK_PR (yafs.Topology attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.LINK_PR">(yafs.topology.Topology attribute)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Topology.load">load() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.load">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.load_all_node_attr">load_all_node_attr() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.load_all_node_attr">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.load_graphml">load_graphml() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.load_graphml">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.load_user_tracks">load_user_tracks() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.load_user_tracks">(yafs.Sim method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Message">Message (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Message">(class in yafs.application)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.messages_not_transmitted">messages_not_transmitted() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Metrics">Metrics (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics">(class in yafs.metrics)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.deterministic_distribution.next">next() (yafs.deterministic_distribution method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Distribution.next">(yafs.Distribution method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.Distribution.next">(yafs.distribution.Distribution method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.deterministicDistribution.next">(yafs.distribution.deterministicDistribution method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.deterministicDistributionStartPoint.next">(yafs.distribution.deterministicDistributionStartPoint method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.deterministic_distribution.next">(yafs.distribution.deterministic_distribution method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.exponentialDistribution.next">(yafs.distribution.exponentialDistribution method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.exponentialDistributionStartPoint.next">(yafs.distribution.exponentialDistributionStartPoint method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.exponential_distribution.next">(yafs.distribution.exponential_distribution method)</a>
</li>
        <li><a href="api_reference/yafs.distribution.html#yafs.distribution.uniformDistribution.next">(yafs.distribution.uniformDistribution method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.exponential_distribution.next">(yafs.exponential_distribution method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Topology.NODE_IPT">NODE_IPT (yafs.Topology attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.NODE_IPT">(yafs.topology.Topology attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.NODE_METRIC">NODE_METRIC (yafs.core.Sim attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.NODE_METRIC">(yafs.Sim attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.placement.html#yafs.placement.NoPlacementOfModules">NoPlacementOfModules (class in yafs.placement)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.OneRandomPath">OneRandomPath (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.OneRandomPath">(class in yafs.selection)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.peak_messages_not_transmitted">peak_messages_not_transmitted() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Placement">Placement (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.Placement">(class in yafs.placement)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Population">Population (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.population.html#yafs.population.Population">(class in yafs.population)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.print_debug_assignaments">print_debug_assignaments() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.print_debug_assignaments">(yafs.Sim method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="R">R</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.register_event_entity">register_event_entity() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.register_event_entity">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.remove_node">remove_node() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.remove_node">(yafs.Sim method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Topology.remove_node">(yafs.Topology method)</a>
</li>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.remove_node">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.ClusterPlacement.run">run() (yafs.ClusterPlacement method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Placement.run">(yafs.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Population.run">(yafs.Population method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Sim.run">(yafs.Sim method)</a>
</li>
        <li><a href="api_reference/yafs.html#yafs.Statical.run">(yafs.Statical method)</a>
</li>
        <li><a href="api_reference/yafs.core.html#yafs.core.Sim.run">(yafs.core.Sim method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.ClusterPlacement.run">(yafs.placement.ClusterPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.EdgePlacement.run">(yafs.placement.EdgePlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacement.run">(yafs.placement.JSONPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacementOnCloud.run">(yafs.placement.JSONPlacementOnCloud method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.NoPlacementOfModules.run">(yafs.placement.NoPlacementOfModules method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.Placement.run">(yafs.placement.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.population.html#yafs.population.Population.run">(yafs.population.Population method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="S">S</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.ClusterPlacement.scaleService">scaleService() (yafs.ClusterPlacement method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Placement.scaleService">(yafs.Placement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.ClusterPlacement.scaleService">(yafs.placement.ClusterPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.EdgePlacement.scaleService">(yafs.placement.EdgePlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacement.scaleService">(yafs.placement.JSONPlacement method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.JSONPlacementOnCloud.scaleService">(yafs.placement.JSONPlacementOnCloud method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.NoPlacementOfModules.scaleService">(yafs.placement.NoPlacementOfModules method)</a>
</li>
        <li><a href="api_reference/yafs.placement.html#yafs.placement.Placement.scaleService">(yafs.placement.Placement method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Selection">Selection (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.selection.html#yafs.selection.Selection">(class in yafs.selection)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.set_coverage_class">set_coverage_class() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.set_coverage_class">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.set_mobile_fog_entities">set_mobile_fog_entities() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.set_mobile_fog_entities">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.set_modules">set_modules() (yafs.Application method)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.set_modules">(yafs.application.Application method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.set_movement_control">set_movement_control() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.set_movement_control">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Population.set_sink_control">set_sink_control() (yafs.Population method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Statical.set_sink_control">(yafs.Statical method)</a>
</li>
        <li><a href="api_reference/yafs.population.html#yafs.population.Population.set_sink_control">(yafs.population.Population method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Population.set_src_control">set_src_control() (yafs.Population method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Statical.set_src_control">(yafs.Statical method)</a>
</li>
        <li><a href="api_reference/yafs.population.html#yafs.population.Population.set_src_control">(yafs.population.Population method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.showLoops">showLoops() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.showResults">showResults() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.showResults2">showResults2() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Sim">Sim (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.core.html#yafs.core.Sim">(class in yafs.core)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.SINK_METRIC">SINK_METRIC (yafs.core.Sim attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.SINK_METRIC">(yafs.Sim attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Topology.size">size() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.size">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.SOURCE_METRIC">SOURCE_METRIC (yafs.core.Sim attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.SOURCE_METRIC">(yafs.Sim attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.start_process">start_process() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.start_process">(yafs.Sim method)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Statical">Statical (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.population.html#yafs.population.Statical">(class in yafs.population)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats">Stats (class in yafs.stats)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.stop">stop (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.stop_process">stop_process() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.stop_process">(yafs.Sim method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="T">T</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Metrics.TIME_LATENCY">TIME_LATENCY (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.TIME_LATENCY">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Metrics.TIME_RESPONSE">TIME_RESPONSE (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.TIME_RESPONSE">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Metrics.TIME_SERVICE">TIME_SERVICE (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.TIME_SERVICE">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Metrics.TIME_TOTAL_RESPONSE">TIME_TOTAL_RESPONSE (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.TIME_TOTAL_RESPONSE">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Metrics.TIME_WAIT">TIME_WAIT (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.TIME_WAIT">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.times">times() (yafs.stats.Stats method)</a>
</li>
      <li><a href="api_reference/yafs.utils.html#yafs.utils.toMeters">toMeters() (in module yafs.utils)</a>
</li>
      <li><a href="api_reference/yafs.html#yafs.Topology">Topology (class in yafs)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology">(class in yafs.topology)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.TYPE_MODULE">TYPE_MODULE (yafs.Application attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.TYPE_MODULE">(yafs.application.Application attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.TYPE_SINK">TYPE_SINK (yafs.Application attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.TYPE_SINK">(yafs.application.Application attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Application.TYPE_SOURCE">TYPE_SOURCE (yafs.Application attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.application.html#yafs.application.Application.TYPE_SOURCE">(yafs.application.Application attribute)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="U">U</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.undeploy_module">undeploy_module() (yafs.core.Sim method)</a>

      <ul>
        <li><a href="api_reference/yafs.html#yafs.Sim.undeploy_module">(yafs.Sim method)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.distribution.html#yafs.distribution.uniformDistribution">uniformDistribution (class in yafs.distribution)</a>
</li>
      <li><a href="api_reference/yafs.core.html#yafs.core.Sim.unreachabled_links">unreachabled_links (yafs.core.Sim attribute)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.utilization">utilization() (yafs.stats.Stats method)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.stats.html#yafs.stats.Stats.valueLoop">valueLoop() (yafs.stats.Stats method)</a>
</li>
  </ul></td>
</tr></table>

<h2 id="W">W</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Metrics.WATT_SERVICE">WATT_SERVICE (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.WATT_SERVICE">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
      <li><a href="api_reference/yafs.html#yafs.Metrics.WATT_UPTIME">WATT_UPTIME (yafs.Metrics attribute)</a>

      <ul>
        <li><a href="api_reference/yafs.metrics.html#yafs.metrics.Metrics.WATT_UPTIME">(yafs.metrics.Metrics attribute)</a>
</li>
      </ul></li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#yafs.Topology.write">write() (yafs.Topology method)</a>

      <ul>
        <li><a href="api_reference/yafs.topology.html#yafs.topology.Topology.write">(yafs.topology.Topology method)</a>
</li>
      </ul></li>
  </ul></td>
</tr></table>

<h2 id="Y">Y</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.html#module-yafs">yafs (module)</a>
</li>
      <li><a href="api_reference/yafs.application.html#module-yafs.application">yafs.application (module)</a>
</li>
      <li><a href="api_reference/yafs.core.html#module-yafs.core">yafs.core (module)</a>
</li>
      <li><a href="api_reference/yafs.distribution.html#module-yafs.distribution">yafs.distribution (module)</a>
</li>
      <li><a href="api_reference/yafs.metrics.html#module-yafs.metrics">yafs.metrics (module)</a>
</li>
  </ul></td>
  <td style="width: 33%; vertical-align: top;"><ul>
      <li><a href="api_reference/yafs.placement.html#module-yafs.placement">yafs.placement (module)</a>
</li>
      <li><a href="api_reference/yafs.population.html#module-yafs.population">yafs.population (module)</a>
</li>
      <li><a href="api_reference/yafs.selection.html#module-yafs.selection">yafs.selection (module)</a>
</li>
      <li><a href="api_reference/yafs.stats.html#module-yafs.stats">yafs.stats (module)</a>
</li>
      <li><a href="api_reference/yafs.topology.html#module-yafs.topology">yafs.topology (module)</a>
</li>
      <li><a href="api_reference/yafs.utils.html#module-yafs.utils">yafs.utils (module)</a>
</li>
  </ul></td>
</tr></table>



          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h3><a href="contents.html">Table Of Contents</a></h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">OVERVIEW</a></li>
<li class="toctree-l1"><a class="reference internal" href="index.html#acknowledge">Acknowledge</a></li>
<li class="toctree-l1"><a class="reference internal" href="introduction/index.html">YAFS in 5 Minutes</a></li>
<li class="toctree-l1"><a class="reference internal" href="architecture/index.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples/index.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_reference/index.html">API REFERENCE</a></li>
<li class="toctree-l1"><a class="reference internal" href="about/index.html">ABOUT</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="contents.html">Documentation overview</a><ul>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2017, <NAME>, <NAME>.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
    </div>

    

    
  </body>
</html>

<|start_filename|>docs/build/html/api_reference/yafs.core.html<|end_filename|>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>yafs.core — Simulator engine &#8212; YAFS 0.3 documentation</title>
    <link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="yafs.topology" href="yafs.topology.html" />
    <link rel="prev" title="yafs" href="yafs.html" />
   
  <link rel="stylesheet" href="../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-yafs.core">
<span id="yafs-core-simulator-engine"></span><h1><code class="docutils literal"><span class="pre">yafs.core</span></code> — Simulator engine<a class="headerlink" href="#module-yafs.core" title="Permalink to this headline">¶</a></h1>
<p>This module unifies the event-discrete simulation environment with the rest of modules: placement, topology, selection, population, utils and metrics.</p>
<dl class="class">
<dt id="yafs.core.Sim">
<em class="property">class </em><code class="descclassname">yafs.core.</code><code class="descname">Sim</code><span class="sig-paren">(</span><em>topology</em>, <em>name_register='events_log.json'</em>, <em>link_register='links_log.json'</em>, <em>redis=None</em>, <em>purge_register=True</em>, <em>logger=None</em>, <em>default_results_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim" title="Permalink to this definition">¶</a></dt>
<dd><p>This class contains the cloud event-discrete simulation environment and it controls the structure variables.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>topology (object) - the associate (<code class="xref py py-mod docutils literal"><span class="pre">Topology</span></code>) of the environment. There is only one.</dd>
<dt>Kwargs:</dt>
<dd><p class="first">name_register (str): database file name where are registered the events.</p>
<p>purge_register (boolean): True - clean the database</p>
<p class="last">logger (logger) - logger</p>
</dd>
</dl>
<p><strong>Main variables to coordinate with algorithm:</strong></p>
<dl class="attribute">
<dt id="yafs.core.Sim.FORWARD_METRIC">
<code class="descname">FORWARD_METRIC</code><em class="property"> = 'FWD_M'</em><a class="headerlink" href="#yafs.core.Sim.FORWARD_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.LINK_METRIC">
<code class="descname">LINK_METRIC</code><em class="property"> = 'LINK'</em><a class="headerlink" href="#yafs.core.Sim.LINK_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.NODE_METRIC">
<code class="descname">NODE_METRIC</code><em class="property"> = 'COMP_M'</em><a class="headerlink" href="#yafs.core.Sim.NODE_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.SINK_METRIC">
<code class="descname">SINK_METRIC</code><em class="property"> = 'SINK_M'</em><a class="headerlink" href="#yafs.core.Sim.SINK_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.SOURCE_METRIC">
<code class="descname">SOURCE_METRIC</code><em class="property"> = 'SRC_M'</em><a class="headerlink" href="#yafs.core.Sim.SOURCE_METRIC" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.add_mobile_agent">
<code class="descname">add_mobile_agent</code><span class="sig-paren">(</span><em>gme</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.add_mobile_agent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.add_mobile_agent" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.alloc_DES">
<code class="descname">alloc_DES</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.alloc_DES" title="Permalink to this definition">¶</a></dt>
<dd><p>The relationship between DES process and topology.node.id</p>
<p>It is necessary to identify the message.source (topology.node)
1.N. DES process -&gt; 1. topology.node</p>
</dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.alloc_module">
<code class="descname">alloc_module</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.alloc_module" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents the deployment of a module in a DES PROCESS each DES has a one topology.node.id (see alloc_des var.)</p>
<p>It used for (<code class="xref py py-mod docutils literal"><span class="pre">Placement</span></code>) class interaction.</p>
<p>A dictionary where the key is an app.name and value is a dictionary with key is a module and value an array of id DES process</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="p">{</span><span class="s2">&quot;EGG_GAME&quot;</span><span class="p">:{</span><span class="s2">&quot;Controller&quot;</span><span class="p">:[</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">],</span><span class="s2">&quot;Client&quot;</span><span class="p">:[</span><span class="mi">4</span><span class="p">]}}</span>
</pre></div>
</div>
</dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.alloc_source">
<code class="descname">alloc_source</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.alloc_source" title="Permalink to this definition">¶</a></dt>
<dd><p>Relationship of pure source with topology entity</p>
<p>id.source.process -&gt; value: dict(“id”,”app”,”module”)</p>
<blockquote>
<div><div class="highlight-python"><div class="highlight"><pre><span></span><span class="n">alloc_source</span><span class="p">[</span><span class="mi">34</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span><span class="n">id_node</span><span class="p">,</span><span class="s2">&quot;app&quot;</span><span class="p">:</span><span class="n">app_name</span><span class="p">,</span><span class="s2">&quot;module&quot;</span><span class="p">:</span><span class="n">source</span> <span class="n">module</span><span class="p">}</span>
</pre></div>
</div>
</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.deploy_app">
<code class="descname">deploy_app</code><span class="sig-paren">(</span><em>app</em>, <em>placement</em>, <em>population</em>, <em>selector</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_app"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.deploy_app" title="Permalink to this definition">¶</a></dt>
<dd><p>This process is responsible for linking the <em>application</em> to the different algorithms (placement, population, and service)</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">app (object): <code class="xref py py-mod docutils literal"><span class="pre">Application</span></code> class</p>
<p>placement (object): <code class="xref py py-mod docutils literal"><span class="pre">Placement</span></code> class</p>
<p>population (object): <code class="xref py py-mod docutils literal"><span class="pre">Population</span></code> class</p>
<p class="last">selector (object): <code class="xref py py-mod docutils literal"><span class="pre">Selector</span></code> class</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.deploy_module">
<code class="descname">deploy_module</code><span class="sig-paren">(</span><em>app_name</em>, <em>module</em>, <em>services</em>, <em>ids</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.deploy_module" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.deploy_monitor">
<code class="descname">deploy_monitor</code><span class="sig-paren">(</span><em>name</em>, <em>function</em>, <em>distribution</em>, <em>**param</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_monitor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.deploy_monitor" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a DES process for user purpose</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">name (string) name of monitor</p>
<p>function (function): function that will be invoked within the simulator with the user’s code</p>
<p class="last">distribution (function): a temporary distribution function</p>
</dd>
<dt>Kwargs:</dt>
<dd>param (dict): the parameters of the <em>distribution</em> function</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.deploy_sink">
<code class="descname">deploy_sink</code><span class="sig-paren">(</span><em>app_name</em>, <em>node</em>, <em>module</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_sink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.deploy_sink" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a DES process for deploy pure SINK modules (actuators)
This function its used by (<code class="xref py py-mod docutils literal"><span class="pre">Placement</span></code>): algorithm
Internatlly, there is not a DES PROCESS for this type of behaviour</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">app_name (str): application name</p>
<p>node (int): entity.id of the topology who will create the messages</p>
<p class="last">module (str): module</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.deploy_source">
<code class="descname">deploy_source</code><span class="sig-paren">(</span><em>app_name</em>, <em>id_node</em>, <em>msg</em>, <em>distribution</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.deploy_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.deploy_source" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a DES process for deploy pure source modules (sensors)
This function its used by (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">app_name (str): application name</p>
<p>id_node (int): entity.id of the topology who will create the messages</p>
<p class="last">distribution (function): a temporary distribution function</p>
</dd>
<dt>Kwargs:</dt>
<dd>param - the parameters of the <em>distribution</em> function</dd>
<dt>Returns:</dt>
<dd>id (int) the same input <em>id</em></dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.draw_allocated_topology">
<code class="descname">draw_allocated_topology</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.draw_allocated_topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.draw_allocated_topology" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.entity_metrics">
<code class="descname">entity_metrics</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.entity_metrics" title="Permalink to this definition">¶</a></dt>
<dd><p>Current consumed metrics of each element topology: Nodes &amp; Edges</p>
</dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.env">
<code class="descname">env</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.env" title="Permalink to this definition">¶</a></dt>
<dd><p>the discrete-event simulator (aka DES)</p>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.generate_animation">
<code class="descname">generate_animation</code><span class="sig-paren">(</span><em>pathFile</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.generate_animation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.generate_animation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.get_DES">
<code class="descname">get_DES</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_DES"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.get_DES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.get_DES_from_Service_In_Node">
<code class="descname">get_DES_from_Service_In_Node</code><span class="sig-paren">(</span><em>node</em>, <em>app_name</em>, <em>service</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_DES_from_Service_In_Node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.get_DES_from_Service_In_Node" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.get_alloc_entities">
<code class="descname">get_alloc_entities</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_alloc_entities"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.get_alloc_entities" title="Permalink to this definition">¶</a></dt>
<dd><p>It returns a dictionary of deployed services
key : id-node
value: a list of deployed services</p>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.get_assigned_structured_modules_from_DES">
<code class="descname">get_assigned_structured_modules_from_DES</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.get_assigned_structured_modules_from_DES"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.get_assigned_structured_modules_from_DES" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.last_busy_time">
<code class="descname">last_busy_time</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.last_busy_time" title="Permalink to this definition">¶</a></dt>
<dd><p>MOBILE ADAPTATIONS</p>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.load_user_tracks">
<code class="descname">load_user_tracks</code><span class="sig-paren">(</span><em>tracks</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.load_user_tracks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.load_user_tracks" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.print_debug_assignaments">
<code class="descname">print_debug_assignaments</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.print_debug_assignaments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.print_debug_assignaments" title="Permalink to this definition">¶</a></dt>
<dd><p>This functions prints debug information about the assignment of DES process - Topology ID - Source Module or Modules</p>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.register_event_entity">
<code class="descname">register_event_entity</code><span class="sig-paren">(</span><em>next_event_dist</em>, <em>event_type='node_up'</em>, <em>**args</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.register_event_entity"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.register_event_entity" title="Permalink to this definition">¶</a></dt>
<dd><p>TODO</p>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.remove_node">
<code class="descname">remove_node</code><span class="sig-paren">(</span><em>id_node_topology</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.remove_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.remove_node" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.run">
<code class="descname">run</code><span class="sig-paren">(</span><em>until</em>, <em>test_initial_deploy=False</em>, <em>show_progress_monitor=True</em>, <em>mobile_behaviour=False</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Start the simulation</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>until (int): Defines a stop time. If None the simulation runs until some internal algorithm changes the var <em>yafs.core.sim.stop</em> to True</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.set_coverage_class">
<code class="descname">set_coverage_class</code><span class="sig-paren">(</span><em>class_name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.set_coverage_class"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.set_coverage_class" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.set_mobile_fog_entities">
<code class="descname">set_mobile_fog_entities</code><span class="sig-paren">(</span><em>mobile_fog_entities</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.set_mobile_fog_entities"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.set_mobile_fog_entities" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.set_movement_control">
<code class="descname">set_movement_control</code><span class="sig-paren">(</span><em>evol</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.set_movement_control"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.set_movement_control" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.start_process">
<code class="descname">start_process</code><span class="sig-paren">(</span><em>id</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.start_process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.start_process" title="Permalink to this definition">¶</a></dt>
<dd><p>All pure source modules (sensors) are controlled by this boolean.
Using this function (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm can start one source</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>id.source (int): the identifier of the DES process.</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.stop">
<code class="descname">stop</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.stop" title="Permalink to this definition">¶</a></dt>
<dd><p>Any algorithm can stop internally the simulation putting these value to True. By default is False.</p>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.stop_process">
<code class="descname">stop_process</code><span class="sig-paren">(</span><em>id</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.stop_process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.stop_process" title="Permalink to this definition">¶</a></dt>
<dd><p>All pure source modules (sensors) are controlled by this boolean.
Using this function (<code class="xref py py-mod docutils literal"><span class="pre">Population</span></code>) algorithm can stop one source</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>id.source (int): the identifier of the DES process.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="yafs.core.Sim.undeploy_module">
<code class="descname">undeploy_module</code><span class="sig-paren">(</span><em>app_name</em>, <em>service_name</em>, <em>idtopo</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/yafs/core.html#Sim.undeploy_module"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#yafs.core.Sim.undeploy_module" title="Permalink to this definition">¶</a></dt>
<dd><p>removes all modules deployed in a node
modules with the same name = service_name
from app_name
deployed in id_topo</p>
</dd></dl>

<dl class="attribute">
<dt id="yafs.core.Sim.unreachabled_links">
<code class="descname">unreachabled_links</code><em class="property"> = None</em><a class="headerlink" href="#yafs.core.Sim.unreachabled_links" title="Permalink to this definition">¶</a></dt>
<dd><p>Contains the database where all events are recorded</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h3><a href="../contents.html">Table Of Contents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">OVERVIEW</a></li>
<li class="toctree-l1"><a class="reference internal" href="../index.html#acknowledge">Acknowledge</a></li>
<li class="toctree-l1"><a class="reference internal" href="../introduction/index.html">YAFS in 5 Minutes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/index.html">Examples</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">API REFERENCE</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="yafs.html"><code class="docutils literal"><span class="pre">yafs</span></code></a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">yafs.core</span></code> — Simulator engine</a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.topology.html"><code class="docutils literal"><span class="pre">yafs.topology</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.application.html"><code class="docutils literal"><span class="pre">yafs.application</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.population.html"><code class="docutils literal"><span class="pre">yafs.population</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.placement.html"><code class="docutils literal"><span class="pre">yafs.placement</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.selection.html"><code class="docutils literal"><span class="pre">yafs.selection</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.distribution.html"><code class="docutils literal"><span class="pre">yafs.distribution</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.stats.html"><code class="docutils literal"><span class="pre">yafs.stats</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.metrics.html"><code class="docutils literal"><span class="pre">yafs.metrics</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="yafs.utils.html"><code class="docutils literal"><span class="pre">yafs.utils</span></code></a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../about/index.html">ABOUT</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../contents.html">Documentation overview</a><ul>
  <li><a href="index.html">API REFERENCE</a><ul>
      <li>Previous: <a href="yafs.html" title="previous chapter"><code class="docutils literal"><span class="pre">yafs</span></code></a></li>
      <li>Next: <a href="yafs.topology.html" title="next chapter"><code class="docutils literal"><span class="pre">yafs.topology</span></code></a></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2017, <NAME>, <NAME>.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
      
      |
      <a href="../_sources/api_reference/yafs.core.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>