finish assignment

This commit is contained in:
Joeri Exelmans 2024-12-13 14:28:07 +01:00
parent 15925636d7
commit 321cb4871e
2 changed files with 52 additions and 2 deletions

View file

@ -97,8 +97,25 @@ The specification of the semantics of the Atomic DEVS blocks is entirely determi
</ul>
</p>
<h2>Goal: Performance Analysis</h2>
<p>We will do performance analysis, comparing combinations of the following parameter values:</p>
<h2>What is expected</h2>
<p>First of all, you are <em>given</em> an implementation of the following AtomicDEVS blocks, which you must not edit:</p>
<ul>
<li>Generator
<ul><li><b>out_ship (Ship)</b>: output port on which an event is sent when a ship is generated.</li></ul>
</li>
<li>Sink
<ul><li><b>in_ships (list of Ship)</b>: input port on which an event is sent when ships leave a lock. For each ship, the time duration spent in the system is computed and stored.</li></ul>
</li>
</ul>
<p>You will:</p>
<ul>
<li>Implement the AtomicDEVS blocks for Queue, RoundRobinLoadBalancer, FillErUpLoadBalancer and Lock.</li>
<li>Think of the interfaces of these blocks (input/output ports and their events) and the protocol spoken by them.</li>
<li>Finally, in the CoupledDEVS block representing the entire system, you will have to make the right connections (which of course depends on the input/output ports that you have defined in your AtomicDEVS).</li>
</ul>
<h2 id="goal">Goal: Performance Analysis</h2>
<p>Once you have implemented the system, we will do performance analysis, comparing combinations of the following parameter values:</p>
<ul>
<li><b>max_wait_duration (float)</b>: we will try 0, 2, 4, 6, 8 minutes.</li>
<li><b>priority (enum)</b>: we will try giving priority to bigger and smaller ships.</li>
@ -106,5 +123,36 @@ The specification of the semantics of the Atomic DEVS blocks is entirely determi
</ul>
<p>More specifically, we would like to know under which (combinations of) parameter values the (avg/min/max) duration that ships spend in the system is minimized. Also, we'd like to know if one choice (e.g., prioritize bigger) always better than another choice (e.g., prioritize smaller), or does it depend on the choices made for the other parameters?</p>
<h2>Getting Started</h2>
<ol>
<li>Clone the <tt>mosis24</tt> branch of <a href="https://msdl.uantwerpen.be/git/jexelmans/joeriPDEVS/src/mosis24">this git repository</a>.</li>
<li>Under the <tt>assignment</tt> directory, you'll find the following files:
<ul>
<li><tt>runner.py</tt> This script runs the simulation for all combinations of parameter values as described in the <a href="#goal">Performance Analysis</a> section. It will generate <tt>.csv</tt> files with the time durations that each ship has spent in the system. Every row is a ship (500 ships, so 500 rows total), and every column represents a different value for the <b>max_wait_duration</b> parameter. It will also generate a <tt>plot.gnuplot</tt> file, which you can run with gnuplot as follows:
<pre>gnuplot plot.gnuplot</pre>
which will result in a number of SVG files containing plots of the CSV files.
<p>You are only allowed to make temporary changes (for debugging) to this file.</p>
</li>
<li><tt>system.py</tt> Contains the full system, modeled as CoupledDEVS. You need to edit this file.</li>
<li><tt>atomicdevs.py</tt> Contains skeletons for the AtomicDEVS blocks that you must implement. You need to edit this file.</li>
<li><tt>environment.py</tt> Contains implementations of the Generator, Sink and Ship types. You must not edit this file.</li>
</ul>
</li>
</ol>
<h2>Attention!</h2>
<p>You must stick to the rules of DEVS:</p>
<ul>
<li>The functions <tt>timeAdvance</tt> and <tt>outputFnc</tt> are purely <em>getters</em>! They must not mutate the DEVS state, or any variable, anywhere.</li>
<li>The functions <tt>extTransition</tt> and <tt>intTransition</tt> may mutate <em>ONLY</em> the DEVS state.</li>
</ul>
<p>Any violation of these rules results in an incorrect solution. Points will be subtracted.</p>
<h2>Extra Material</h2>
<ul>
<li>This assignment was inspired by the queueuing example, which you can in <tt>examples/queueing</tt>.</li>
</ul>
</body>
</html>