|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsaci.Agent
jason.infra.saci.SaciAgArch
public class SaciAgArch
This class provides an agent architecture when using SACI Infrastructure to run the MAS.
Execution sequence: initAg, run (perceive, checkMail, act), stopAg.
Field Summary | |
---|---|
protected AgArch |
userAgArch
the user implementation of the architecture |
Fields inherited from class saci.Agent |
---|
controlAg, mbox, mboxes, properties, running |
Constructor Summary | |
---|---|
SaciAgArch()
|
Method Summary | |
---|---|
void |
act(ActionExec action,
java.util.List<ActionExec> feedback)
Executes the action action and, when finished, add it back in feedback actions. |
void |
broadcast(Message m)
Broadcasts a Jason message in a specific infrastructure |
boolean |
canSleep()
Returns true whether the agent can sleep according to the arch |
void |
checkMail()
Reads the agent's mailbox and adds messages into the agent's circumstance |
java.lang.String |
getAgName()
Gets the agent's name |
RuntimeServicesInfraTier |
getRuntimeServices()
Gets an object with infrastructure runtime services |
void |
informCycleFinished(boolean breakpoint,
int cycle)
Informs the infrastructure tier controller that the agent has finished its reasoning cycle (used in sync mode). |
void |
initAg(java.lang.String[] args)
Method used by SACI to initialise the agent: args[0] is the agent architecture class, args[1] is the user Agent class, args[2] is the user BB class, args[3] is the AgentSpeak source file, args[4] "options", args[5] options. |
java.util.List |
perceive()
Gets the agent's perception as a list of Literals |
void |
run()
|
void |
sendMsg(Message m)
the saci implementation of the sendMsg interface |
void |
sleep()
Put the agent in "sleep" mode |
void |
stopAg()
Stops the agent |
void |
wake()
Removes the agent from the "sleep" mode |
Methods inherited from class saci.Agent |
---|
destroy, enterSoc, enterSoc, enterSoc, enterSociety, getControlAg, getLauncher, getMBox, getMBox, getName, getProperty, getSociety, isRunning, leaveAllSocs, leaveSoc, leaveSoc, move, moveMBoxesToLocalHost, onMoved, onMoving, setControlAg, setProperty, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jason.architecture.AgArchInfraTier |
---|
isRunning |
Field Detail |
---|
protected AgArch userAgArch
Constructor Detail |
---|
public SaciAgArch()
Method Detail |
---|
public void initAg(java.lang.String[] args) throws JasonException
initAg
in interface saci.launcher.LaunchableAg
initAg
in class saci.Agent
JasonException
public java.lang.String getAgName()
AgArchInfraTier
getAgName
in interface AgArchInfraTier
public void stopAg()
AgArchInfraTier
stopAg
in interface AgArchInfraTier
stopAg
in interface saci.launcher.LaunchableAg
stopAg
in class saci.Agent
public void sleep()
AgArchInfraTier
sleep
in interface AgArchInfraTier
public void wake()
AgArchInfraTier
wake
in interface AgArchInfraTier
public void run()
run
in interface java.lang.Runnable
run
in class saci.Agent
public java.util.List perceive()
AgArchInfraTier
perceive
in interface AgArchInfraTier
public void sendMsg(Message m) throws java.lang.Exception
sendMsg
in interface AgArchInfraTier
java.lang.Exception
public void broadcast(Message m) throws java.lang.Exception
AgArchInfraTier
broadcast
in interface AgArchInfraTier
java.lang.Exception
public void checkMail()
AgArchInfraTier
checkMail
in interface AgArchInfraTier
public void act(ActionExec action, java.util.List<ActionExec> feedback)
AgArchInfraTier
act
in interface AgArchInfraTier
public boolean canSleep()
AgArchInfraTier
canSleep
in interface AgArchInfraTier
public void informCycleFinished(boolean breakpoint, int cycle)
breakpoint is true in case the agent selected one plan with the "breakpoint" annotation.
public RuntimeServicesInfraTier getRuntimeServices()
AgArchInfraTier
getRuntimeServices
in interface AgArchInfraTier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |