rparedis пре 5 година
родитељ
комит
4ab638b5be
96 измењених фајлова са 1134 додато и 33 уклоњено
  1. 1 0
      .gitignore
  2. BIN
      doc/_build/doctrees/CBD.CBD.doctree
  3. BIN
      doc/_build/doctrees/CBD.CBD2LaTeX.doctree
  4. BIN
      doc/_build/doctrees/CBD.CBDDraw.doctree
  5. BIN
      doc/_build/doctrees/CBD.depGraph.doctree
  6. BIN
      doc/_build/doctrees/CBD.doctree
  7. BIN
      doc/_build/doctrees/CBD.lib.doctree
  8. BIN
      doc/_build/doctrees/CBD.lib.endpoints.doctree
  9. BIN
      doc/_build/doctrees/CBD.lib.io.doctree
  10. BIN
      doc/_build/doctrees/CBD.lib.std.doctree
  11. BIN
      doc/_build/doctrees/CBD.naivelog.doctree
  12. BIN
      doc/_build/doctrees/CBD.realtime.accurate_time.doctree
  13. BIN
      doc/_build/doctrees/CBD.realtime.doctree
  14. BIN
      doc/_build/doctrees/CBD.realtime.plotting.doctree
  15. BIN
      doc/_build/doctrees/CBD.realtime.threadingBackend.doctree
  16. BIN
      doc/_build/doctrees/CBD.realtime.threadingGameLoop.doctree
  17. BIN
      doc/_build/doctrees/CBD.realtime.threadingPython.doctree
  18. BIN
      doc/_build/doctrees/CBD.realtime.threadingTkInter.doctree
  19. BIN
      doc/_build/doctrees/CBD.simulator.doctree
  20. BIN
      doc/_build/doctrees/CBD.solver.doctree
  21. BIN
      doc/_build/doctrees/CBD.util.doctree
  22. BIN
      doc/_build/doctrees/changelog.doctree
  23. BIN
      doc/_build/doctrees/environment.pickle
  24. BIN
      doc/_build/doctrees/examples/Dashboard.doctree
  25. BIN
      doc/_build/doctrees/index.doctree
  26. BIN
      doc/_build/doctrees/install.doctree
  27. 1 0
      doc/_build/html/CBD.CBD.html
  28. 1 0
      doc/_build/html/CBD.CBD2LaTeX.html
  29. 1 0
      doc/_build/html/CBD.CBDDraw.html
  30. 1 0
      doc/_build/html/CBD.depGraph.html
  31. 3 2
      doc/_build/html/CBD.html
  32. 1 0
      doc/_build/html/CBD.lib.endpoints.html
  33. 1 0
      doc/_build/html/CBD.lib.html
  34. 1 0
      doc/_build/html/CBD.lib.io.html
  35. 5 2
      doc/_build/html/CBD.lib.std.html
  36. 1 0
      doc/_build/html/CBD.naivelog.html
  37. 1 0
      doc/_build/html/CBD.realtime.accurate_time.html
  38. 1 0
      doc/_build/html/CBD.realtime.html
  39. 18 2
      doc/_build/html/CBD.realtime.plotting.html
  40. 1 0
      doc/_build/html/CBD.realtime.threadingBackend.html
  41. 1 0
      doc/_build/html/CBD.realtime.threadingGameLoop.html
  42. 1 0
      doc/_build/html/CBD.realtime.threadingPython.html
  43. 1 0
      doc/_build/html/CBD.realtime.threadingTkInter.html
  44. 1 0
      doc/_build/html/CBD.simulator.html
  45. 1 0
      doc/_build/html/CBD.solver.html
  46. 1 0
      doc/_build/html/CBD.util.html
  47. BIN
      doc/_build/html/_images/sin-dashboard.png
  48. 1 0
      doc/_build/html/_modules/CBD/CBD.html
  49. 1 0
      doc/_build/html/_modules/CBD/CBD2LaTeX.html
  50. 1 0
      doc/_build/html/_modules/CBD/CBDDraw.html
  51. 1 0
      doc/_build/html/_modules/CBD/depGraph.html
  52. 1 0
      doc/_build/html/_modules/CBD/lib/endpoints.html
  53. 1 0
      doc/_build/html/_modules/CBD/lib/io.html
  54. 3 0
      doc/_build/html/_modules/CBD/lib/std.html
  55. 2 1
      doc/_build/html/_modules/CBD/naivelog.html
  56. 1 0
      doc/_build/html/_modules/CBD/realtime/accurate_time.html
  57. 32 4
      doc/_build/html/_modules/CBD/realtime/plotting.html
  58. 1 0
      doc/_build/html/_modules/CBD/realtime/threadingBackend.html
  59. 1 0
      doc/_build/html/_modules/CBD/realtime/threadingGameLoop.html
  60. 1 0
      doc/_build/html/_modules/CBD/realtime/threadingPython.html
  61. 1 0
      doc/_build/html/_modules/CBD/realtime/threadingTkInter.html
  62. 1 0
      doc/_build/html/_modules/CBD/simulator.html
  63. 1 0
      doc/_build/html/_modules/CBD/solver.html
  64. 1 0
      doc/_build/html/_modules/CBD/util.html
  65. 1 0
      doc/_build/html/_modules/index.html
  66. 6 1
      doc/_build/html/_sources/changelog.rst.txt
  67. 132 0
      doc/_build/html/_sources/examples/Dashboard.rst.txt
  68. 1 0
      doc/_build/html/_sources/index.rst.txt
  69. 1 1
      doc/_build/html/_sources/install.rst.txt
  70. 8 2
      doc/_build/html/changelog.html
  71. 579 0
      doc/_build/html/examples/Dashboard.html
  72. 1 0
      doc/_build/html/examples/EvenNumberGen.html
  73. 1 0
      doc/_build/html/examples/Fibonacci.html
  74. 1 0
      doc/_build/html/examples/LCG.html
  75. 3 2
      doc/_build/html/examples/LivePlot.html
  76. 1 0
      doc/_build/html/examples/RealTime.html
  77. 1 0
      doc/_build/html/examples/SinGen.html
  78. 1 0
      doc/_build/html/genindex.html
  79. 6 0
      doc/_build/html/index.html
  80. 2 1
      doc/_build/html/install.html
  81. 1 0
      doc/_build/html/modules.html
  82. BIN
      doc/_build/html/objects.inv
  83. 1 0
      doc/_build/html/py-modindex.html
  84. 1 0
      doc/_build/html/running.html
  85. 1 0
      doc/_build/html/search.html
  86. 1 1
      doc/_build/html/searchindex.js
  87. BIN
      doc/_figures/sin-dashboard.png
  88. 6 1
      doc/changelog.rst
  89. 132 0
      doc/examples/Dashboard.rst
  90. 1 0
      doc/index.rst
  91. 1 1
      doc/install.rst
  92. 88 0
      examples/SinGen/dashboard.py
  93. 26 8
      src/CBD/lib/endpoints.py
  94. 2 0
      src/CBD/lib/std.py
  95. 31 4
      src/CBD/realtime/plotting.py
  96. 2 0
      src/build/lib/CBD/lib/std.py

+ 1 - 0
.gitignore

@@ -17,3 +17,4 @@ src/build/
 examples/AGV/tuning6/
 
 examples/AGV/tuning7/
+/src/build/

BIN
doc/_build/doctrees/CBD.CBD.doctree


BIN
doc/_build/doctrees/CBD.CBD2LaTeX.doctree


BIN
doc/_build/doctrees/CBD.CBDDraw.doctree


BIN
doc/_build/doctrees/CBD.depGraph.doctree


BIN
doc/_build/doctrees/CBD.doctree


BIN
doc/_build/doctrees/CBD.lib.doctree


BIN
doc/_build/doctrees/CBD.lib.endpoints.doctree


BIN
doc/_build/doctrees/CBD.lib.io.doctree


BIN
doc/_build/doctrees/CBD.lib.std.doctree


BIN
doc/_build/doctrees/CBD.naivelog.doctree


BIN
doc/_build/doctrees/CBD.realtime.accurate_time.doctree


BIN
doc/_build/doctrees/CBD.realtime.doctree


BIN
doc/_build/doctrees/CBD.realtime.plotting.doctree


BIN
doc/_build/doctrees/CBD.realtime.threadingBackend.doctree


BIN
doc/_build/doctrees/CBD.realtime.threadingGameLoop.doctree


BIN
doc/_build/doctrees/CBD.realtime.threadingPython.doctree


BIN
doc/_build/doctrees/CBD.realtime.threadingTkInter.doctree


BIN
doc/_build/doctrees/CBD.simulator.doctree


BIN
doc/_build/doctrees/CBD.solver.doctree


BIN
doc/_build/doctrees/CBD.util.doctree


BIN
doc/_build/doctrees/changelog.doctree


BIN
doc/_build/doctrees/environment.pickle


BIN
doc/_build/doctrees/examples/Dashboard.doctree


BIN
doc/_build/doctrees/index.doctree


BIN
doc/_build/doctrees/install.doctree


+ 1 - 0
doc/_build/html/CBD.CBD.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.CBD2LaTeX.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.CBDDraw.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.depGraph.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 3 - 2
doc/_build/html/CBD.html

@@ -31,7 +31,7 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
     <link rel="next" title="Standard CBD Library (BBL)" href="CBD.lib.html" />
-    <link rel="prev" title="Live Plotting of Data During the Simulation" href="examples/LivePlot.html" /> 
+    <link rel="prev" title="TkInter Dashboard with Editable Values" href="examples/Dashboard.html" /> 
 
   
   <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">
@@ -329,7 +330,7 @@
         <a href="CBD.lib.html" class="btn btn-neutral float-right" title="Standard CBD Library (BBL)" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
-        <a href="examples/LivePlot.html" class="btn btn-neutral" title="Live Plotting of Data During the Simulation" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
+        <a href="examples/Dashboard.html" class="btn btn-neutral" title="TkInter Dashboard with Editable Values" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
       
     </div>
   

+ 1 - 0
doc/_build/html/CBD.lib.endpoints.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.lib.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.lib.io.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 5 - 2
doc/_build/html/CBD.lib.std.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">
@@ -286,12 +287,14 @@
 <dl class="method">
 <dt id="CBD.lib.std.ConstantBlock.getValue">
 <code class="descname">getValue</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/std.html#ConstantBlock.getValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.std.ConstantBlock.getValue" title="Permalink to this definition">¶</a></dt>
-<dd></dd></dl>
+<dd><p>Get the current value.</p>
+</dd></dl>
 
 <dl class="method">
 <dt id="CBD.lib.std.ConstantBlock.setValue">
 <code class="descname">setValue</code><span class="sig-paren">(</span><em>value</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/std.html#ConstantBlock.setValue"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.std.ConstantBlock.setValue" title="Permalink to this definition">¶</a></dt>
-<dd></dd></dl>
+<dd><p>Change the constant value.</p>
+</dd></dl>
 
 <dl class="method">
 <dt id="CBD.lib.std.ConstantBlock.compute">

+ 1 - 0
doc/_build/html/CBD.naivelog.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/CBD.realtime.accurate_time.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/CBD.realtime.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

Разлика између датотеке није приказан због своје велике величине
+ 18 - 2
doc/_build/html/CBD.realtime.plotting.html


+ 1 - 0
doc/_build/html/CBD.realtime.threadingBackend.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/CBD.realtime.threadingGameLoop.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/CBD.realtime.threadingPython.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/CBD.realtime.threadingTkInter.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/CBD.simulator.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.solver.html

@@ -198,6 +198,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul class="current">

+ 1 - 0
doc/_build/html/CBD.util.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

BIN
doc/_build/html/_images/sin-dashboard.png


+ 1 - 0
doc/_build/html/_modules/CBD/CBD.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/CBD2LaTeX.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/CBDDraw.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/depGraph.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/lib/endpoints.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/lib/io.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 3 - 0
doc/_build/html/_modules/CBD/lib/std.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>
@@ -291,9 +292,11 @@
 		<span class="bp">self</span><span class="o">.</span><span class="n">__value</span> <span class="o">=</span> <span class="n">value</span>
 
 <div class="viewcode-block" id="ConstantBlock.getValue"><a class="viewcode-back" href="../../../CBD.lib.std.html#CBD.lib.std.ConstantBlock.getValue">[docs]</a>	<span class="k">def</span> <span class="nf">getValue</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+		<span class="sd">&quot;&quot;&quot;Get the current value.&quot;&quot;&quot;</span>
 		<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__value</span></div>
 
 <div class="viewcode-block" id="ConstantBlock.setValue"><a class="viewcode-back" href="../../../CBD.lib.std.html#CBD.lib.std.ConstantBlock.setValue">[docs]</a>	<span class="k">def</span> <span class="nf">setValue</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
+		<span class="sd">&quot;&quot;&quot;Change the constant value.&quot;&quot;&quot;</span>
 		<span class="bp">self</span><span class="o">.</span><span class="n">__value</span> <span class="o">=</span> <span class="n">value</span></div>
 
 <div class="viewcode-block" id="ConstantBlock.compute"><a class="viewcode-back" href="../../../CBD.lib.std.html#CBD.lib.std.ConstantBlock.compute">[docs]</a>	<span class="k">def</span> <span class="nf">compute</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">curIteration</span><span class="p">):</span>

+ 2 - 1
doc/_build/html/_modules/CBD/naivelog.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>
@@ -487,7 +488,7 @@
 		<span class="k">return</span> <span class="s2">&quot;</span><span class="si">{startcol}</span><span class="s2">[{now:%H:%M:%S.</span><span class="si">%f</span><span class="s2">} </span><span class="si">{module}</span><span class="s2"> </span><span class="si">{lvl}</span><span class="s2">] </span><span class="si">{mainstr}{endcol}</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
 				<span class="n">lvl</span><span class="o">=</span><span class="n">levelToShortStr</span><span class="p">(</span><span class="n">level</span><span class="p">),</span>
 				<span class="n">module</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">__modulename</span><span class="p">,</span>
-				<span class="n">now</span><span class="o">=</span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">today</span><span class="p">(),</span>
+				<span class="n">now</span><span class="o">=</span><span class="n">datetime</span><span class="o">.</span><span class="n">date</span><span class="o">.</span><span class="n">today</span><span class="p">(),</span>
 				<span class="n">mainstr</span><span class="o">=</span><span class="n">mainstr</span><span class="p">,</span>
 				<span class="n">startcol</span><span class="o">=</span><span class="n">col</span><span class="p">,</span>
 				<span class="n">endcol</span><span class="o">=</span><span class="n">bcolors</span><span class="o">.</span><span class="n">ENDC</span><span class="p">)</span></div></div>

+ 1 - 0
doc/_build/html/_modules/CBD/realtime/accurate_time.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

Разлика између датотеке није приказан због своје велике величине
+ 32 - 4
doc/_build/html/_modules/CBD/realtime/plotting.html


+ 1 - 0
doc/_build/html/_modules/CBD/realtime/threadingBackend.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/realtime/threadingGameLoop.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/realtime/threadingPython.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/realtime/threadingTkInter.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/simulator.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/solver.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/CBD/util.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/_modules/index.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 6 - 1
doc/_build/html/_sources/changelog.rst.txt

@@ -3,8 +3,13 @@ Changelog
 
 .. code-block:: text
 
+    Version 1.1
+        +   Created Dashboard Example
+        +   Added live plotting
+        +   Added "endpoints" and "io" modules
+
     Version 1.0
-        *   Reworked old "single-file" version to become a more complex library.
+        *   Reworked old "single-file" version to better structure.
         +   Added realtime simulation (in the PyPDEVS backends).
         +   Added progress bars.
         *   Made algebraic loop solver flexible and more efficient.

+ 132 - 0
doc/_build/html/_sources/examples/Dashboard.rst.txt

@@ -0,0 +1,132 @@
+TkInter Dashboard with Editable Values
+======================================
+Often, users would like to have interaction with certain values during the simulation.
+This reduces the need to run multiple simulations in which only small values need to
+be changed. Seeing as the simulator provides a way of interacting with TkInter, building
+such a dashboard is quite easy.
+
+Example Model
+-------------
+The normal :doc:`SinGen` will be slightly extended to comply to the following (more generic)
+formula:
+
+.. math::
+
+    y(t) = A \cdot \sin(B \cdot t)
+
+The CBD model therefore becomes:
+
+.. code-block:: python
+
+    from CBD.CBD import CBD
+    from CBD.lib.std import *
+    from CBD.lib.endpoints import SignalCollectorBlock
+
+    class SinGen(CBD):
+        def __init__(self, block_name):
+            CBD.__init__(self, block_name, input_ports=[], output_ports=[])
+
+            # Create the Blocks
+            self.addBlock(GenericBlock("sin", block_operator=("sin")))
+            self.addBlock(TimeBlock("time"))
+            self.addBlock(ConstantBlock("A", 1.0))
+            self.addBlock(ConstantBlock("B", 1.0))
+            self.addBlock(ProductBlock("amp"))
+            self.addBlock(ProductBlock("per"))
+            #   Using a buffer, the memory won't be flooded
+            self.addBlock(SignalCollectorBlock("plot", buffer_size=500))
+
+            # Create the Connections
+            self.addConnection("B", "per")
+            self.addConnection("time", "per")
+            self.addConnection("per", "sin")
+            self.addConnection("A", "amp")
+            self.addConnection("sin", "amp")
+            self.addConnection("amp", "plot")
+
+The Dashboard
+-------------
+As per :doc:`LivePlot`, a TkInter window is being created and a :class:`CBD.realtime.plotting.PlotManager`
+is assigned to display the plot. Notice there is an additional callback to ensure the y-axis will remain
+in the range of :code:`[-1.0, 1.0]` if the values are smaller, but the axis may grow to a larger scope if
+needs be.
+
+.. code-block:: python
+
+    from CBD.realtime.plotting import PlotManager, LinePlot, follow
+    import matplotlib.pyplot as plt
+    import tkinter as tk
+    from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
+
+    fig = plt.figure(figsize=(15, 5), dpi=100)
+    ax = fig.add_subplot(111)
+    ax.set_ylim((-1, 1))
+
+    cbd = SinGen("SinGen")
+
+    root = tk.Tk()
+
+    canvas = FigureCanvasTkAgg(fig, master=root)  # A Tk DrawingArea
+    canvas.draw()
+    canvas.get_tk_widget().grid(column=1, row=1)
+
+    manager = PlotManager()
+    manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
+    manager.connect('sin', 'update',
+                    lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+    manager.connect('sin', 'update',
+                    lambda d, axis=ax: axis.set_ylim(follow(d[1], lower_lim=-1.0, upper_lim=1.0)))
+
+Next, let's provide a way of obtaining user information. We will use two TkInter :code:`Scale` objects to provide easy
+input fields for the variables :code:`A` (the amplitude) and :code:`B` (proportional to the period). Additionally, a
+:code:`Label` will show the current equation that is being plotted as additional information. The :func:`set_amplitude`
+and :func:`set_period` functions make use of the ability of setting a :class:`CBD.lib.std.ConstantBlock`'s value
+during runtime. Take a look at the corresponding documentations for more information.
+
+.. code-block:: python
+
+    label = tk.Label(root, text="y = 1.00 * sin(1.00 * t)")
+    label.grid(column=1, row=2)
+
+    def set_amplitude(val):
+        cbd.findBlock("A")[0].setValue(float(val))
+        update_label()
+
+    def set_period(val):
+        cbd.findBlock("B")[0].setValue(float(val))
+        update_label()
+
+    def update_label():
+        label["text"] = "y = {:.2f} * sin({:.2f} * t)".format(cbd.findBlock("A")[0].getValue(),
+                                                              cbd.findBlock("B")[0].getValue())
+
+    amplitude = tk.Scale(root, label="Amplitude", length=1200, orient=tk.HORIZONTAL, from_=0, to=5,
+                         resolution=0.1, command=set_amplitude)
+    amplitude.set(1.0)
+    amplitude.grid(column=1, row=3)
+    period = tk.Scale(root, label="Period", length=1200, orient=tk.HORIZONTAL, from_=0, to=5,
+                      resolution=0.1, command=set_period)
+    period.set(1.0)
+    period.grid(column=1, row=4)
+
+And that's it! All that is left to do is to run the simulation and see how the plot interacts to user input.
+Notice how no time constraint is set on the simulation. This will ensure there can be plenty of experimentation
+by the user. Also, the :class:`CBD.lib.endpoints.SignalCollectorBlock` that is used was given a buffer size of
+500 datapoints. This prevents the memory being flooded with data while this simulation is running (for an infinite
+time).
+
+.. code-block:: python
+
+    from CBD.simulator import Simulator
+
+    sim = Simulator(cbd)
+    sim.setRealTime()
+    sim.setDeltaT(0.1)
+    sim.setRealTimePlatformTk(root)
+    sim.run()
+    root.mainloop()
+
+While changing the values, a lot of noice will appear, as there is no consistency in-between datapoints. Yet,
+when not changing the values, the plot will show the requested results.
+
+.. figure:: ../_figures/sin-dashboard.png

+ 1 - 0
doc/_build/html/_sources/index.rst.txt

@@ -52,6 +52,7 @@ to model complex systems of equations.
 
     examples/RealTime
     examples/LivePlot
+    examples/Dashboard
 
 .. toctree::
     :maxdepth: 3

+ 1 - 1
doc/_build/html/_sources/install.rst.txt

@@ -36,7 +36,7 @@ There are a few ways of using the framework:
         Some code editors (like `PyCharm <https://www.jetbrains.com/pycharm/>`_) allow you to mark
         a directory as "Sources Root", which basically adds it to your path upon execution.
 
-#. Execute the following command in the :code:`src` folder to install it to your user directory:
+#. Execute the following command in the :code:`src` folder to install the project to your user directory or update it:
 
    .. code-block:: bash
 

+ 8 - 2
doc/_build/html/changelog.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>
@@ -273,8 +274,13 @@
               
   <div class="section" id="changelog">
 <h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline">¶</a></h1>
-<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Version 1.0
-    *   Reworked old &quot;single-file&quot; version to become a more complex library.
+<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Version 1.1
+    +   Created Dashboard Example
+    +   Added live plotting
+    +   Added &quot;endpoints&quot; and &quot;io&quot; modules
+
+Version 1.0
+    *   Reworked old &quot;single-file&quot; version to better structure.
     +   Added realtime simulation (in the PyPDEVS backends).
     +   Added progress bars.
     *   Made algebraic loop solver flexible and more efficient.

Разлика између датотеке није приказан због своје велике величине
+ 579 - 0
doc/_build/html/examples/Dashboard.html


+ 1 - 0
doc/_build/html/examples/EvenNumberGen.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/examples/Fibonacci.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/examples/LCG.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 3 - 2
doc/_build/html/examples/LivePlot.html

@@ -30,7 +30,7 @@
   <link rel="stylesheet" href="../_static/style.css" type="text/css" />
     <link rel="index" title="Index" href="../genindex.html" />
     <link rel="search" title="Search" href="../search.html" />
-    <link rel="next" title="CBD package" href="../CBD.html" />
+    <link rel="next" title="TkInter Dashboard with Editable Values" href="Dashboard.html" />
     <link rel="prev" title="Realtime Simulation" href="RealTime.html" /> 
 
   
@@ -199,6 +199,7 @@
 <ul class="current">
 <li class="toctree-l1"><a class="reference internal" href="RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1 current"><a class="current reference internal" href="#">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>
@@ -483,7 +484,7 @@ for this problem.</p>
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="../CBD.html" class="btn btn-neutral float-right" title="CBD package" accesskey="n" rel="next">Next <img src="../_static/images/chevron-right-orange.svg" class="next-page"></a>
+        <a href="Dashboard.html" class="btn btn-neutral float-right" title="TkInter Dashboard with Editable Values" accesskey="n" rel="next">Next <img src="../_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
         <a href="RealTime.html" class="btn btn-neutral" title="Realtime Simulation" accesskey="p" rel="prev"><img src="../_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>

+ 1 - 0
doc/_build/html/examples/RealTime.html

@@ -199,6 +199,7 @@
 <ul class="current">
 <li class="toctree-l1 current"><a class="current reference internal" href="#">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/examples/SinGen.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/genindex.html

@@ -198,6 +198,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 6 - 0
doc/_build/html/index.html

@@ -198,6 +198,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>
@@ -343,6 +344,11 @@ models in this framework, take a look at
 <li class="toctree-l2"><a class="reference internal" href="examples/LivePlot.html#using-bokeh">Using Bokeh</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="examples/Dashboard.html#example-model">Example Model</a></li>
+<li class="toctree-l2"><a class="reference internal" href="examples/Dashboard.html#the-dashboard">The Dashboard</a></li>
+</ul>
+</li>
 </ul>
 </div>
 <div class="toctree-wrapper compound">

+ 2 - 1
doc/_build/html/install.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>
@@ -310,7 +311,7 @@ This way, the execution of your program will recognize things like:</p>
 a directory as “Sources Root”, which basically adds it to your path upon execution.</p>
 </div>
 </li>
-<li><p class="first">Execute the following command in the <code class="code docutils literal notranslate"><span class="pre">src</span></code> folder to install it to your user directory:</p>
+<li><p class="first">Execute the following command in the <code class="code docutils literal notranslate"><span class="pre">src</span></code> folder to install the project to your user directory or update it:</p>
 <div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python setup.py install --user
 </pre></div>
 </div>

+ 1 - 0
doc/_build/html/modules.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

BIN
doc/_build/html/objects.inv


+ 1 - 0
doc/_build/html/py-modindex.html

@@ -200,6 +200,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/running.html

@@ -199,6 +199,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

+ 1 - 0
doc/_build/html/search.html

@@ -197,6 +197,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="examples/RealTime.html">Realtime Simulation</a></li>
 <li class="toctree-l1"><a class="reference internal" href="examples/LivePlot.html">Live Plotting of Data During the Simulation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="examples/Dashboard.html">TkInter Dashboard with Editable Values</a></li>
 </ul>
 <p class="caption"><span class="caption-text">Internal Documentation</span></p>
 <ul>

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
doc/_build/html/searchindex.js


BIN
doc/_figures/sin-dashboard.png


+ 6 - 1
doc/changelog.rst

@@ -3,8 +3,13 @@ Changelog
 
 .. code-block:: text
 
+    Version 1.1
+        +   Created Dashboard Example
+        +   Added live plotting
+        +   Added "endpoints" and "io" modules
+
     Version 1.0
-        *   Reworked old "single-file" version to become a more complex library.
+        *   Reworked old "single-file" version to better structure.
         +   Added realtime simulation (in the PyPDEVS backends).
         +   Added progress bars.
         *   Made algebraic loop solver flexible and more efficient.

+ 132 - 0
doc/examples/Dashboard.rst

@@ -0,0 +1,132 @@
+TkInter Dashboard with Editable Values
+======================================
+Often, users would like to have interaction with certain values during the simulation.
+This reduces the need to run multiple simulations in which only small values need to
+be changed. Seeing as the simulator provides a way of interacting with TkInter, building
+such a dashboard is quite easy.
+
+Example Model
+-------------
+The normal :doc:`SinGen` will be slightly extended to comply to the following (more generic)
+formula:
+
+.. math::
+
+    y(t) = A \cdot \sin(B \cdot t)
+
+The CBD model therefore becomes:
+
+.. code-block:: python
+
+    from CBD.CBD import CBD
+    from CBD.lib.std import *
+    from CBD.lib.endpoints import SignalCollectorBlock
+
+    class SinGen(CBD):
+        def __init__(self, block_name):
+            CBD.__init__(self, block_name, input_ports=[], output_ports=[])
+
+            # Create the Blocks
+            self.addBlock(GenericBlock("sin", block_operator=("sin")))
+            self.addBlock(TimeBlock("time"))
+            self.addBlock(ConstantBlock("A", 1.0))
+            self.addBlock(ConstantBlock("B", 1.0))
+            self.addBlock(ProductBlock("amp"))
+            self.addBlock(ProductBlock("per"))
+            #   Using a buffer, the memory won't be flooded
+            self.addBlock(SignalCollectorBlock("plot", buffer_size=500))
+
+            # Create the Connections
+            self.addConnection("B", "per")
+            self.addConnection("time", "per")
+            self.addConnection("per", "sin")
+            self.addConnection("A", "amp")
+            self.addConnection("sin", "amp")
+            self.addConnection("amp", "plot")
+
+The Dashboard
+-------------
+As per :doc:`LivePlot`, a TkInter window is being created and a :class:`CBD.realtime.plotting.PlotManager`
+is assigned to display the plot. Notice there is an additional callback to ensure the y-axis will remain
+in the range of :code:`[-1.0, 1.0]` if the values are smaller, but the axis may grow to a larger scope if
+needs be.
+
+.. code-block:: python
+
+    from CBD.realtime.plotting import PlotManager, LinePlot, follow
+    import matplotlib.pyplot as plt
+    import tkinter as tk
+    from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
+
+    fig = plt.figure(figsize=(15, 5), dpi=100)
+    ax = fig.add_subplot(111)
+    ax.set_ylim((-1, 1))
+
+    cbd = SinGen("SinGen")
+
+    root = tk.Tk()
+
+    canvas = FigureCanvasTkAgg(fig, master=root)  # A Tk DrawingArea
+    canvas.draw()
+    canvas.get_tk_widget().grid(column=1, row=1)
+
+    manager = PlotManager()
+    manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
+    manager.connect('sin', 'update',
+                    lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+    manager.connect('sin', 'update',
+                    lambda d, axis=ax: axis.set_ylim(follow(d[1], lower_lim=-1.0, upper_lim=1.0)))
+
+Next, let's provide a way of obtaining user information. We will use two TkInter :code:`Scale` objects to provide easy
+input fields for the variables :code:`A` (the amplitude) and :code:`B` (proportional to the period). Additionally, a
+:code:`Label` will show the current equation that is being plotted as additional information. The :func:`set_amplitude`
+and :func:`set_period` functions make use of the ability of setting a :class:`CBD.lib.std.ConstantBlock`'s value
+during runtime. Take a look at the corresponding documentations for more information.
+
+.. code-block:: python
+
+    label = tk.Label(root, text="y = 1.00 * sin(1.00 * t)")
+    label.grid(column=1, row=2)
+
+    def set_amplitude(val):
+        cbd.findBlock("A")[0].setValue(float(val))
+        update_label()
+
+    def set_period(val):
+        cbd.findBlock("B")[0].setValue(float(val))
+        update_label()
+
+    def update_label():
+        label["text"] = "y = {:.2f} * sin({:.2f} * t)".format(cbd.findBlock("A")[0].getValue(),
+                                                              cbd.findBlock("B")[0].getValue())
+
+    amplitude = tk.Scale(root, label="Amplitude", length=1200, orient=tk.HORIZONTAL, from_=0, to=5,
+                         resolution=0.1, command=set_amplitude)
+    amplitude.set(1.0)
+    amplitude.grid(column=1, row=3)
+    period = tk.Scale(root, label="Period", length=1200, orient=tk.HORIZONTAL, from_=0, to=5,
+                      resolution=0.1, command=set_period)
+    period.set(1.0)
+    period.grid(column=1, row=4)
+
+And that's it! All that is left to do is to run the simulation and see how the plot interacts to user input.
+Notice how no time constraint is set on the simulation. This will ensure there can be plenty of experimentation
+by the user. Also, the :class:`CBD.lib.endpoints.SignalCollectorBlock` that is used was given a buffer size of
+500 datapoints. This prevents the memory being flooded with data while this simulation is running (for an infinite
+time).
+
+.. code-block:: python
+
+    from CBD.simulator import Simulator
+
+    sim = Simulator(cbd)
+    sim.setRealTime()
+    sim.setDeltaT(0.1)
+    sim.setRealTimePlatformTk(root)
+    sim.run()
+    root.mainloop()
+
+While changing the values, a lot of noice will appear, as there is no consistency in-between datapoints. Yet,
+when not changing the values, the plot will show the requested results.
+
+.. figure:: ../_figures/sin-dashboard.png

+ 1 - 0
doc/index.rst

@@ -52,6 +52,7 @@ to model complex systems of equations.
 
     examples/RealTime
     examples/LivePlot
+    examples/Dashboard
 
 .. toctree::
     :maxdepth: 3

+ 1 - 1
doc/install.rst

@@ -36,7 +36,7 @@ There are a few ways of using the framework:
         Some code editors (like `PyCharm <https://www.jetbrains.com/pycharm/>`_) allow you to mark
         a directory as "Sources Root", which basically adds it to your path upon execution.
 
-#. Execute the following command in the :code:`src` folder to install it to your user directory:
+#. Execute the following command in the :code:`src` folder to install the project to your user directory or update it:
 
    .. code-block:: bash
 

+ 88 - 0
examples/SinGen/dashboard.py

@@ -0,0 +1,88 @@
+#!/usr/bin/python3
+
+from CBD.CBD import CBD
+from CBD.lib.std import *
+from CBD.lib.endpoints import SignalCollectorBlock
+from CBD.realtime.plotting import PlotManager, LinePlot, follow
+from CBD.simulator import Simulator
+# import time
+import matplotlib.pyplot as plt
+
+import tkinter as tk
+from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
+
+DELTA_T = 0.1
+
+class SinGen(CBD):
+	def __init__(self, block_name):
+		CBD.__init__(self, block_name, input_ports=[], output_ports=[])
+
+		# Create the Blocks
+		self.addBlock(GenericBlock("sin", block_operator=("sin")))
+		self.addBlock(TimeBlock("time"))
+		self.addBlock(SignalCollectorBlock("plot"))
+		self.addBlock(ConstantBlock("A", 1.0))
+		self.addBlock(ConstantBlock("B", 1.0))
+		self.addBlock(ProductBlock("amp"))
+		self.addBlock(ProductBlock("per"))
+
+		# Create the Connections
+		self.addConnection("B", "per")
+		self.addConnection("time", "per")
+		self.addConnection("per", "sin")
+		self.addConnection("A", "amp")
+		self.addConnection("sin", "amp")
+		self.addConnection("amp", "plot")
+
+fig = plt.figure(figsize=(15, 5), dpi=100)
+ax = fig.add_subplot(111)
+ax.set_ylim((-1, 1))
+
+cbd = SinGen("SinGen")
+
+root = tk.Tk()
+
+canvas = FigureCanvasTkAgg(fig, master=root)  # A Tk DrawingArea
+canvas.draw()
+canvas.get_tk_widget().grid(column=1, row=1)
+
+manager = PlotManager()
+manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
+manager.connect('sin', 'update', lambda d, axis=ax: axis.set_xlim(follow(d[0], 10.0, lower_bound=0.0)))
+# manager.connect('sin', 'update', lambda d, axis=ax: axis.set_ylim((min(d[1]), max(d[1]))))
+manager.connect('sin', 'update', lambda d, axis=ax: axis.set_ylim(follow(d[1], lower_lim=-1.0, upper_lim=1.0)))
+
+
+label = tk.Label(root, text="y = 1.00 * sin(1.00 * t)")
+label.grid(column=1, row=2)
+
+def set_amplitude(val):
+	cbd.findBlock("A")[0].setValue(float(val))
+	update_label()
+
+def set_period(val):
+	cbd.findBlock("B")[0].setValue(float(val))
+	update_label()
+
+def update_label():
+	label["text"] = "y = {:.2f} * sin({:.2f} * t)".format(cbd.findBlock("A")[0].getValue(),
+	                                                      cbd.findBlock("B")[0].getValue())
+
+amplitude = tk.Scale(root, label="Amplitude", length=1200, orient=tk.HORIZONTAL, from_=0, to=5, resolution=0.1,
+                     command=set_amplitude)
+amplitude.set(1.0)
+amplitude.grid(column=1, row=3)
+period = tk.Scale(root, label="Period", length=1200, orient=tk.HORIZONTAL, from_=0, to=5, resolution=0.1,
+                  command=set_period)
+period.set(1.0)
+period.grid(column=1, row=4)
+
+# Run the Simulation
+# sim_time = 100.0
+sim = Simulator(cbd)
+sim.setRealTime()
+# sim.setProgressBar()
+sim.setDeltaT(DELTA_T)
+sim.setRealTimePlatformTk(root)
+sim.run()
+root.mainloop()

+ 26 - 8
src/CBD/lib/endpoints.py

@@ -8,9 +8,14 @@ class CollectorBlock(BaseBlock):
 	external access (possibly during the simulation).
 	This should allow for live plots w.r.t. an independent
 	plotting framework.
+
+	Args:
+		block_name (str):   The name of the block.
+		input_ports (list): The inputs for the collector.
+		data (Any):         The data that is beeing tracked.
 	"""
-	def __init__(self, name, input_ports, data=None):
-		BaseBlock.__init__(self, name, input_ports, [])
+	def __init__(self, block_name, input_ports, data=None):
+		BaseBlock.__init__(self, block_name, input_ports, [])
 		self.data = data
 
 	def compute(self, curIteration):
@@ -28,9 +33,15 @@ class CollectorBlock(BaseBlock):
 class SignalCollectorBlock(CollectorBlock):
 	"""
 	Collects a single signal to store w.r.t. the arrival time.
+
+	Args:
+		block_name (str):   The name of the block.
+		buffer_size (int):  The maximal amount of values to keep track of.
+							When negative, no buffering will happen.
+							Defaults to :code:`-1`.
 	"""
-	def __init__(self, name, buffer_size=-1):
-		CollectorBlock.__init__(self, name, ["IN1"], [])
+	def __init__(self, block_name, buffer_size=-1):
+		CollectorBlock.__init__(self, block_name, ["IN1"], [])
 		self.buffer_size = buffer_size
 
 	def compute(self, curIteration):
@@ -38,7 +49,7 @@ class SignalCollectorBlock(CollectorBlock):
 		value = self.getInputSignal(curIteration, "IN1").value
 		self.data.append((time, value))
 		if self.buffer_size > 0:
-                        self.data = self.data[-self.buffer_size:]
+			self.data = self.data[-self.buffer_size:]
 
 	def clear(self):
 		self.data.clear()
@@ -56,9 +67,15 @@ class SignalCollectorBlock(CollectorBlock):
 class PositionCollectorBlock(CollectorBlock):
 	"""
 	Collects a X/Y position.
+
+	Args:
+		block_name (str):   The name of the block.
+		buffer_size (int):  The maximal amount of values to keep track of.
+							When negative, no buffering will happen.
+							Defaults to :code:`-1`.
 	"""
-	def __init__(self, name, buffer_size=-1):
-		CollectorBlock.__init__(self, name, ["X", "Y"], [])
+	def __init__(self, block_name, buffer_size=-1):
+		CollectorBlock.__init__(self, block_name, ["X", "Y"], [])
 		self.distance_travelled = 0.0
 		self.buffer_size = buffer_size
 
@@ -67,7 +84,7 @@ class PositionCollectorBlock(CollectorBlock):
 		self.distance_travelled += self.distance_from_last(x, y)
 		self.data.append((x, y))
 		if self.buffer_size > 0:
-                        self.data = self.data[-self.buffer_size:]
+			self.data = self.data[-self.buffer_size:]
 
 	def clear(self):
 		self.data.clear()
@@ -80,6 +97,7 @@ class PositionCollectorBlock(CollectorBlock):
 		return ((x2 - x1) ** 2 + (y2 - y1) ** 2) ** 0.5
 
 	def distance_from_start(self):
+		"""Obtains the distance from the starting position (in the buffer)."""
 		if len(self.data) < 2:
 			return 0.0
 		x1, y1 = self.data[0]

+ 2 - 0
src/CBD/lib/std.py

@@ -19,9 +19,11 @@ class ConstantBlock(BaseBlock):
 		self.__value = value
 
 	def getValue(self):
+		"""Get the current value."""
 		return self.__value
 
 	def setValue(self, value):
+		"""Change the constant value."""
 		self.__value = value
 
 	def compute(self, curIteration):

+ 31 - 4
src/CBD/realtime/plotting.py

@@ -297,7 +297,8 @@ class PlotHandler:
 		self.close_event()
 
 
-def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc_keep=0.5):
+def follow(data, size=None, lower_bound=float('-inf'), upper_bound=float('inf'),
+           lower_lim=0.0, upper_lim=0.0, perc_keep=0.5):
 	"""
 	Compute the new limits for the given dataset if the last data point must be followed.
 	This is a convenience function for updating the plotting axes' limits. Whenever not
@@ -307,13 +308,26 @@ def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc
 		data (list):            The data that must be plotted on the axes. Can be a
 								shortened version of only the final n values (n > 0).
 		size (float):           The total size of the axis to show, even if the data
-								did not get there.
+								did not get there. When :code:`None`, the size is taken
+								from the bounds or limits. Defaults to :code:`None`.
 		lower_bound (float):    The lower bound of the axis, i.e. the minimal value to
 								show, even if the data lies outside of this interval.
 								Defaults to :code:`-float('inf')` (-infinity = no limit).
 		upper_bound (float):    The upper bound of the axis, i.e. the maximal value to
 								show, even if the data lies outside of this interval.
 								Defaults to :code:`float('inf')` (infinity = no limit).
+		lower_lim (float):      Lowest value to show, even if this value is not reached.
+								While :attr:`lower_bound` bounds this point, so no smaller
+								values can be shown, :attr:`lower_limit` makes it so this
+								valus is always shown, but smaller values may still rescale
+								beyond this point. Will be ignored when :attr:`size` is set.
+								Defaults to :code:`0.0`.
+		upper_lim (float):      Highest value to show, even if this value is not reached.
+								While :attr:`upper_bound` bounds this point, so no higher
+								values can be shown, :attr:`upper_limit` makes it so this
+								valus is always shown, but larger values may still rescale
+								beyond this point. Will be ignored when :attr:`size` is set.
+								Defaults to :code:`0.0`.
 		perc_keep (float):      The percentage at which the final data point must be
 								shown. When :code:`0.0`, this point is the lowest value
 								shown. When :code:`1.0`, this point is the highest value
@@ -326,7 +340,9 @@ def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc
 
 	Danger:
 		* The lower bound must be strictly smaller than the upper bound.
+		* The size is :code:`None` and the bounds are infinity and the limits are equal.
 		* The size cannot be larger than the distance between the bounds.
+		* The lower limit must be smaller than (or equal to) the upper limit.
 
 	Examples:
 		- Follow a sine wave in the positive-x direction, always keeping a width of 10, in matplotlib.
@@ -353,8 +369,19 @@ def follow(data, size, lower_bound=-float('inf'), upper_bound=float('inf'), perc
 			manager.register("sin", cbd.findBlock("plot")[0], (fig, ax), LinePlot())
 			manager.connect('sin', 'update', lambda d, a=ax: a.set_xlim(follow(d[0], 10.0, 0.0, perc_keep=0.9)))
 	"""
-	assert lower_bound < upper_bound, "Lower bound must be strictly smaller than the upper bound."
-	assert upper_bound - lower_bound >= size, "Invalid size: outside bounds."
+	if lower_bound >= upper_bound:
+		raise ValueError("Lower bound must be strictly smaller than the upper bound.")
+	if size is None and (lower_bound == float('-inf') or upper_bound == float('inf')) and lower_lim == upper_lim:
+		raise ValueError("When size is unset, the bounds may not be infinity and the limits may not equal each other.")
+	if size is not None and upper_bound - lower_bound < size:
+		raise ValueError("Invalid size: outside bounds.")
+	if lower_lim > upper_lim:
+		raise ValueError("Lower limit must be smaller than (or equal to) the upper limit.")
+
+	if size is None:
+		if len(data) == 0:
+			return lower_lim, upper_lim
+		return min(min(data), lower_lim), max(max(data), upper_lim)
 	if upper_bound - lower_bound == size:
 		return lower_bound, upper_bound
 	if len(data) == 0:

+ 2 - 0
src/build/lib/CBD/lib/std.py

@@ -19,9 +19,11 @@ class ConstantBlock(BaseBlock):
 		self.__value = value
 
 	def getValue(self):
+		"""Get the current value."""
 		return self.__value
 
 	def setValue(self, value):
+		"""Change the constant value."""
 		self.__value = value
 
 	def compute(self, curIteration):