Browse Source

Report mainly done

sarl
smagnin 3 years ago
parent
commit
64573af709
4 changed files with 55 additions and 6 deletions
  1. BIN
      pic/beginning.png
  2. BIN
      pic/long.png
  3. BIN
      rapport.pdf
  4. +55
    -6
      rapport.tex

BIN
pic/beginning.png View File

Before After
Width: 519  |  Height: 524  |  Size: 15KB

BIN
pic/long.png View File

Before After
Width: 512  |  Height: 524  |  Size: 14KB

BIN
rapport.pdf View File


+ 55
- 6
rapport.tex View File

@@ -35,8 +35,13 @@
The goal of this project was to simulate the famous rock music festival of
Belfort : "Les eurockéennes". In order to achieve this we have used the agent
concept seen during the semester.
We have used the SARL language, because this is the languga we have used during
We have used the SARL language, because this is the language used during
the whole semester, and it aims to create multi-agents programs.
\begin{figure}[h]
\centering\includegraphics[scale=0.6]{pic/beginning.png}
\caption{The festival when every agents arrive in the festival}
\label{begin}\
\end{figure}
\chapter{Agent}
We have only one kind of agent named "Guy". Guy agents mainly want to listen
music. The willing of the agent is coded with a state machine, which can have
@@ -50,15 +55,37 @@ four states :
This is the four main states for a normal human being during a music festival :
listen music in front of the scene, get a drink, pee, or just wander anywhere.

\section{Machine state}
In reality there is two machines states:
\begin{itemize}
\item{One for the need of the agent}
\item{One for the state move of the agent}
\end{itemize}

\subsection{Move state}
The machine state is located in the \verb-on PerceptionEvent- of the agent.
First it looks if the agent is wandering (doing nothing special) or is already
moving to a special position or waiting in a queue. \\
If the agent is wandering, it will decide to do something, else its
state will be affected by its current action.\\
Finally the move will be apply.

\subsection{Need state}
The need state is set if the agent is wandering. Each action has its own
probability, of course the need of music is the bigger, and its own duration
(with an additional random time).
\section{Drunkness}
If the agent drinks too much, they will be drunk. And this state will influence
their moove.\\
During the computation of the forces (attraction and repulsion) an another
vector will be add depending on the drunkness level of the agent. And this
vector will influence the kinematic.
vector will influence the kinematic.\\
The drunkness is decreasing slowly at each PerceptionEvent and increasing
each time the agent is going at the bar. Drunkness increases the need to pee
probability of the agent.

\section{Queue}
On the object toilets and bar, agents are making queue and don't got there
On the toilets objects, agents are making queue and don't got there
wildly.
\paragraph{}If the toilets are not free, the first agent will wait just behind.
The next who will arrive, will try to go just in front of the toilet but the
@@ -93,9 +120,21 @@ the GUI.
}
\end{verbatim}
We add all the objects and not just agent bodies like at the origin.
\paragraph{}The scenes are yellow, bars red, and toilets green. Agents are
\paragraph{}Bars red, and toilets green.
Concerning the scenes, there is one main stage in green, and two second stage
(black or pink). The two second stages switch between pink or black colour
regurlaly. It shows the kind of music they play.
Agents are
little circle (pink or black depending of what kind of music they like) with a line to see their direction.

There are two kinds of agent body :
\begin{itemize}
\item{One black, who listen metal music}
\item{One pink, who listen rock music}
\end{itemize}
Following this they will be attract by the scene of the same style (or the green
scene, which is neutral and attract all agents).\\
At the beginning of the program all agents appears randomly in one of the four
corners of the map.
\section{Avoid collisions}
To avoid collisions, we had to implement a function to get the nearest point
between a circle (agent) and a rectangle (bars, scenes, toilets)
@@ -114,7 +153,7 @@ between a circle (agent) and a rectangle (bars, scenes, toilets)
}
\end{verbatim}
In the influence computation of the agent we add the perception of the objects
using the nearestPoint function add just before.
using the nearestPoint function.
\begin{verbatim}
if (influence != null) {
if (influence instanceof MotionInfluence) {
@@ -141,4 +180,14 @@ using the nearestPoint function add just before.
\end{verbatim}

\paragraph{}
\chapter{Conclusion}
\section{Possibles improvements}
Agents are attracted by scenes, but a possible improvement is that agent are
just attracted by just one side of the rectangle (in front of scene) and not on
the four sides.
\paragraph{}The number of agents is quite low for a festival (400), maybe there are
some improvements to do on alogrithms to allow more agents on the simulation
\section{}
The project was very interssant despite that SARL/Janus is crashing often if the
code is not perfect.
\end{document}

Loading…
Cancel
Save