jmadem

## Class MADeMAgent

- java.lang.Object
- - Agent
  - - jmadem.MADeMAgent

-     public class MADeMAgent
      extends Agent

  Agent class for a Jason agent performing MADeM decisions.
  Author:
    Francisco Grimaldo

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.util.logging.Logger` | `logger` Class logger

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MADeMAgent()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<Literal>[]` | `brf(Literal beliefToAdd, Literal beliefToDel, Intention i)` MADeM Belief Revision Function: This function detects those literals coming from an utility function that has been implemented as an AgentSpeak plan.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          private java.util.logging.Logger logger

      Class logger

  - ### Constructor Detail

    - #### MADeMAgent

          public MADeMAgent()

  - ### Method Detail

    - #### brf

          public java.util.List<Literal>[] brf(Literal beliefToAdd,
                                      Literal beliefToDel,
                                      Intention i)
                                        throws RevisionFailedException

      MADeM Belief Revision Function: This function detects those literals coming from an utility function that has been implemented as an AgentSpeak plan. These literals will be of the form `jmadem_compute_utility(Id, U)`, where `Id` is the unique identifier of utility computation and `U` is the utility value obtained. When detected, the agent catches the utility value identified by `Id`. Otherwise, it invokes the usual Belief Revision Function. That is, it revises the belief base with the given literal to add, to remove, and the current intention that triggered the operation.
      Parameters:
        `beliefToAdd` - belief to be added to the belief base
        `beliefToDel` - agent class parameters
        `i` - AgentSpeak source code
      Returns:
        List[0] has the list of actual additions to the belief base, and List[1] has the list of actual deletions; this is used to generate the appropriate internal events. If nothing change, returns null.
      Throws:
        `RevisionFailedException`