| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <!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="X-UA-Compatible" content="IE=Edge" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>pypdevsbbl.extra.queues module — Python(P)DEVS-BBL documentation</title>
- <link rel="stylesheet" href="_static/nature.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
- <link rel="stylesheet" type="text/css" href="_static/custom.css" />
- <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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>
- <script type="text/javascript" src="_static/language_data.js"></script>
- <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
- <link rel="index" title="Index" href="genindex.html" />
- <link rel="search" title="Search" href="search.html" />
- <link rel="next" title="pypdevsbbl.extra.spatial module" href="pypdevsbbl.extra.spatial.html" />
- <link rel="prev" title="pypdevsbbl.extra.packaging module" href="pypdevsbbl.extra.packaging.html" />
- </head><body>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="pypdevsbbl.extra.spatial.html" title="pypdevsbbl.extra.spatial module"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="pypdevsbbl.extra.packaging.html" title="pypdevsbbl.extra.packaging module"
- accesskey="P">previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> »</li>
- <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> »</li>
- <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" accesskey="U">pypdevsbbl.extra package</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body" role="main">
-
- <div class="section" id="module-pypdevsbbl.extra.queues">
- <span id="pypdevsbbl-extra-queues-module"></span><h1>pypdevsbbl.extra.queues module<a class="headerlink" href="#module-pypdevsbbl.extra.queues" title="Permalink to this headline">¶</a></h1>
- <p>Helper file for <a class="reference internal" href="pypdevsbbl.generic.queues.html#module-pypdevsbbl.generic.queues" title="pypdevsbbl.generic.queues"><code class="xref py py-mod docutils literal notranslate"><span class="pre">pypdevsbbl.generic.queues</span></code></a>.</p>
- <p>This file contains common queueing disciplines and the element that
- will be enqueued in the <a class="reference internal" href="pypdevsbbl.generic.queues.html#pypdevsbbl.generic.queues.SimpleQueue" title="pypdevsbbl.generic.queues.SimpleQueue"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.queues.SimpleQueue</span></code></a> and
- <a class="reference internal" href="pypdevsbbl.generic.queues.html#pypdevsbbl.generic.queues.Queue" title="pypdevsbbl.generic.queues.Queue"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.queues.Queue</span></code></a> building blocks.</p>
- <dl class="function">
- <dt id="pypdevsbbl.extra.queues.FIFO">
- <code class="descclassname">pypdevsbbl.extra.queues.</code><code class="descname">FIFO</code><span class="sig-paren">(</span><em>time</em>, <em>val</em>, <em>ix</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.queues.FIFO" title="Permalink to this definition">¶</a></dt>
- <dd><p>First-In-First-Out kind of queue. This is the most commonly used one.</p>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">Keep in mind that we use a maxheap in our queue.</p>
- </div>
- </dd></dl>
- <dl class="function">
- <dt id="pypdevsbbl.extra.queues.FCFS">
- <code class="descclassname">pypdevsbbl.extra.queues.</code><code class="descname">FCFS</code><span class="sig-paren">(</span><em>time</em>, <em>val</em>, <em>ix</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.queues.FCFS" title="Permalink to this definition">¶</a></dt>
- <dd><p>Alias for <a class="reference internal" href="#pypdevsbbl.extra.queues.FIFO" title="pypdevsbbl.extra.queues.FIFO"><code class="xref py py-meth docutils literal notranslate"><span class="pre">FIFO()</span></code></a>.</p>
- </dd></dl>
- <dl class="function">
- <dt id="pypdevsbbl.extra.queues.LIFO">
- <code class="descclassname">pypdevsbbl.extra.queues.</code><code class="descname">LIFO</code><span class="sig-paren">(</span><em>time</em>, <em>val</em>, <em>ix</em><span class="sig-paren">)</span><a class="headerlink" href="#pypdevsbbl.extra.queues.LIFO" title="Permalink to this definition">¶</a></dt>
- <dd><p>Last-In-First-Out kind of queue. This is used for stacks etc.</p>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">Keep in mind that we use a maxheap in our queue.</p>
- </div>
- </dd></dl>
- <dl class="class">
- <dt id="pypdevsbbl.extra.queues.QueueElement">
- <em class="property">class </em><code class="descclassname">pypdevsbbl.extra.queues.</code><code class="descname">QueueElement</code><span class="sig-paren">(</span><em>priority</em>, <em>item</em>, <em>arrival_time</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/extra/queues.html#QueueElement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.extra.queues.QueueElement" title="Permalink to this definition">¶</a></dt>
- <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
- <p>Simple Queue Element for storing all necessary information and doing valid comparisons.</p>
- <p>Creates a special kind of tuple for enqueueing items, allowing for sorting on priorities
- and remembering their arrival times (which is used for reneging).</p>
- <div class="admonition warning">
- <p class="first admonition-title">Warning</p>
- <p class="last">This is not a DEVS building block.</p>
- </div>
- <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 simple">
- <li><strong>priority</strong> (<em>comparable</em>) – The priority of the item in the queue.</li>
- <li><strong>item</strong> (<em>any</em>) – The item to enqueue.</li>
- <li><strong>arrival_time</strong> (<em>numeric</em>) – (Absolute) time of arrival of the item.</li>
- </ul>
- </td>
- </tr>
- <tr class="field-even field"><th class="field-name">Variables:</th><td class="field-body"><ul class="first last simple">
- <li><strong>priority</strong> (<em>comparable</em>) – The priority of the item in the queue.</li>
- <li><strong>item</strong> (<em>any</em>) – The item to enqueue.</li>
- <li><strong>arrival_time</strong> (<em>numeric</em>) – (Absolute) time of arrival of the item.</li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </dd></dl>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
- <div class="sphinxsidebarwrapper">
- <h4>Previous topic</h4>
- <p class="topless"><a href="pypdevsbbl.extra.packaging.html"
- title="previous chapter">pypdevsbbl.extra.packaging module</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="pypdevsbbl.extra.spatial.html"
- title="next chapter">pypdevsbbl.extra.spatial module</a></p>
- <div id="searchbox" style="display: none" role="search">
- <h3>Quick search</h3>
- <div class="searchformwrapper">
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- </div>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related" role="navigation" aria-label="related navigation">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="py-modindex.html" title="Python Module Index"
- >modules</a> |</li>
- <li class="right" >
- <a href="pypdevsbbl.extra.spatial.html" title="pypdevsbbl.extra.spatial module"
- >next</a> |</li>
- <li class="right" >
- <a href="pypdevsbbl.extra.packaging.html" title="pypdevsbbl.extra.packaging module"
- >previous</a> |</li>
- <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> »</li>
- <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> »</li>
- <li class="nav-item nav-item-2"><a href="pypdevsbbl.extra.html" >pypdevsbbl.extra package</a> »</li>
- </ul>
- </div>
- <div class="footer" role="contentinfo">
- © Copyright 2020, Randy Paredis.
- Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
- </div>
- </body>
- </html>
|