lithic. A heuristic has been designed for those cases
where there are a high number of very restrictive stu-
dent teams to be allocated. If a solution is not feasible,
this new heuristic incrementally selects those student
teams with higher restrictions, and their Forbidden lab
slots become Indifferent so their restrictions are not
considered (those restrictions that do not affect hor-
izontal constraints). Once a solution is found, these
modifications appear as “suggestions” for a feasible
allocation.
Finally, the value of OV
i
variables can be used to
see how close the solution found is to the student pref-
erences. The higher the value, the ‘happier’ the stu-
dents will be with the given assignment. The global
value of gives us an idea about the ‘global happiness’
of OV the solution found.
4 THE AGENT-BASED MODEL
The main characteristics of ERA problem described
in Section 2 make Multi-agent technologies a natu-
ral framework to test and prove these kinds of algo-
rithms. For this reason there exist several multi-agent
frameworks, such as NetLogo, Swarm, Repast or Ma-
son (Railsback et al., 2006), designed to facilitate the
specification of collective behaviors (represented as
agents) that can be simulated into a simulation toolkit.
Among existing MAS-based simulation toolkits, the
Mason library was selected.
Mason is a discrete-event multi-agent simulation
library core in Java, designed as a foundation for
large custom-purpose Java simulations. This toolkit
provides some graphical facilities, and other utilities
to easily modify the simulation domain (Luke et al.,
2004). A basic model in Mason requires the defi-
nition of two main elements; the environment and a
set of agents with a defined behavior. For this rea-
son, we have modeled an environment containing the
Resource Set (RS) from which the agents can con-
sume the available lab slots (ER). On the other hand,
the student teams are modeled as Mason-based agents
that evolve in each simulation step looking for a so-
lution. One of these agents executes three different
actions in each step. First, it updates its utility func-
tion, called “happiness”, then it looks for a new “lo-
cation” that improves its happiness, and finally it tries
to “go” there (the agent tries to obtain the selected
ER). The maximization process can be described as
follows:
1. The happiness function is a tradeoff between the
particular happiness of the student team, and the
current distribution of the available ER. This func-
tion (see equation 3) rewards an egalitarian distri-
bution of student teams among RS and ER, and
tries to satisfy the agent allocation preferences.
H(a
i
) =
∑
n
j=1
( f
1
(RS
j
(i)) + f
2
(q′, RS
j
(i)))
n
(3)
H(a
i
) represents the average happiness of agent-
i and is calculated by using f
1
(RS
j
(i)) the total
number (n) of Resource Sets to be allocated, and
the sum (for each ER) of how close the current al-
location is to the agent preferences. This is cal-
culated by using to transform the agent prefer-
ence into an integer value (currently the values
hP = 5;I = 3;F = 0i are used), and the level of oc-
cupancy (q′) of the ER (this is evaluated through
function f
2
(q′, RS
j
(i))). This latter function has
been introduced to quantify the occupation of the
ER. The social reason is related to the problem
that appears when a student team prefers attending
a not overloaded lab group (they will receive more
attention from educators). On the other hand, ed-
ucators would prefer an egalitarian distribution of
students (and therefore an egalitarian distribution
of the teaching work). The f
2
function measures
how close the ER occupation is to an egalitarian
distribution.
2. Therefore, each agent in the system tries to max-
imize its own happiness function, so it will try to
look for an ER (i.e. lab slot) that maximizes its
preferences although a global egalitarian distribu-
tion is indirectly used by the agent. In the first
simulation step any agent (randomly selected) can
select only one ER from its Resource Set, to avoid
initial and premature resource occupancy.
3. Once no slots are available in a particular ER,
a negotiation procedure is executed by the agent
which is interested in:
(a) The bidder agent (a
i
) sends a message to all the
current agents (a
j
) assigned to the desired ER.
(b) .The a
i
agent proposes to exchange one of its
own ER (currently allocated) for this one. The
list of available ERs is evaluated by each agent
(a
j
). Each a
j
answers to a
i
with their pre-
ferred ER from the exchange list (or sends a
void value if it is not interested in any). If the
bidder agent (a
i
) is not interested in the pro-
posal from a
j
, it removes the ER from the ex-
change list and sends it back. This process con-
tinues until an exchange is made, or no agent is
available for negotiation (no one is interested to
give up this ER).
4. Finally, to avoid a cyclic negotiation process from
an agent that tries to access a particular ER, a
discouraging factor is used. Equation 4 shows
ICSOFT 2009 - 4th International Conference on Software and Data Technologies
116