kernel

## Class Scheduler

- java.lang.Object
- - kernel.Scheduler

All Implemented Interfaces:
  java.io.Serializable

    public class Scheduler
    extends java.lang.Object
    implements java.io.Serializable

The Class Scheduler.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`Scheduler()` Instantiates a new scheduler.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addAlteredContext(Context context)` Adds the altered context.
`void` `addScheduledItem(ScheduledItem item)` Adds the scheduled item.
`void` `changeOracleConection()` Change oracle conection.
`double` `getAction()` Gets the action.
`java.util.ArrayList<Agent>` `getAgents()` Gets the agents.
`java.util.ArrayList<Context>` `getAlteredContexts()` Gets the altered contexts.
`java.util.ArrayList<Agent>` `getContexts()` Gets the contexts.
`java.util.ArrayList<Context>` `getContextsAsContext()` Gets the contexts as context.
`Head` `getHeadAgent()` Gets the head agent.
`int` `getNextID()` Gets the next ID.
`java.util.ArrayList<Agent>` `getOutputs()` Gets the outputs.
`Percept` `getPerceptByName(java.lang.String name)` Gets the percept by name.
`int` `getTick()` Gets the tick.
`java.util.ArrayList<Percept>` `getVariables()` Gets the variables.
`MainPanel` `getView()` Gets the view.
`World` `getWorld()` Gets the world.
`boolean` `isRunning()` Checks if is running.
`boolean` `isUseOracle()` Checks if is use oracle.
`boolean` `isWaitForGUIUpdate()` Checks if is wait for GUI update.
`void` `killAgent(Agent a)` Kill agent.
`void` `learn()` Learn.
`void` `playOneStep()` Play one step.
`void` `registerAgent(Agent a)` Register agent.
`void` `removeValidContextFromList(Context agent)` Removes the valid context from list.
`void` `serialize()` Serialize.
`void` `setAgents(java.util.ArrayList<Agent> agents)` Sets the agents.
`void` `setAlteredContexts(java.util.ArrayList<Context> alteredContexts)` Sets the altered contexts.
`void` `setContexts(java.util.ArrayList<Agent> contexts)` Sets the contexts.
`void` `setNextID(int nextID)` Sets the next ID.
`void` `setOutputs(java.util.ArrayList<Agent> outputs)` Sets the outputs.
`void` `setRunning(boolean running)` Sets the running.
`void` `setTick(int tick)` Sets the tick.
`void` `setVariables(java.util.ArrayList<Percept> variables)` Sets the variables.
`void` `setView(MainPanel view)` Sets the view.
`void` `setWaitForGUIUpdate(boolean waitForGUIUpdate)` Sets the wait for GUI update.
`void` `setWorld(World world)` Sets the world.
`void` `start(boolean running)` Start.

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

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

### Constructor Detail

#### Scheduler

    public Scheduler()

Instantiates a new scheduler.

### Method Detail

#### registerAgent

    public void registerAgent(Agent a)

Register agent.

Parameters:
  `a` - the a

#### start

    public void start(boolean running)

Start.

Parameters:
  `running` - the running

#### removeValidContextFromList

    public void removeValidContextFromList(Context agent)

Removes the valid context from list.

Parameters:
  `agent` - the agent

#### learn

    public void learn()

Learn.

#### killAgent

    public void killAgent(Agent a)

Kill agent.

Parameters:
  `a` - the a

#### getAgents

    public java.util.ArrayList<Agent> getAgents()

Gets the agents.

Returns:
  the agents

#### setAgents

    public void setAgents(java.util.ArrayList<Agent> agents)

Sets the agents.

Parameters:
  `agents` - the new agents

#### isRunning

    public boolean isRunning()

Checks if is running.

Returns:
  true, if is running

#### setRunning

    public void setRunning(boolean running)

Sets the running.

Parameters:
  `running` - the new running

#### getTick

    public int getTick()

Gets the tick.

Returns:
  the tick

#### setTick

    public void setTick(int tick)

Sets the tick.

Parameters:
  `tick` - the new tick

#### getNextID

    public int getNextID()

Gets the next ID.

Returns:
  the next ID

#### setNextID

    public void setNextID(int nextID)

Sets the next ID.

Parameters:
  `nextID` - the new next ID

#### getView

    public MainPanel getView()

Gets the view.

Returns:
  the view

#### setView

    public void setView(MainPanel view)

Sets the view.

Parameters:
  `view` - the new view

#### isWaitForGUIUpdate

    public boolean isWaitForGUIUpdate()

Checks if is wait for GUI update.

Returns:
  true, if is wait for GUI update

#### setWaitForGUIUpdate

    public void setWaitForGUIUpdate(boolean waitForGUIUpdate)

Sets the wait for GUI update.

Parameters:
  `waitForGUIUpdate` - the new wait for GUI update

#### playOneStep

    public void playOneStep()

Play one step.

#### getWorld

    public World getWorld()

Gets the world.

Returns:
  the world

#### setWorld

    public void setWorld(World world)

Sets the world.

Parameters:
  `world` - the new world

#### addScheduledItem

    public void addScheduledItem(ScheduledItem item)

Adds the scheduled item.

Parameters:
  `item` - the item

#### addAlteredContext

    public void addAlteredContext(Context context)

Adds the altered context.

Parameters:
  `context` - the context

#### getAlteredContexts

    public java.util.ArrayList<Context> getAlteredContexts()

Gets the altered contexts.

Returns:
  the altered contexts

#### setAlteredContexts

    public void setAlteredContexts(java.util.ArrayList<Context> alteredContexts)

Sets the altered contexts.

Parameters:
  `alteredContexts` - the new altered contexts

#### changeOracleConection

    public void changeOracleConection()

Change oracle conection.

#### serialize

    public void serialize()

Serialize.

#### getOutputs

    public java.util.ArrayList<Agent> getOutputs()

Gets the outputs.

Returns:
  the outputs

#### setOutputs

    public void setOutputs(java.util.ArrayList<Agent> outputs)

Sets the outputs.

Parameters:
  `outputs` - the new outputs

#### isUseOracle

    public boolean isUseOracle()

Checks if is use oracle.

Returns:
  true, if is use oracle

#### getAction

    public double getAction()

Gets the action.

Returns:
  the action

#### getHeadAgent

    public Head getHeadAgent()

Gets the head agent.

Returns:
  the head agent

#### getPerceptByName

    public Percept getPerceptByName(java.lang.String name)

Gets the percept by name.

Parameters:
  `name` - the name
Returns:
  the percept by name

#### getVariables

    public java.util.ArrayList<Percept> getVariables()

Gets the variables.

Returns:
  the variables

#### setVariables

    public void setVariables(java.util.ArrayList<Percept> variables)

Sets the variables.

Parameters:
  `variables` - the new variables

#### getContexts

    public java.util.ArrayList<Agent> getContexts()

Gets the contexts.

Returns:
  the contexts

#### getContextsAsContext

    public java.util.ArrayList<Context> getContextsAsContext()

Gets the contexts as context.

Returns:
  the contexts as context

#### setContexts

    public void setContexts(java.util.ArrayList<Agent> contexts)

Sets the contexts.

Parameters:
  `contexts` - the new contexts