Beispiel #1
0
        /**
         * Creates the user agent architecture, default architecture is
         * jason.architecture.AgArch. The arch will create the agent that creates
         * the TS.
         */
        public void CreateArchs(List <string> agArchClasses, string asSrc, Settings stts, BaseCentralisedMAS masRunner)
        {
            try
            {
                this.masRunner = masRunner;
                Agent.Create(this, asSrc, stts);
                InsertAgentArchitecture(this);

                CreateCustomArchs(agArchClasses);
            } catch (Exception e)
            {
                running = false;
                throw new JasonityException("as2j: error creating the agent class! - " + e.Message, e);
            }
        }
Beispiel #2
0
        /** init the agent architecture based on another agent */
        public void CreateArchs(List <string> agArchClasses, Agent ag, BaseCentralisedMAS masRunner)
        {
            try
            {
                this.masRunner = masRunner;
                SetReasoner(ag.Clone(this).GetReasoner());
                InsertAgentArchitecture(this);

                CreateCustomArchs(agArchClasses);
            } catch (Exception e)
            {
                running = false;
                throw new JasonityException("as2j: error creating the agent class! - ", e);
            }
        }
Beispiel #3
0
 public EnvironmentInfraTier(ClassParameters userEnvArgs, BaseCentralisedMAS masRunner)
 {
     this.masRunner = masRunner;
     if (userEnvArgs != null)
     {
         try
         {
             userEnv = (Environment)Activator.CreateInstance(typeof(Environment));
             userEnv.SetEnvironmentInfraTier(this);
             userEnv.Init(userEnvArgs.GetParametersArray());
         }
         catch (Exception e)
         {
             Debug.Log("Error in Centralised MAS environment creation");
             Debug.Log(e);
             throw new JasonityException("The user environment class instantiation '" + userEnvArgs + "' has failed!" + e.Message);
         }
     }
 }
 public CentralisedRuntimeServices(BaseCentralisedMAS masRunner)
 {
     this.masRunner = masRunner;
 }