es.upv.dsic.gti_ia.jason
Class MagentixAgArch

java.lang.Object
  extended by jason.architecture.AgArch
      extended by es.upv.dsic.gti_ia.jason.MagentixAgArch

public class MagentixAgArch
extends jason.architecture.AgArch

Author:
Ricard Lopez Fogues

Field Summary
protected  Map<String,String> conversationIds
           
protected  boolean running
           
 
Constructor Summary
MagentixAgArch()
           
 
Method Summary
 void act(jason.asSemantics.ActionExec action, List<jason.asSemantics.ActionExec> feedback)
           
protected  void addMessage(ACLMessage msg)
          Adds a message to the message list
 void broadcast(jason.asSemantics.Message m)
           
 boolean canSleep()
           
 void checkMail()
           
 String getAgName()
           
protected  void init(String filename, CAgent agent)
          Starts the architecture
 boolean isRunning()
           
 List<jason.asSyntax.Literal> perceive()
           
 void run()
          Runs the reasoning cycle
 void sendMsg(jason.asSemantics.Message m)
           
 void sleep()
           
 void stopAg()
           
protected  Object translateContentToJason(ACLMessage m)
          returns the content of the message m and implements some pro-processing of the content, if necessary
 
Methods inherited from class jason.architecture.AgArch
getArchInfraTier, getCycleNumber, getTS, initAg, setArchInfraTier, setCycleNumber, setTS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

running

protected boolean running

conversationIds

protected Map<String,String> conversationIds
Constructor Detail

MagentixAgArch

public MagentixAgArch()
Method Detail

init

protected void init(String filename,
                    CAgent agent)
Starts the architecture

Parameters:
filename - File with the AgentSepak code
agent - Agent with this architecture

run

public void run()
Runs the reasoning cycle


getAgName

public String getAgName()
Overrides:
getAgName in class jason.architecture.AgArch

perceive

public List<jason.asSyntax.Literal> perceive()
Overrides:
perceive in class jason.architecture.AgArch

act

public void act(jason.asSemantics.ActionExec action,
                List<jason.asSemantics.ActionExec> feedback)
Overrides:
act in class jason.architecture.AgArch

canSleep

public boolean canSleep()
Overrides:
canSleep in class jason.architecture.AgArch

isRunning

public boolean isRunning()
Overrides:
isRunning in class jason.architecture.AgArch

sleep

public void sleep()
Overrides:
sleep in class jason.architecture.AgArch

sendMsg

public void sendMsg(jason.asSemantics.Message m)
             throws Exception
Overrides:
sendMsg in class jason.architecture.AgArch
Throws:
Exception

checkMail

public void checkMail()
Overrides:
checkMail in class jason.architecture.AgArch

translateContentToJason

protected Object translateContentToJason(ACLMessage m)
returns the content of the message m and implements some pro-processing of the content, if necessary

Parameters:
m - Message to translate

broadcast

public void broadcast(jason.asSemantics.Message m)
               throws Exception
Overrides:
broadcast in class jason.architecture.AgArch
Throws:
Exception

addMessage

protected void addMessage(ACLMessage msg)
Adds a message to the message list

Parameters:
msg -

stopAg

public void stopAg()
Overrides:
stopAg in class jason.architecture.AgArch


Copyright © 2012 GTI-IA. All Rights Reserved.