DESMO-J at Work

Introduction

   
 

Having no idea how a running DESMO-J model might look like, this is the right place to find out. DESMO-J offers two possibilities to run a model:

  • In the plain variant you start a simulation run by calling a model’s main() method. At the end of the simulation run DESMO-J automatically produces several pre-formatted output files containing results, a trace and some debug information. For any output to the console during the simulation run you have to put appropriate System.out.println() statements into your code.
  • Since version 2.0, DESMO-J comes with a simple graphical user interface (GUI) which aids the user in running experiments. This GUI integrates some basic visualisations like plotting model values as time series.

This section provides you with the opportunity to try out a working model in either the plain or the graphical variant. The model used in both cases is rather simple. It focuses on the allocation of berths (docking space at a quay) to incoming container ships (see image below). There are eight equal-sized berths on the quay in question. Every time a ship arrives it tries to allocate one, two, or three of these berths depending on its size. If there is enough space available, the container ship docks and starts unloading its freight. Otherwise, it has to wait in a queue until other ships leave the port and free the occupied berths.

A visualisation of the model



   
  http://desmoj.sourceforge.net/tutorial/at_work/0.html