pypdevsbbl.domain.industry.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>pypdevsbbl.domain.industry module &#8212; Python(P)DEVS-BBL documentation</title>
  8. <link rel="stylesheet" href="_static/nature.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  10. <link rel="stylesheet" type="text/css" href="_static/custom.css" />
  11. <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
  12. <script type="text/javascript" src="_static/jquery.js"></script>
  13. <script type="text/javascript" src="_static/underscore.js"></script>
  14. <script type="text/javascript" src="_static/doctools.js"></script>
  15. <script type="text/javascript" src="_static/language_data.js"></script>
  16. <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>
  17. <link rel="index" title="Index" href="genindex.html" />
  18. <link rel="search" title="Search" href="search.html" />
  19. <link rel="next" title="pypdevsbbl.extra package" href="pypdevsbbl.extra.html" />
  20. <link rel="prev" title="pypdevsbbl.domain.gpss module" href="pypdevsbbl.domain.gpss.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="pypdevsbbl.extra.html" title="pypdevsbbl.extra package"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="pypdevsbbl.domain.gpss.html" title="pypdevsbbl.domain.gpss module"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  39. <li class="nav-item nav-item-2"><a href="pypdevsbbl.domain.html" accesskey="U">pypdevsbbl.domain package</a> &#187;</li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <div class="section" id="module-pypdevsbbl.domain.industry">
  47. <span id="pypdevsbbl-domain-industry-module"></span><h1>pypdevsbbl.domain.industry module<a class="headerlink" href="#module-pypdevsbbl.domain.industry" title="Permalink to this headline">¶</a></h1>
  48. <p>Domain-specific building block for industrial purposes.</p>
  49. <dl class="class">
  50. <dt id="pypdevsbbl.domain.industry.ConveyorBelt">
  51. <em class="property">class </em><code class="descclassname">pypdevsbbl.domain.industry.</code><code class="descname">ConveyorBelt</code><span class="sig-paren">(</span><em>name</em>, <em>v</em>, <em>L</em>, <em>K=inf</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#ConveyorBelt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.ConveyorBelt" title="Permalink to this definition">¶</a></dt>
  52. <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevs.DEVS.CoupledDEVS</span></code></p>
  53. <p>A conveyor belt with items moving over it.</p>
  54. <p>Basically, a conveyor can be seen as a glorified queue that uses
  55. speed for timing purposes. Internally, there is a
  56. <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
  57. <a class="reference internal" href="pypdevsbbl.generic.transformers.html#pypdevsbbl.generic.transformers.Transformer" title="pypdevsbbl.generic.transformers.Transformer"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.generic.transformers.Transformer</span></code></a> that have been
  58. called <code class="docutils literal notranslate"><span class="pre">&lt;name&gt;-queue</span></code> and <code class="docutils literal notranslate"><span class="pre">&lt;name&gt;-transformer</span></code> respectively,
  59. where <code class="docutils literal notranslate"><span class="pre">&lt;name&gt;</span></code> indicates the current block’s name.</p>
  60. <div align="center" class="align-center"><img alt="_images/conveyor-belt.svg" src="_images/conveyor-belt.svg" /></div>
  61. <table class="docutils field-list" frame="void" rules="none">
  62. <col class="field-name" />
  63. <col class="field-body" />
  64. <tbody valign="top">
  65. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  66. <li><strong>name</strong> (<em>str</em>) – The name of the block.</li>
  67. <li><strong>v</strong> (<em>numeric</em>) – The conveyor speed.</li>
  68. <li><strong>L</strong> (<em>numeric</em>) – The length of the conveyor.</li>
  69. <li><strong>K</strong> (<em>numeric</em>) – The capacity of the conveyor. Defaults to
  70. <code class="docutils literal notranslate"><span class="pre">INFINITY</span></code>.</li>
  71. </ul>
  72. </td>
  73. </tr>
  74. <tr class="field-even field"><th class="field-name">Input Ports:</th><td class="field-body"><ul class="first simple">
  75. <li><strong>enter</strong> (<em>any</em>) – The items that enter the conveyor belt.</li>
  76. <li><strong>velocity</strong> (<em>numeric</em>) – A new velocity at which the conveyor must run.</li>
  77. </ul>
  78. </td>
  79. </tr>
  80. <tr class="field-odd field"><th class="field-name">Output Ports:</th><td class="field-body"><ul class="first last simple">
  81. <li><strong>leave</strong> (<em>any</em>) – The items that leave the conveyor belt.</li>
  82. <li><strong>overflow</strong> (<em>any</em>) – The items that leave the conveyor because of
  83. overflow.</li>
  84. </ul>
  85. </td>
  86. </tr>
  87. </tbody>
  88. </table>
  89. </dd></dl>
  90. <dl class="class">
  91. <dt id="pypdevsbbl.domain.industry.Transporter">
  92. <em class="property">class </em><code class="descclassname">pypdevsbbl.domain.industry.</code><code class="descname">Transporter</code><span class="sig-paren">(</span><em>name</em>, <em>path</em>, <em>vmax</em>, <em>a=1</em>, <em>d=1</em>, <em>dist=&lt;function distance.euclidean&gt;</em>, <em>chained=False</em>, <em>start=None</em>, <em>passthrough=False</em>, <em>eps=1e-06</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#Transporter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.Transporter" title="Permalink to this definition">¶</a></dt>
  93. <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevs.DEVS.AtomicDEVS</span></code></p>
  94. <p>Transports an item linearly over a path.</p>
  95. <p>When not <code class="xref py py-attr docutils literal notranslate"><span class="pre">chained</span></code>, the item is picked up at the start of
  96. the path before being transported to the end of the path, where
  97. it is dropped off. Next, we return over a straight line to the
  98. beginning and start over again.</p>
  99. <p>When <code class="xref py py-attr docutils literal notranslate"><span class="pre">chained</span></code>, instead of returning to the beginning, we
  100. move to the next position where items can be picked up and start
  101. over again.</p>
  102. <div align="center" class="align-center"><img alt="_images/transporter.svg" src="_images/transporter.svg" /></div>
  103. <table class="docutils field-list" frame="void" rules="none">
  104. <col class="field-name" />
  105. <col class="field-body" />
  106. <tbody valign="top">
  107. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  108. <li><strong>name</strong> (<em>str</em>) – The name of the block.</li>
  109. <li><strong>path</strong> (<em>iter</em>) – An ordered set of <a class="reference internal" href="pypdevsbbl.extra.spatial.html#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.extra.spatial.Coordinate</span></code></a>
  110. objects, indicative of each point in the path. It is
  111. assumed there is a full stop between all points in the
  112. path. There must be at least one point.</li>
  113. <li><strong>vmax</strong> (<em>numeric</em>) – The maximal velocity of the transporter.</li>
  114. <li><strong>a</strong> (<em>numeric</em>) – Strictly positive value that indicates the acceletarion
  115. of the transporter. Must not be <code class="docutils literal notranslate"><span class="pre">INFINITY</span></code>. Defaults
  116. to 1.</li>
  117. <li><strong>d</strong> (<em>numeric</em>) – Strictly positive value that indicates the deceleration
  118. of the transporter. Must not be <code class="docutils literal notranslate"><span class="pre">INFINITY</span></code>. Defaults
  119. to 1.</li>
  120. <li><strong>dist</strong> (<em>def</em>) – Distance function to use. As arguments, it takes two
  121. <a class="reference internal" href="pypdevsbbl.extra.spatial.html#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.extra.spatial.Coordinate</span></code></a> objects and it
  122. returns a numeric value, indicative of the distance.
  123. See also <a class="reference internal" href="pypdevsbbl.extra.spatial.html#pypdevsbbl.extra.spatial.distance" title="pypdevsbbl.extra.spatial.distance"><code class="xref py py-class docutils literal notranslate"><span class="pre">pypdevsbbl.extra.spatial.distance</span></code></a>. Defaults
  124. to <a class="reference internal" href="pypdevsbbl.extra.spatial.html#pypdevsbbl.extra.spatial.distance.euclidean" title="pypdevsbbl.extra.spatial.distance.euclidean"><code class="xref py py-meth docutils literal notranslate"><span class="pre">pypdevsbbl.extra.spatial.distance.euclidean()</span></code></a>.</li>
  125. <li><strong>chained</strong> (<em>bool</em>) – Indicator that the block is chained. Defaults to <code class="docutils literal notranslate"><span class="pre">False</span></code>.</li>
  126. <li><strong>start</strong> (<a class="reference internal" href="pypdevsbbl.extra.spatial.html#pypdevsbbl.extra.spatial.Coordinate" title="pypdevsbbl.extra.spatial.Coordinate"><em>Coordinate</em></a>) – The starting point of the transporter. It can be used to
  127. indicate a depository where the transporter starts. When
  128. <code class="docutils literal notranslate"><span class="pre">None</span></code>, the beginning of the path is assumed. If
  129. <code class="xref py py-attr docutils literal notranslate"><span class="pre">chained</span></code> is <code class="docutils literal notranslate"><span class="pre">True</span></code>, this must be set to indicate
  130. the first block and/or its offset. All other blocks in the
  131. chain <strong>must</strong> have this value set to <code class="docutils literal notranslate"><span class="pre">None</span></code>. Defaults
  132. to <code class="docutils literal notranslate"><span class="pre">None</span></code>.</li>
  133. <li><strong>passthrough</strong> (<em>bool</em>) – Can be used to indicate that this transporter will only
  134. follow a path and not pick up any items. In a chain, this
  135. allows for more complex motion to the next pickup point.
  136. Only useful within that context and is therefore only set
  137. if <code class="xref py py-attr docutils literal notranslate"><span class="pre">chained</span></code> is <code class="docutils literal notranslate"><span class="pre">True</span></code>.</li>
  138. <li><strong>eps</strong> (<em>numeric</em>) – The maximal distance from a point the transformer may be to
  139. be assumed at that location. Defaults to <code class="docutils literal notranslate"><span class="pre">1e-6</span></code>.</li>
  140. </ul>
  141. </td>
  142. </tr>
  143. <tr class="field-even field"><th class="field-name">State:</th><td class="field-body"><ul class="first simple">
  144. <li><strong>item</strong> (<em>any</em>) – The item that’s being carried.</li>
  145. <li><strong>input</strong> (<em>any</em>) – The new item that arrives.</li>
  146. <li><strong>elapsed</strong> (<em>numeric</em>) – The elapsed time since last event.</li>
  147. <li><strong>duration</strong> (<em>numeric</em>) – The duration until a next event is scheduled.</li>
  148. </ul>
  149. </td>
  150. </tr>
  151. <tr class="field-odd field"><th class="field-name">Input Ports:</th><td class="field-body"><ul class="first simple">
  152. <li><strong>input</strong> (<em>any</em>) – A new item that wants to be transported.</li>
  153. <li><strong>previous</strong> (<em>Coordinate</em>) – The end location in a chained transformer.</li>
  154. </ul>
  155. </td>
  156. </tr>
  157. <tr class="field-even field"><th class="field-name">Output Ports:</th><td class="field-body"><ul class="first last simple">
  158. <li><strong>restock</strong> (<em>bool</em>) – A simple message that indicates the block can accept a new
  159. item for transportation.</li>
  160. <li><strong>blocked</strong> (<em>any</em>) – The items that don’t have permission to enter.</li>
  161. <li><strong>output</strong> (<em>any</em>) – The items that are dropped off.</li>
  162. <li><strong>next</strong> (<em>Coordinate</em>) – The end location in a chained transformer.</li>
  163. </ul>
  164. </td>
  165. </tr>
  166. </tbody>
  167. </table>
  168. <dl class="method">
  169. <dt id="pypdevsbbl.domain.industry.Transporter.duration">
  170. <code class="descname">duration</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#Transporter.duration"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.Transporter.duration" title="Permalink to this definition">¶</a></dt>
  171. <dd><p>Actual computation of the duration of the full path.</p>
  172. </dd></dl>
  173. <dl class="method">
  174. <dt id="pypdevsbbl.domain.industry.Transporter.timeAdvance">
  175. <code class="descname">timeAdvance</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#Transporter.timeAdvance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.Transporter.timeAdvance" title="Permalink to this definition">¶</a></dt>
  176. <dd></dd></dl>
  177. <dl class="method">
  178. <dt id="pypdevsbbl.domain.industry.Transporter.outputFnc">
  179. <code class="descname">outputFnc</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#Transporter.outputFnc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.Transporter.outputFnc" title="Permalink to this definition">¶</a></dt>
  180. <dd></dd></dl>
  181. <dl class="method">
  182. <dt id="pypdevsbbl.domain.industry.Transporter.intTransition">
  183. <code class="descname">intTransition</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#Transporter.intTransition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.Transporter.intTransition" title="Permalink to this definition">¶</a></dt>
  184. <dd></dd></dl>
  185. <dl class="method">
  186. <dt id="pypdevsbbl.domain.industry.Transporter.extTransition">
  187. <code class="descname">extTransition</code><span class="sig-paren">(</span><em>inputs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pypdevsbbl/domain/industry.html#Transporter.extTransition"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pypdevsbbl.domain.industry.Transporter.extTransition" title="Permalink to this definition">¶</a></dt>
  188. <dd></dd></dl>
  189. </dd></dl>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  195. <div class="sphinxsidebarwrapper">
  196. <h4>Previous topic</h4>
  197. <p class="topless"><a href="pypdevsbbl.domain.gpss.html"
  198. title="previous chapter">pypdevsbbl.domain.gpss module</a></p>
  199. <h4>Next topic</h4>
  200. <p class="topless"><a href="pypdevsbbl.extra.html"
  201. title="next chapter">pypdevsbbl.extra package</a></p>
  202. <div id="searchbox" style="display: none" role="search">
  203. <h3>Quick search</h3>
  204. <div class="searchformwrapper">
  205. <form class="search" action="search.html" method="get">
  206. <input type="text" name="q" />
  207. <input type="submit" value="Go" />
  208. <input type="hidden" name="check_keywords" value="yes" />
  209. <input type="hidden" name="area" value="default" />
  210. </form>
  211. </div>
  212. </div>
  213. <script type="text/javascript">$('#searchbox').show(0);</script>
  214. </div>
  215. </div>
  216. <div class="clearer"></div>
  217. </div>
  218. <div class="related" role="navigation" aria-label="related navigation">
  219. <h3>Navigation</h3>
  220. <ul>
  221. <li class="right" style="margin-right: 10px">
  222. <a href="genindex.html" title="General Index"
  223. >index</a></li>
  224. <li class="right" >
  225. <a href="py-modindex.html" title="Python Module Index"
  226. >modules</a> |</li>
  227. <li class="right" >
  228. <a href="pypdevsbbl.extra.html" title="pypdevsbbl.extra package"
  229. >next</a> |</li>
  230. <li class="right" >
  231. <a href="pypdevsbbl.domain.gpss.html" title="pypdevsbbl.domain.gpss module"
  232. >previous</a> |</li>
  233. <li class="nav-item nav-item-0"><a href="index.html">Python(P)DEVS-BBL documentation</a> &#187;</li>
  234. <li class="nav-item nav-item-1"><a href="pypdevsbbl.html" >pypdevsbbl package</a> &#187;</li>
  235. <li class="nav-item nav-item-2"><a href="pypdevsbbl.domain.html" >pypdevsbbl.domain package</a> &#187;</li>
  236. </ul>
  237. </div>
  238. <div class="footer" role="contentinfo">
  239. &#169; Copyright 2020, Randy Paredis.
  240. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.5.
  241. </div>
  242. </body>
  243. </html>