//defaultParamter toRun = true public InstanceLoader(AgentPlateform agentPlateform, Environment environment, string filename, bool toRun) { relations = new List<Relation>(); this.toRun = toRun; try { if (filename != "") { this.environment = environment; this.agentPlateform = agentPlateform; this.model = this.environment.Model; XDocument parser; this.basedir = filename; //parser = XDocument.Load(filename); String s = MascaretApplication.Instance.readFlow(filename); parser = XDocument.Parse(s); _parseInstances(parser.Root); _addRelations(); } relations.Clear(); } catch (FileLoadException) { } }
public virtual void parse(XElement root, bool loadAll) { XElement appliNode = root.Element("ApplicationParameters"); XElement actnode = root.Element("Actors"); XElement orgNode = root.Element("Organisations"); { if (agentPlateform == null) { this.VRComponentFactory.Log("Agent Plateform"); // Parametres par defaut de l'applie .... string ressourceDir = "HTTPServerBaseDir"; agentPlateform = new AgentPlateform("localhost", 8080, ressourceDir, false); agent = new Agent(agentPlateform, "HTTPManager", null, ""); agent.addBehavior("SimpleCommunicationBehavior", 0.2, true); agentPlateform.addAgent(agent); } } foreach (XElement child in root.Elements()) { if (child.Name.LocalName == "Environment") { string envUrl = child.Attribute("url").Value; Environment env = parseEnvironment(envUrl, actnode, orgNode, loadAll); } } }
//default parameters KBName = "default" public Agent(AgentPlateform ap, string name, AgentClass agentclass, string KBName) : base(name, agentclass) { this.aid = new AID(name, ap.name, ap.PortNumber); this.plateform = ap; mailbox = new Mailbox(); knowledgeBase = new KnowledgeBase(KBName); behaviorPlanner = new BehaviorPlanner(this); //behaviorRealizer = new BehaviorRealizer(); }
//default parameters KBName = "default" public Agent(AgentPlateform ap, string name, AgentClass agentclass, string KBName) : base(name, agentclass) { this.aid = new AID(name, ap.name, ap.PortNumber); this.plateform = ap; mailbox = new Mailbox(); knowledgeBase = new KnowledgeBase(KBName); //behaviorPlanner = new BehaviorPlanner(this); //behaviorRealizer = new BehaviorRealizer(); emotion = "joyStrong"; }
//typedef KnowledgeBase* (*BaseInitFunc)(); //int _id=0; public void parseInstances(AgentPlateform agentPlateform, Environment environment, string filename, bool toRun) { this.toRun = toRun; this.environment = environment; this.agentPlateform = agentPlateform; this.model = this.environment.Model; XDocument parser = null; this.basedir = filename; parser = XDocument.Load(filename); _parseInstances(parser.Root); _addRelations(); relations.Clear(); }
public EmbodiedAgent(AgentPlateform ap, string name, AgentClass agentclass) : base(ap, name, agentclass, "default") { body = new Body(this); }
//protected TTSChannel tc; //protected string textToSpeak =""; //System.Threading.Thread newThread; //SpeechData currentSD; public VirtualHuman(AgentPlateform ap, string name, AgentClass agentclass) : base(ap, name, agentclass) { System.Console.WriteLine("VIRTUAL HUMAN"); }
public VirtualHuman(AgentPlateform ap, string name, AgentClass agentclass) : base(ap, name, agentclass) { System.Console.WriteLine("VIRTUAL HUMAN"); dialogueManager = new ConversationalDialogueManager(this); }