next up previous
Next: Nodes Up: User Manual: Building Simulator Previous: User Manual: Building Simulator

Subsections

   
Running the Building Simulator

   
Starting the Building Simulator

Let $Simulator and $Configurations denote the directories in which the compiled code of the building simulator and building configurations reside, respectively.

To start, ERLANG has to be told where the code of the building simulator resides and which building configuration shall be used in simulation. Telling ERLANG where the code resides can be done either by starting ERLANG in the directory $Simulator or by providing $Simulator as a command line option:

erl -pa $Simulator
To start the building simulator with a specific building configuration means to call the function simulator:start($Conf,$Dir). The configuration loaded in this case is the file $Dir/$Conf.cfg. This can be abbreviated by calling the functions simulator:start($Conf) to load $Configurations/$Conf/$Conf.cfg or simulator:start() to load a default configuration. $Conf and $Dir can be file, resp. directory names enclosed in double-quotes. If $Conf is an atom according to ERLANG-syntax the double-quotes can be omitted.

These functions can be called from the ERLANG-shell or by using one of the following command-line options:

-s simulator start $Dir $Conf
-s simulator start $Conf
-s simulator start
-s simulator
The last two forms are equivalent. In the ERLANG-shell instead of simulator:start the function r can be used alternatively.

To stop ERLANG automatically after finishing simulation one can append the command-line option -s erlang halt to the call of ERLANG. The complete call can have the following form:2

erl -pa $Simulator -s simulator start $Dir $Conf -s erlang halt

   
Stopping the Building Simulator

A running ERLANG-process can be interrupted by pressing ^C and then left by pressing a. If the ERLANG-shell is active calling the function halt(). stops ERLANG and the building simulator. Note the period after the parentheses!

   
Configuration File

When starting the building simulator a configuration file is read which contains information on where to find a description of the simulation objects and on the eventstreams to be started. Its file extension is .cfg. The entries in the file consist of valid ERLANG-terms, their syntax is described in the subsequent sections.

The files accessed by the building simulator are depicted in figure 1. Solid lines denote dataflow, whereas the dotted lines denote that which files are actually used depend on the configuration file. The file extensions used are also shown in this diagram.

  
Figure 1: Files used
\begin{figure}
\begin{center}
\leavevmode
\epsfig{file=dataflow.eps} \end{center}\end{figure}



Footnotes

... form:2
Such a command is provided for team3 members as startgebsim.sh in the directory ~team3/Basis-Projekt.BaX/bin.

next up previous
Next: Nodes Up: User Manual: Building Simulator Previous: User Manual: Building Simulator
deiss@informatik.uni-kl.de