This example shows how to easily create a dynamic multi-agent organization
that uses J-MADeM in a well known Jason example: the Minig Robot Team 
presented in Clima Contest VII 2006 (http://cig.in.tu-clausthal.de/CLIMAContest). 

Here, we use a multi-agent structure of miners and bosses to adapt 
better to nonuniform gold distributions. On the one hand, miner agents just 
inform their corresponding boss when they find a chunk of gold. Although bosses
are not allowed to directly pick up pieces of gold, they can allocate them to its
subordinated miners. Initially a balanced miner-boss assignment is performed, so
that all bosses manage the same number of miners. However, they can dynamically
change the organization by modifying this miner-boss relations during the
simulation, as shown by the following boss plan:

When a miner informs about a chunk of gold:
    use MADeM to allocate it to a miner within the own miner’s group
    if MADeM finds no solution (i.e. all miners are not free)
        use MADeM to ask other bosses for another miner
        
This way, bosses are allowed to borrow miners when the number of gold
chunks found in the quadrant they control increases. The altruist bosses modelled
will always prefer to lend one of their miners than to keep it idle (i.e. without
utility). Therefore, the bosses launch MADeM decisions both to allocate golds
to miners and to ask other bosses for additional miners. For this new social
decision, the bosses will use an utility function that returns the number of free
miners to express their preference, thus trying to keep the teams well balanced.
 