agents.localModel

## Class LocalModelAgent

- java.lang.Object
- - agents.Agent
  - - agents.SystemAgent
    - - agents.localModel.LocalModelAgent

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  LocalModelAverage, LocalModelFirstExp, LocalModelMillerRegression

    public abstract class LocalModelAgent
    extends SystemAgent
    implements java.io.Serializable

The abstract class of all agents in charge of the generation of the output from Context Agent. For the sake of simplicity, it's not scheduled as agent like other of the system.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`LocalModelAgent(World world)` Instantiates a new local model agent.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `computeAMessage(Message m)` Compute A message.
`void` `die()` Die.
`abstract java.lang.String` `getFormula(Context context)` Gets the formula.
`abstract double` `getProposition(Context context)` Gets the proposition.
`abstract double` `getProposition(Context context, Percept p1, Percept p2, double v1, double v2)` Version of getProposition for 2D display.
`java.util.ArrayList<? extends Agent>` `getTargets()` Gets the targets.
`abstract void` `updateModel(Context context)` Update model.

### Methods inherited from class agents.SystemAgent

`getWorld, play, setWorld`

### Methods inherited from class agents.Agent

`getID, getMessages, getMessagesBin, getName, isDying, readMessage, sendExpressMessage, sendMessage, sendMessage, setDying, setID, setMessages, setMessagesBin, setName`

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

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

### Constructor Detail

#### LocalModelAgent

    public LocalModelAgent(World world)

Instantiates a new local model agent.

Parameters:
  `world` - the world

### Method Detail

#### getTargets

    public java.util.ArrayList<? extends Agent> getTargets()

Description copied from class: `SystemAgent`
Gets the targets.

Specified by:
  `getTargets` in class `SystemAgent`
Returns:
  the targets

#### computeAMessage

    public void computeAMessage(Message m)

Description copied from class: `Agent`
Compute A message.

Specified by:
  `computeAMessage` in class `Agent`
Parameters:
  `m` - the m

#### getProposition

    public abstract double getProposition(Context context)

Gets the proposition.

Parameters:
  `context` - the context
Returns:
  the proposition

#### getProposition

    public abstract double getProposition(Context context,
                                          Percept p1,
                                          Percept p2,
                                          double v1,
                                          double v2)

Version of getProposition for 2D display.

Parameters:
  `context` - the context
  `p1` - the p 1
  `p2` - the p 2
  `v1` - the v 1
  `v2` - the v 2
Returns:
  the proposition

#### getFormula

    public abstract java.lang.String getFormula(Context context)

Gets the formula.

Parameters:
  `context` - the context
Returns:
  the formula

#### updateModel

    public abstract void updateModel(Context context)

Update model.

Parameters:
  `context` - the context

#### die

    public void die()

Description copied from class: `Agent`
Die.

Overrides:
  `die` in class `Agent`