% -----------------------------------
% | manager.tex -- date: 2001-07-06 |
% | (c) manager group               |
% -----------------------------------

% ---------- to do ``list'' ----------------
% * update description of source! cman_sim, cman_prog
% * update parameter tableau!
% * SEQUENCE diagram (CMAN_Sim)!!!
% * update/create chapter about USE cases
% ------------------------------------------

% done (30.6.01):
% * new class diagram (2 times)
% * updated description of source (2 times)

% done (6.6.01):
% * new class diagram


\section{Introduction}

Warning: This is the introduction, we wrote before we started working on the project,
so there might be some things that have changed now and will be updated as soon as possible.

The problem, that we have to solve, is the development and implementation of a
\emph{multi agent system (MAS)} in the programming language Java. This MAS consists
of a fixed number of agents, who are distributed by random in an environment
(the world).\\

This world is divided in quadrants, which have the same size each.\\

The target of the agents is to explore/visit a maximum of the world's surface
in their limited lifetime.\\

In which direction (in degrees from 0 to 359) an agent moves, is determined/decided
by its neuro controller before each step. If two (or more) agents want to move to
the same point at the same time, none of them is allowed to move and the agent's
bumper neuron is activated. A bumper neuron is included in the decision ``Where shall
I go'' next time, and so should help to avoid the same fault when deciding where
to move next time.\\

The neuro controller is an ANN, which consists of at least two input neurons (radius and
angel), a variable number of hidden neurons and a number of output neurons, that
has to be fixed later.\\

To be able to solve the problem, the first generation of agents include a
randomly produced \emph{genectic algorithm (GA)}.
In every following generation (what means: after every evolution step) the
``genetic material'' of the \emph{fittest}\footnote{How fit an agent is, is
determined by a fitness function.} agents gets mutated and then is forwarded to
the next/following generation.\\

In this manner the agents become more successful in solving their ``job'' with time.\\

The life cycle of the agents:
\begin{itemize}
   \item When the system is started the first time, the position of the agents
         (on the world) and their neuro controller are initialized (randomly).
         If the actual generation is not the first one, then the evolved neuro
         controllers of the predecessor generation are imported.
         
   \item In every cycle (during their lifetime) the agents move in the direction
         computed by their neuro controller.
         
   \item At the end of the lifetime of an agent, his fitness is determined. This
         is done by using/applying a ``multi-objective fitness function''. The
         success an agent had solving the problem, influences the adaption of
         the connection weights of the neuro controller.
         
         The selection criterium (number of places visited)is used for the
         ``multi objective tournament selection'' (for the mating pool).
         Evolutionary mechanismns are the starting point for the next generation,
         which starts its lifecycle as described above.
\end{itemize}

So, the agents are ``learning'' evolutionaryly, that means they don't improve
their behavior during their lifetime, but they give their ``knowledge''
to the next generation (except they belong to the last generation, of course).\\

The agents in our system have the following characteristica:

\begin{enumerate}
   \item reactive: they recognize other agents in their sensor range und react
         upon them (communicate and -- if possible -- pass by them)

   \item autonomous: they control their communication and their moves

   \item indirect goal-oriented: they react in response to their environment,
         but have means to act goal-oriented (with respect to the generation goal)

   \item temporally continous: per generation, since we investigate a generational
         based evolutionary system (contrary to a steady state system)
         
   \item communicative: they communicate with other agents about agents

   \item not learning: they learn evolutionaryly, but don't learn during their
         lifetime.
   
   \item mobile: they move from one point (in their environment) to another one.
   
   \item not flexible characters: their actions are scripted/predefined (first
         communicate, then select direction to move)
\end{enumerate}



\subsection{Extensions}
An improvement/extension of the system is for example, if the sensors of the agents
are also part of evolution. That means, that an agent e.g. can be ``better'' if
he notices more in the front then in the back, instead of having the same
number of sensors in every direction.\\

This extension of the ``old elc'' will be realised in our project.


\subsection{Field of application}
A possible use of this MAS is the classification of satellite pictures: the agents
are distributed (randomly) on the picture, and then should ``explore'' (classify)
the whole satellite picture as fast as possible.


% coming soon ...
%\section{USE cases}
%\subsection{Primary USE cases}
%\ldots \, \ldots



\section{Interfaces to other Groups}

These are the interfaces we provide for other groups:

\begin{itemize}
    \item IMAN\_Stat:\\
          includes the method getStatistics(), which returns a CNVList. For a detailed
          description see CMAN\_Sim, who implements IMAN\_Stat.

    \item IMAN\_Save:\\
          contains the method saveState(list :CNVList), loadState(list :CNVList) which
          return boolean both. The third mehtod in IMAN\_Save is createBean(), which
          returns an object of the type IMAN\_Bean.
          
    \item IMAN\_Bean:\\
          contains the method show(int agentId), which has to be implemented by all
          groups, that created a java bean. This method is called by the manager package
          to tell the called groups to update the visualization of their bean.

\end{itemize}

An enumeration of \emph{all} the interfaces our package includes,
can be found in subsection \ref{man:interfaces}.



\section{Parameters}

\subsection{Standard parameter file}

This XML file (standard.xml) contains the standard parameter for the simulations.
Hence the parameter manager loads it every time the user starts the program.
The structure of the file is defined as follows (according to the definition in
the class CNVList):

\begin{verbatim}
<CNVList version="3" build="0">

    <!-- possible types : INT, DOUBLE, STRING, BOOLEAN -->
    <item name="intforyou" type="INT">
          <value>326</value>

          <!-- interval limits: -->
          <min>2</min>
          <max>532</max>

          <!-- commentary field: additional information for the user -->
          <info>if there are no min or max values in the list they are also
                missing completely in the xml file (same for info)
          </info>
    </item>
    <item name="double" type="DOUBLE">
          <value>7.45</value>
          <info>when there are no min max values it looks like this</info>
    </item>
    <item name="noinfo" type="BOOLEAN">
          <value>true</value>
    </item>
    <item name="finally" type="STRING">
          <value>string with info</value>
          <info>asdf</info>
    </item>
    <item name="etc" type="STRING">
          <value>...</value>
    </item>
    ...
    ...
</CNVList>
\end{verbatim}

The following parameters(with their standard values) are avaible at the moment:\\

\begin{tabular}{|l|l|c|c|c|}
\hline
Name & Type & Value & Min & Max \\ \hline
MANmaxGenerations & Integer & 100 & 1 & \\
MANstepsperGen & Integer & 50 & 1 & \\
MANnumberofAgents & Integer & 8 & 2 & 100 \\ \hline
GALmaxNumberofSensors & Integer & 4 & 1 & 360 \\
GALmaxInterpolNodes & Integer & 8 & 3 & 100 \\
GALcrossoverPoints & Integer & 1 & 1 & 2 \\
GALmutationRate & Double & 0.01 & 0 & 0.5 (excl 0.5)\\
GALcrossoverRate & Double & 0.01 & 0 & 0.5 (excl 0.5)\\
GALmaxHiddenNeurons & Integer & 8 & 2 & 100 \\ \hline
WODpredefined & Integer & ? & ? & ? \\
WODfilename & String & - & - & - \\ \hline
\end{tabular}

\section{Class Diagrams (UML)}

%\subsection{Classes}
Here you find our latest class diagrams.

   \includegraphics[width=150mm]{Manager/Pics/Class_Diagram1.eps}

   % 150 x 230 mm
   
   \includegraphics[width=150mm]{Manager/Pics/Class_Diagram2.eps}



\section{Sequence Diagrams (UML)}
A sequence diagram of the simulation manager's interaction with other classes will
be included soon.



\section{Description of the Manager Package \emph{PMAN}}


\subsection{Details of the Manager Package (PMAN)}

\subsubsection{Classes and methods}

We shared out the functionality to the following four classes.

\begin{itemize}

    \item elc\\
    This class starts and stops the whole program when starting in batch mode. At the moment
    the class elc ``simulates'' the user input for testing purposes, later it will be
    used to start the program.

    \begin{itemize}
        \item main(arg String[])
        \item getPosition(String s, array String[]) :boolean\\
              checks if a String ``s'' is included in a String array.
    \end{itemize}


    \item CMAN\_Prog: (implements IMAN\_Prog, extends Thread)\\
    The program manager CMAN\_Prog contains the methods, that allow the user to
    start, stop, suspend, resume and save simulations when operation in GUI mode.
    The program manager also organizes up to ten simulations.\\
    
    The class includes the following methods:

	\begin{itemize}
          \item setmaxSim(int zahl)\\
                With this method the maximum number of simultaneous running simulations can be set to
                a value ``zahl''.

	  \item getmaxSim() : int\\
                This method returns the maximum number of simultaneous running simulations allowed.
                
          \item run()\\
                is necessary, because CMAN\_Prog extends the class Thread.

	  \item startSimulation(String name, boolean batch) : boolean\\
                This function starts a new simulation with the name ``name''.
                The name is important for the differentiation of the (parallel) 
                running simulations and for the storing. The second argument ``batch''
                indicates if the simulation should be started in GUI or in
                batch mode (``true'' = batch, ``false'' = GUI)

          \item startSimulation(String name, boolean batch) : boolean\\
                This method creates a simulation ``name''. If the simulation has to start
                in GUI mode or in batch mode is defined in the variable ``batch'':
                ``true'' means start in batch mode, ``false'' means start in GUI mode.

          \item startSimulation(String name, boolean batch, IERR\_gui ref) : boolean\\
                works as the mehtod described above, but needs a reference on the
                error classs of the GUI.

	  \item initGUI()\\
                is necessary, when starting main program in GUI mode.

          \item initBatch(String name, String file)\\
                is necessary, when starting main program in batch mode. The string ``name'' specifies
                the name of the simulation to be started. With the parameter ``file''
                an alternative XML file can be declared.

	  \item suspendSim(String name)\\
                This function suspends the simulation with the name ``name'' until
                the user reactivates the simulation or closes the program.

          \item getPos(String[] arr, String s) :int\\
                returns the position of a simulation with the name ``s'' in an array ``arr''.

	  \item resumeSim(String name)\\
	        This function resumes a simulation (which has been supended before)
                with the name ``name''.

	  \item killSim(String name)\\
	        The function killSim() stops the (active) simulation with the name ``name''.

          \item saveSim(String name)\\
                This method saves a simulation ``name'', what means the subdirectory ``name''
                is created and all necassary data (e.g. XML files) is saved there.

          \item loadSim(String name) : boolean\\
                This methods loads a simulation ``name''.
          
          \item closeProgram()\\
                The method closeProgram() is called, when the user wants to leave elc.
          
          \item switchGUIBatch(String name, mode boolean)\\
                This method lets the user switch between GUI and batch mode. ``name'' is
                the name of the simulation to be switched and ``mode'' indicates the
                if batch or GUI mode should be started (batch = ``true'', GUI = ``false'').
                
          \item getGUIreference() : IERR\_gui\\
                gives back a reference on the GUI to the calling object.

          \item getErrorReference() : CERR\\
                returns a reference of the error class to the calling object. (Every
                simulation has it's own error class).
          
          \item createBean\_AGT(String name) : IMAN\_Bean\\
                is called to create the Agent's Bean in GUI mode and returns it to the calling
                object. ``name'' is the name of the simulation, the Bean belongs to. (This
                method calls createBean\_AGT() in the simulation ``name''.)

          \item createBean\_ANN(String name) : IMAN\_Bean\\
                is necessary for visualizing the ANN bean.
                ``name'' is the name of the simulation, the Bean belongs to.
                This method calls createBean\_ANN() in the simulation ``name''.

          \item createBean\_GAL(String name) : IMAN\_Bean\\
                is necessary for visualizing the GAL bean.
                ``name'' is the name of the simulation, the Bean belongs to.
                This method calls createBean\_GAL() in the simulation ``name''.
                    
          \item createBean\_WOD(String name) : IMAN\_Bean\\
                is necessary for visualizing the WOD bean.
                ``name'' is the name of the simulation, the Bean belongs to.
                This method calls createBean\_WOD() in the simulation ``name''.
                
          \item createBean\_STA(String name) : IMAN\_Bean\\
                is necessary for visualizing the STA bean.
                ``name'' is the name of the simulation, the Bean belongs to.
                This method calls createBean\_STA() in the simulation ``name''.

          \item setReference(String name, IERR\_gui ref)\\
                gives the simulation ``name'' a reference to the error class of
                the GUI.

          \item exists(String name) : boolean\\
                This method is necessary to see if a simulation ``name'' exists.
                If the simulation exists, ``true'' is returnec to the calling object,
                otherwise ``false''.
                
	\end{itemize}

	\item CMAN\_Param: (implements IMAN\_Param)\\
        The job of the parameter manager is to deal with the necessary parameter for the program.
	First it must be possible to read parameters from a XML file and to save parameters to a XML file.
	Secondly it is important that the user can manipulate the parameter with the help of the GUI. For
	this operations the parameter manager uses the methods:

 	\begin{itemize}
          \item CMAN\_Param()\\
                is the constructor of CMAN\_Param.

          \item getparamList() : CNVList\\
                returns the CNVList ``paramList'' (the only variable of CMAN\_Param).

          \item readParameter(String filename)\\
                The readParameter function reads the parameter from an XML file and stores them in a CNVList
                with the help of the CNVList class.

          \item saveParameter(String filename)\\
		This function saves the parameter (CNVList) with the help of the CNVList class in a XML file.

	  \item changeParameter(CNVList list)\\
		This function changes one parameter in the actual parameter list (type: CNVList).
                If the requested parameter is not in the list, the parameter manager sends a warning
                to the user (GUI).


	\end{itemize}

    \item CMAN\_Sim: (implements IMAN\_Sim, IMAN\_Stat, extends Thread)\\
    Every simulation is represented by an instance of the simulation manager (CMAN\_Sim). The
    simulation manager's task is to handle everything that is necassary for running a simulation
    (including saving the current state and the actual parameters). The simulation manager creates
    instances of all other classes, which are needed to run a simulation (e.g. GA, WOD, \ldots).\\

    The schemata/algorithm (the order of instantiation), which CMAN\_Sim includes
    is described in subsection \ref{man:simAlg}

    The following methods are defined in the simulation manager:

	\begin{itemize}
          \item CMAN\_Sim(CMAN\_Prog ref, CNVList list, String simname)\\
                is the constructor of the simulation manager. It contains a reference
                on the program manager, a CNVList list (which contains the simulation's
                parameters) and the name of the simulation. This constructor is used,
                when a simulation is started in batch mode.

          \item CMAN\_Sim(CMAN\_Prog ref, CNVList list, String simname, IERR\_gui gref)\\
                is another constructor of the simulation manager. It works as the constructor
                above, but also needs a reference on the error class of the GUI. This constructor
                is used, when a simulation is started in GUI mode.
                         
          \item run()\\
                The method run() is the ``heart'' of our project, there the main algorithm
                is implemented. It has the highest ``control level'' above all other mehtods
                implemented in CMAN\_Sim.

          \item init()\\
                initialices (and creates instances of) all other classes (packages) needed
                to run a simulation.

          \item susp()\\
                sets variable suspendFlag = true. When next time checked, the simulation
                will be halted.

          \item res()\\
                sets variable suspendFlag = false. When next time checked, the simulation
                will be resumed.

          \item waiting()\\
                is necessary to break a simulation. The method waiting() is running as long
                as the supendFlag is set to false.

          \item getParameter(String s, int type) : CNVList\\
                This method returns the parameter with the name ``s'' and a specified type,
                defined by the integer variable ``type'' in form of a CNVList, when called up
                by any object asking for a parameter. In the case a parameter doesn't exit
                an empty CNVList is returned (to the calling object).

                The following types are possible (as defined in CNVPair.java):
                \begin{itemize}
                     \item CNVPair.INT
                     \item CNVPair.DOUBLE
                     \item CNVPair.STRING
                     \item CNVPair.BOOLEAN
                     \item CNVPair.UNDEFINED
                \end{itemize}

          \item addParameter(CNVList list)\\
                This method makes it possible to add a new parameter to a CNVList ``list''.
                
          \item setBatch(boolean batch)\\
                sets batchFlag to ``true''. When the batchFlag's state is controled
                next time, the program will switch from GUI to batch mode.
                
          \item setcloseFlag(boolean flag)\\
                sets closeFlag to ``true''. The simulation gets closed, when the closeFlag
                is controlled next time.

          \item saveState()\\
                sets saveFlag to ``true''. This causes, that the simulation is saved nex time.

          \item laodState()\\
                loads the latest files of the calling simulation.

          \item saveStatetoFile()\\
                The method saveStatetoFile() instructs all other packages/groups to create
                a file each, in which the current state of the group is saved (in XML format).
                The filenames of the files (in which the groups internal state is saved) then
                gets submitted to CMAN\_Sim, where saveStatetoFile() saves all these names in
                the current simulations' directory to a file ``gen''+ generation-number +``.xml''.

          \item getSimName() : CNVList\\
                retuns for every object the name of the simulation the object belongs to as
                a CNVList.

          \item getGeneration() : int\\
                returns the actual generation to the calling simulation.

          \item putANN(CNVList list) : CNVList\\
                puts CNVList ``list'' to ANN by calling CANN.putANN(list) and returns a
                CNVList.

          \item putSen(CNVList list)\\
                puts CNVList ``list'' to sensors.

          \item getAnnOutput(CNVList list) : CNVList\\
                returns the output of the ANNs to the calling object.
                
          \item getStatistics() : CNVList\\
                This method (which is derived from the interface IMAN\_Stat) calls all other
                objects (which implement IMAN\_Stat) to run their version of getStatistics().
                The CNVLists (= the return-value of getStatistics()) then are brought together
                to one CNVList, which gets passed on to the statistic package.
            
          \item createBean\_AGT() : IMAN\_Bean\\
                tells the agent package to create a Java Bean, which is returned to the
                caller of this method. (only in GUI mode).
          
          \item createBean\_ANN() : IMAN\_Bean\\
                creates the ANN Java Bean of the current simulation (only in GUI mode).
                
          \item createBean\_GAL() : IMAN\_Bean\\
                creates the GAL Java Bean of the current simulation (only in GUI mode).
          
          \item createBean\_WOD() : IMAN\_Bean\\
                creates the WOD Java Bean of the current simulation (only in GUI mode).
          
          \item createBean\_STA() : IMAN\_Bean\\
                creates the GAL Java Bean of the current simulation (only in GUI mode).

          \item setabletoLoad(boolean val)\\
                makes it possible to set a simulation ``loadable'' or not.
          
    \end{itemize}

\end{itemize}


\subsubsection{Interfaces} \label{man:interfaces}

\begin{itemize}
    \item IMAN\_Prog:\\
          includes the following methods:
          \begin{itemize}
              \item startSimulation(String name, boolean batch) : boolean
              \item startSimulation(String name, boolean batch, IERR\_gui ref) : boolean
              \item suspendSim(String name)
              \item resumeSim(String name)
              \item killSim(String name)
              \item saveSim(String name)
              \item loadSim(String name) : boolean
              \item closeProgram()
              \item switchGUIBatch(String name, mode boolean)
              \item createBean\_AGT(String name) : IMAN\_Bean
              \item createBean\_ANN(String name) : IMAN\_Bean
              \item createBean\_GAL(String name) : IMAN\_Bean
              \item createBean\_WOD(String name) : IMAN\_Bean
              \item createBean\_STA(String name) : IMAN\_Bean
              \item setReference(String name, IERR\_gui ref)
              \item exists(String name) : boolean
              
          \end{itemize}
          (Description: see CMAN\_Prog)

    \item IMAN\_Param:\\
          includes the following methods:
          \begin{itemize}
              \item readParameter(String filename)
              \item saveParameter(String filename)
              \item changeParameter(CNVList list)
              \item getparamList() : CNVList
          \end{itemize}
          (Description: see CMAN\_Param)

    \item IMAN\_Sim:\\
          includes the following methods:
          \begin{itemize}
              \item getParameter(String s, int type) : CNVList
              \item addParameter(CNVList list)
              \item saveState()
              \item getSimName() : CNVList
              \item getGeneration() : int
              \item putANN(CNVList list) : CNVList
              \item putSen(CNVList list)
              \item getAnnOutput(CNVList list) : CNVList
          \end{itemize}
          (Description: see CMAN\_Sim)

    \item IMAN\_Stat:\\
          includes the method getStatistics(), which returns a CNVList. For a detailed
          description see CMAN\_Sim, who implements IMAN\_Stat.

    \item IMAN\_Save:\\
          contains the method saveState(), which returns a CNVList.

    \item IMAN\_Bean:\\
          contains the method show(int agentId), which has to be implemented by all
          groups, that created a java bean. This method is called by the manager package
          to tell the called groups to update the visualization of their bean.
\end{itemize}



\subsection{Important definitions}

\subsubsection{Communication}

It was layed down that all communication is running over CMAN\_Sim (the simulation manger).\\

The format in which the classes exchange data is the CNVList (even if only one integer value
is transmitted a CNVList has to be created).


\subsubsection{Name conventions}

Names of methods and variables have to fit this:
\begin{itemize}
     \item give \emph{intelligent names}, who describe what the method/variable is for.
     \item allowed characters:
        \begin{itemize}
            \item letters a-z and A-Z and
            \item numbers 0-9
            \item ``:'' is used as seperator
            \item names have to begin with a lowercase letter
        \end{itemize}
\end{itemize}

Names of parameters hava a maximum leght of 20 characters.


\subsubsection{General conventions}

\begin{itemize}

    \item class names have to begin with a \textbf{C},\\
          interface names have to begin with an \textbf{I}\\
          and after that letter depending on the group follows:
          \begin{itemize}
              \item \textbf{MAN} for manager
              \item \textbf{AGT} for agents and sensors
              \item \textbf{WOD} for world
              \item \textbf{ANN} for ANN
              \item \textbf{GUI} for GUI
              \item \textbf{STA} for statistic
              \item \textbf{GAL} for GA
          \end{itemize}

   \item Every group/modul joins their classes in a package.\\
         The package name begins with a \textbf{P} followed by the three
         characters as defined before. Subpackages also have to fullfill this
         naming conventions, but the four ``starting characters'' can be
         followed by any characters.

   \item The file format in which data is saved is XML.\\
         There's only one exeption: the ANN package saves their net structures in
         SNNS (Stuttgarter Neuronaler Netz Simulator) format.

   \item The class elc contains the main method.
\end{itemize}



\subsection{Order of instantiation} \label{man:simAlg}
% does this belong to this section?

In this subsection we want to describe, how the algorithm implemented in the
simulation manager CMAN\_Sim looks like:
\begin{enumerate}
	\item call GA constructor
	\item call ANN constructor
	\item call WOD constructor
	\item call AGT constructor
	\item call GA's method getPhenotypeAll() $\Rightarrow$ AGT's method setPhenotypes()
              gets called and the necessary information for the ANN group is returned.
	\item call AGT's method setAgentsStartingPositions().\\
              (at the moment not possible, because non-existing data of the WOD group)
	\item from this point on it's only theory
	\item call AGT's createPopulation()
    \item \ldots (to be continued)
\end{enumerate}



\subsection{Running the program}

\subsubsection{General Overview}
The user has the possibility to choose between two modes of running ``elc'':
\begin{enumerate}
    \item \textbf{The Batch mode}\\
          The program starts without a GUI, there is no possiblity to save a simulation,
          but at the program start the user can specify a simulation to be loaded.
          It is not possible to run more than one simulation at the same time in
          batch mode, but the advantage of the batch mode (compared to the GUI mode)
          is, that the simulation runs faster.

    \item \textbf{The GUI mode}\\
          Needless to say, that the program starts with a GUI. The GUI mode offers
          the user the possiblity to view statistics and graphics (output of packages),
          change parameters, give the simulations names, \ldots \, . It's also
          possible in GUI mode to have up to 10 simulations running at the same time.
          Simulations can be stopped, saved, resumed or killed.\\
          As an addition it's possible to change from GUI mode to batch mode, in which
          the program runs until the end of the simulation has been reached.
          This has the advantage, that the user can change parameters more comfortable
          by using the GUI and then can switch to the faster batch mode to save time
          when running the simulation.
\end{enumerate}


%\subsubsection{Features}
%\ldots coming soon \ldots



%\section{Visualisation (Screenshots)} % not for us!



\section{Protocols}

\subsection{``Old'' Protocols}
We don't think that it makes much sense to translate our ``old'' protocols from
german to english, because most of the assignments made there are obsolete now.

\subsection{2001/05/18}

\begin{enumerate}
  \item \textbf{Responsible person for protocol:} Sebastian Gumpold
  \item \textbf{Participating persons:} Supervisor Mag. DI Roland Schwaiger and
                                        members of all groups
  \item \textbf{Topics talked about:}
    \begin{itemize}
      \item[\textbf{Manager}]
         \begin{itemize}
            \item problems with the first ``combination tests'' of the packages
                  (not every group did send a .jar-file -- only agents and GA)
            \item what's needed for testing:
                 \begin{itemize}
                    \item classes of all other groups
                    \item info, which methods the groups need, respectivly provide
                          for others
                    \item info, about in what order the methods have to be called,
                          from whom we (manager) get the info needed, respectivly
                          where do the groups want us to send their infos
                    \item what \emph{parameters} do the groups need, respectivly
                          provide
                    \item the groups need to send their classes in form of packages
                          (consider naming conventions: ``P'' + name of the group)
                    \item also send the .java-files of your classes/interfaces for
                          testing purposes
                 \end{itemize}
            \item type ``CNVList'' is included in the package ``PNVList''
            \item hints:
                 \begin{itemize}
                    \item How does the method getParameter() work (what parameters
                          does this method need)?\\
                          example call: getParameter(String s, CNVPair.INT), and
                          not variables of type int or String (like ``int'')
                    \item The simulation manager's name is ``CMAN\_Sim''
                 \end{itemize}
            \item the name of the simulation manager is not saved in the standard
                  XML file, the groups can get it by calling the method \textbf{getSimName()}.
                  This method returns a CNVList with the root element $<$SimName$>$,
                  which contains the name of the simulation the calling object
                  belongs to, as a String.
         \end{itemize}
      
      \item[\textbf{Agents/Sensors}]
         \begin{itemize}
            \item constructor (to be called by the simulation manager) is
            
                  CAGT\_MAN(\&referenceOnSimMan)
            \item there are the following methods (listed in the order they shall
                  be called):
                  \begin{enumerate}
                     \item void setPhenotypes(CNVList)
                     \item void setAgentsStartingPositions(CNVList)
                     \item boolean createPopulation()
                     \item move is divided in two functions:
                        \begin{itemize}
                           \item public CNVList getAllAnnInputs(CNVList)
                           \item CNVList setAllAnnOutputs(CNVList)
                        \end{itemize}
                     \item void setNewPosition(CNVList)
                  \end{enumerate}
                  (for details see manager chapter)
            \item new assignment: type of sensor range is ``double'', not ``int''
         \end{itemize}
         
      \item[\textbf{ANN}]
         are currently implementing method calc(), other details, such as parameters
         will be send by mail.
      
      \item[\textbf{World}]
         \begin{itemize}
            \item new class CWOD\_COM
            \item parameters needed can be found in the world's chapter
            \item methods
               \begin{itemize}
                  \item boolean create(CNVList)
                  \item getLocalWorld()
                  \item realmove()
                  \item \ldots details in ``world chapter''
               \end{itemize}
         \end{itemize}
    
      \item[\textbf{GUI}]
         conventions:
         \begin{itemize}
            \item groups/classes ask parameter manager for parameters, if
                  the parameter asked for, does not exist, the request for the
                  parameter is forwarded to the GUI package (user)
            \item help file format is XML
         \end{itemize}
         
      \item[\textbf{GA}]
         news can be found in GA chapter or are submitted per mail
    \end{itemize}
    
\end{enumerate}



\subsection{2001/06/01}

\begin{enumerate}
  \item \textbf{Responsible person for protocol:} Sebastian Gumpold
  \item \textbf{Participating persons:} Supervisor Mag. DI Roland Schwaiger and
                                        members of all groups
  \item \textbf{Topics talked about:}
    \begin{itemize}
      \item[\textbf{Manager}]
          \begin{itemize}
             \item General problems
                \begin{itemize}
                   \item problems with gzipped paper
                   \item the paper is too big ($>$ 15 MB)
                   \item the manager group was able to instantiate all packages
                         except of the GUI's package and the statistic's package
                \end{itemize}
             \item Changes
                \begin{itemize}
                   \item The parameter of the group's constructors has to be
                         changed from a reference on ``CMAN\_Sim'' to a reference
                         on ``IMAN\_Sim''. This makes compatibility tests for
                         each group easier, and the program gets more flexible.
                   \item The statistic group has to create the fitness function,
                         to the fact that this group has all necessary data for
                         defining it.
                \end{itemize}

              \item Hints for programming:\\
                    When using the CNVList the constants
                    \begin{itemize}
                       \item CNVPair.INT
                       \item CNVPair.DOUBLE
                       \item CNVPair.STRING
                       \item CNVPair.BOOLEAN
                    \end{itemize}
                    should be used and not integer values (like 1,2,\ldots)
          \end{itemize}

      \item[\textbf{GA}]
         \begin{itemize}
            \item the GA group has created its package ``CGAL''
            \item a simulation run:
               \begin{itemize}
                  \item get the fitness data and the weights
                  \item compute the fitness values for each agent
               \end{itemize}
            \item Question: what is displayed in the GUI? -- a single agent
                            or all agents at one time?\\
                  Answer: Both.
         \end{itemize}

      \item[\textbf{Statistics}]
           \begin{itemize}
              \item the methods setStatistics(), getStatistics() transfer data
                    to CMAN\_Sim
              \item the manager group calls setStatistics() and delivers one
                    ``big'' CNVList containing \emph{all} necessary data needed.
              \item it should be possible to make screenshots of the statistic's
                    output (maybe by using a seperate package, which solves this
                    problem)
           \end{itemize}

      \item[\textbf{World}]
            \begin{itemize}
               \item the method getLocalWorld() creates for agents in sensor range
                     a local world (a part of the global world)
               \item other details can be found in the World's chapter
            \end{itemize}

      \item[\textbf{ANN}]
           changes are documentated in the ANN chapter

      \item[\textbf{Agents/Sensors}]
           \begin{itemize}
               \item There is a new parameter \emph{maxRange}, which defines the
                     maximum ``viewing distance'' of an agent.\\
                     This parameter is set by the world.
               \item the bumper sensor is a new input for the ANN
               \item the agents/sensor package only saves the bumpers of each
                     agent, to the fact that all other data is saved by another
                     group
               \item the method the manager package has to call for ordering the
                     agents to save their state in a XML file is saveState()
               \item the structure of the CNVList, which is returned, when
                     getStatistics() is called (by CMAN\_Sim) is:
                     \begin{itemize}
                         \item bumper (0 or 1)
                         \item com\_found\_part (0 or 1)
                         \item percentage\_hearing
                         \item percentage\_seeing
                     \end{itemize}
               \item the method getStatistics() has to be called by the manager
                     group after every generation
           \end{itemize}

      \item[\textbf{GUI}]
           \begin{itemize}
              \item the GUI has to become more dynamically
              \item It should be possible to change from GUI mode to batch mode,
                    in which the program runs until the end of the simulation has
                    been reached. This has the advantage, that the user can change
                    parameters more comfortable by using the GUI and then can
                    switch to the faster batch mode to save time when running the
                    simulation.
           \end{itemize}
    \end{itemize}

  \item \textbf{New assignments:}
    \begin{itemize}
      \item New structure of the group's papers:
         \begin{itemize}
            \item[1] Introduction
            \item[2] USE cases
               \begin{itemize}
                  \item Primary use cases
                  \item up to 2 or 3 sentences describing each use case
               \end{itemize}
            \item[3] Interfaces to other groups
            \item[4] Parameters
            \item[5] Class Diagrams (UML)
            \item[6] Sequence Diagrams (UML) -- only important one
            \item[7] Packages \footnote{only if the classes are already combined in a package}
            \item[8] Visualisation (screenshots) \footnote{this section is not
                     necessary for the Manager's paper, because the manager package
                     does not visualize anything}
            \item[9] Protocols
         \end{itemize}
    \end{itemize}
\end{enumerate}


\subsection{2001/06/08}

\begin{enumerate}
  \item \textbf{Responsible person for protocol:} Sebastian Gumpold
  \item \textbf{Participating persons:} Supervisor Mag. DI Roland Schwaiger and
                                        members of all groups
  \item \textbf{Topics talked about:}
\begin{itemize}
      \item[\textbf{Manager}]
           \begin{itemize}
              \item Changes:\\
                    The interface ``IMAN\_Save'' has been changed�. The ``new''
                    methods are defined as follows:
                    \begin{itemize}
                        \item public boolean saveState(CNVList list);
                        \item public boolean loadState(CNVList list);
                    \end{itemize}
                    where the structure of the CNVList ``list'' looks like this:
                       \begin{verbatim}
name : path
type : CNVPair.STRING
value: relative path
                      
name : file
type : CNVPair.STRING
value: XXXgenYYYYY.xml
                       \end{verbatim}
                    where XXX denotes the abbreviation of the group name (in upper
                    case letters) and YYYYY denotes the acutal generation number.
               \item The actual state has to be saved \textbf{after} calling the GA.
               \item The new name convention for the parameters:\\
                     XXXparameterName, where XXX denotes the abbreviation of the
                     name of the group the parameter belongs to. The name of
                     ``global'' parameters begin with ``MAN'' (what stands for
                     manager).
               \item General problems:\\
                     \begin{itemize}
                        \item There were problems with the constructor of the
                              world package and with the method getInitValue()
                              (also in world package).                             
                        \item It was determined, that no group (except the GAL)
                              does need data of the statistics group. The statistics
                              group will talk about the structure of the CNVLists
                              (they get from the other groups) with the groups
                              concerned by that.
                     \end{itemize}
           \end{itemize}
           
      \item[\textbf{ANN}]
           \begin{itemize}
              \item The ANN group is currently communication with the people,
                    who developed \emph{netVis}, the program we will use to
                    visualise the ANNs.
              \item at the moment the manager group does not need parameters
                    from the ANN group for testing
              \item the activation function will be includes in the ANN package
              \item the parameters, the statistic group will receive from
                    the ANNs are the number of edges and corners.
           \end{itemize}
           
      \item[\textbf{GAL}]
           \begin{itemize}
              \item The maximum value of the parameters \emph{GALcrossoverRate} and
                    \emph{GALmuationRate} have changed from $0.1$ to $0.5$, without
                    allowing a value of $0.5$.
              \item The observer/observable concept has been implemented.
              \item The visualisation of the chromosoms -- which have a size of
                    up to 250.000 Bits -- has been solved with the usage of
                    slide bars.
           \end{itemize}
      
      \item[\textbf{GUI}]
           \begin{itemize}
              \item The GUI group has implemented a new structure, in which the
                    user can view the parameters structured in areas.
              \item The new assignment for the GUI group is to make it possible
                    for the user to select a group and then see all parameters
                    of the group selected.
              \item Also the visualisation of the other group's output has
                    to be treated until next week.
           \end{itemize}
           
      \item[\textbf{Statistics}]
           How the statistic package works?\\
           Data is collected by the manager package and then gets forwarded
           in one ``big'' CNVList to the statistic package. This happens at the
           same time the GUI visualizes the group's output (e.g. every 200 steps).
           This leeds to the following consequences:
           \begin{itemize}
              \item the GUI is connected very closely with the statistic package
              \item the user is able to define the time of synchronisation (at least
                    the frequence of synchronisation)
           \end{itemize}
           But the statistic package has additionally to be updated after every
           generation step.\\
           It has been fixed, that in the CNVList -- which is forwarded to the
           statistic package -- the elements
              \begin{verbatim}
<MANSTEP> TYPE: CNVPair.INT, 
          INFO: step of one agent (time step?)
<MANGENERATION> TYPE: CNVPair.INT
              \end{verbatim}
           are included by the manager group.
           
      \item[\textbf{World}]
           \item changes in source (bugfixes)
           \item the parameters needed by the world package are saved in a
                 seperate XML file.\\
                 The structure of this file is the following:
                    \begin{verbatim}
<0 TYPE="Quadrat">
  <Seite>
    ...
  </Seite>
</>
                    \end{verbatim}
                 The only parameter the manager group needs in their standard
                 XML file is \textbf{WODfilename : String including filename}.
                
      \item[\textbf{Agents/Sensors}]
           The visualisation of the agents has been determined.
\end{itemize}     

  \item \textbf{New assignments:}
        The next important dates are:
        \begin{itemize}
           \item[15.06] running version (1st try)
           \item[22.06] no meeting, but paper has to be submitted
           \item[29.06] testing of version 1.0
           \item[06.07] presentation, testing of version 2.0 and barbeque :-)
        \end{itemize}
\end{enumerate}



\subsection{2001/06/15}

\begin{enumerate}
  \item \textbf{Responsible person for protocol:} Sebastian Gumpold
  \item \textbf{Participating persons:} Supervisor Mag. DI Roland Schwaiger and
                                        members of all groups
  \item \textbf{Topics talked about:}
    \begin{itemize}
      \item[\textbf{Manager}]
            \begin{itemize}
              \item the ``first try'' version of the program was presented
              \item problem 1\\
                    the statistic group uses a package from SYMATEC,
                    which is not available for the manager group at the
                    moment.
              \item ``problem'' 2\\
                    the program slows down during simulation, because the
                    killNet function, which deletes old ANNs is not used
                    in this version -- will be fixed.
              \item problem 3\\
		    there is a bug in the program: an error occurs, when
                    using ``bad'' random numbers.
              \item the fitness function has not been implemented yet, so
                    a dummy fitness function is used at the moment.
              \item the new structure of the CNVList ``list'', which is
                    used in the methods
                    \begin{itemize}
                        \item public boolean saveState(CNVList list);
                        \item public boolean loadState(CNVList list);
                    \end{itemize}
                    in the interface ``IMAN\_Save'' looks like this:

                    \begin{verbatim}
name : path
type : CNVPair.STRING
value: relative path

name : file
type : CNVPair.STRING
value: XXXgenYYYYY

name : ext
type : CNVPair.STRING
value: .xml
                       \end{verbatim}
                    where XXX denotes the abbreviation of the group name (in upper
                    case letters) and YYYYY denotes the acutal generation number.
            \end{itemize}

      \item[\textbf{OTHERS}]
           \begin{itemize}
             \item the GUI group will implement a functionality, which offers the user
                   the possiblity to view the status files (e.g. ANNgen00023).
             \item the parameters are now visualized sorted by groups.
             \item when the user is clicking on ``SAVE'' the method ``saveState(SimName''
                   is called by the GUI.
             \item the GUI group will create a sequence diagram, which visualizes the
                   communication between GUI an MAN.
             \item NEW ASSIGNMENT:\\
                   a static error object has to be created. In GUI mode the errors/warnings
                   are displayed in a status field named ``notices''. The user should also
                   have the possiblity to choose the ``level'' of the importance of errors.
                   The status field will work with  Java Beans.
             \item The manager group has to define a method/interface, which tells the
                   other groups that the visualization (Java Beans) has to be updated
                   (by them).
             \item the synchronisation of the parameters between GUI and MAN will
                   always take place when changes are made, where the filename
                   of the file containing the changes is submitted. Both CNVLists are
                   updated at the same time.
             \item concerning the ``step width`` configuation:\\
                   the user can choose if the synchronisation takes place after 1 step,
                   \ldots 100 steps, \ldots and additionally for every generation (e.g.
                   every 5. generation).\\
                   To get this functionality new parameters in the parameterfile have to
                   be defined by the managers.
             \item when changing form GUI mode to batch mode a status bar, which shows
                   the state of the simulation is displayed. All other GUI elements are
                   not updated while running the simulation in batch mode.\\
                   To get this functionality the manager group has to implement a method,
                   which calculates the simulation state of the generations AND also the
                   simulation state of the steps of the current generation.
             \item When the user clicks/marks a single agent on the world she/he should
                   see all information (ANN, \ldots) concerning this agent. To get
                   this program behavoir it is necessary to synchronisize data when the
                   user clicks on an agent.\\
                   (e.g. standard update of visualization every 10 steps, the user
                   clicks on an agent at step 17, nevertheless the visualization is
                   updated at setp 20).\\
                   The actual state of the world is ``freezed'' when a the visualization
                   is updated, this is necessary to find the agent marked by the user.
           \end{itemize}
           
  \end{itemize}
\end{enumerate}



\subsection{2001/06/29}

\begin{enumerate}
  \item \textbf{Responsible person for protocol:} Sebastian Gumpold
  \item \textbf{Participating persons:} Supervisor Mag. DI Roland Schwaiger and
                                        members of all groups
  \item \textbf{Topics talked about:}
            problems:\\
            fitness function, Symatec package
  \item \textbf{New assignments:}
    \begin{itemize}
      \item implement global error class (with output to GUI)
      \item prepare presentation for next week
      \item update paper
    \end{itemize}
\end{enumerate}