当前位置: 首页>>代码示例>>C#>>正文


C# AgentType类代码示例

本文整理汇总了C#中AgentType的典型用法代码示例。如果您正苦于以下问题:C# AgentType类的具体用法?C# AgentType怎么用?C# AgentType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AgentType类属于命名空间,在下文中一共展示了AgentType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ToTypeName

        public static string ToTypeName(AgentType type)
        {
            string typeName = null;
            switch (type)
            {
                case AgentType.SERVICE_BROKER:
                    typeName = ProcessAgentType.SERVICE_BROKER;
                    break;
                case AgentType.BATCH_SERVICE_BROKER:
                    typeName = ProcessAgentType.BATCH_SERVICE_BROKER;
                    break;

                case AgentType.REMOTE_SERVICE_BROKER:
                    typeName = ProcessAgentType.REMOTE_SERVICE_BROKER;
                    break;
                case AgentType.LAB_SERVER:
                    typeName = ProcessAgentType.LAB_SERVER;
                    break;
                case AgentType.BATCH_LAB_SERVER:
                    typeName = ProcessAgentType.BATCH_LAB_SERVER;
                    break;
                case AgentType.EXPERIMENT_STORAGE_SERVER:
                    typeName = ProcessAgentType.EXPERIMENT_STORAGE_SERVER;
                    break;
                case AgentType.SCHEDULING_SERVER:
                    typeName = ProcessAgentType.SCHEDULING_SERVER;
                    break;
                case AgentType.LAB_SCHEDULING_SERVER:
                    typeName = ProcessAgentType.LAB_SCHEDULING_SERVER;
                    break;
                default:
                    break;
            }
            return typeName;
        }
开发者ID:votrongdao,项目名称:UQ-iLab-BatchLabServer,代码行数:35,代码来源:ProcessAgentType.cs

示例2: SortDegreeFromAgentType

 public int SortDegreeFromAgentType(AgentType agentType)
 {
     LSAgent agent = GetAgent ();
     if (agent == null) return -1;
     if (agentType == agent.MyAgentType) return 1;
     return 0;
 }
开发者ID:citizenparker,项目名称:Lockstep-Framework,代码行数:7,代码来源:AgentInterfacer.cs

示例3: AgentCutaway

 public AgentCutaway(AgentType agTy, Int32 ID, Coordinates pos_, AgentState state_)
 {
     type = agTy;
     agentID = ID;
     pos = pos_;
     state = state_;
 }
开发者ID:TotKtoNado,项目名称:TotKtoNada,代码行数:7,代码来源:DataStruct.cs

示例4: SetNpcTbl

	public void SetNpcTbl(Npc_Tbl tbl, AgentType agType)
	{
		if (null == tbl)
		{
			Log.LogError("BlackBoard.SetNpcTbl : Npc_Tbl is null.");
			return;
		}
		if (agType <= AgentType.None || agType >= AgentType.Max)
		{
			Log.LogError("BlackBoard.SetNpcTbl : AgentType is invaild.");
			return;
		}
		npcTbl = tbl;
		agentType = agType;
		speed = tbl.speed;
		health = tbl.hp;

		skillDic.Clear();
		if (agentType == AgentType.Monster
			|| agentType == AgentType.Player)
		{
			for (int i = 0; i < npcTbl.skills.Length; i++)
			{
				int skillID = npcTbl.skills[i];
				if (skillID != 0)
				{
					skillDic.Add(i, skillID);
					SkillManager.Instance.AddSkill(guid, skillID);
				}
			}
		}
	}
开发者ID:HawardLocke,项目名称:MadLand,代码行数:32,代码来源:BlackBoard.cs

示例5: SetProperty

        public override void SetProperty(DesignerPropertyInfo property, object obj) {
            base.SetProperty(property, obj);

            _resetMethods = false;

            DesignerMethodEnum enumAtt = property.Attribute as DesignerMethodEnum;

            if (enumAtt != null && property.Property.PropertyType == null)
            { throw new Exception(string.Format(Resources.ExceptionDesignerAttributeExpectedEnum, property.Property.Name)); }

            Nodes.Behavior behavior = GetBehavior();
            _agentType = (behavior != null) ? behavior.AgentType : null;

            SetTypes();

            object action = property.Property.GetValue(obj, null);
            MethodDef method = action as MethodDef;
            int typeIndex = -1;

            if (method != null) {
                typeIndex = getTypeIndex(method.Owner);
            }

            if (typeIndex < 0) {
                typeIndex = 0;
            }

            // Keep only one type for efficiency.
            _currentNames.Clear();
            _currentNames.Add(_names[typeIndex]);

            this.typeComboBox.Items.Clear();
            this.typeComboBox.Items.Add(_types[typeIndex]);
            this.typeComboBox.SelectedIndex = 0;
        }
开发者ID:675492062,项目名称:behaviac,代码行数:35,代码来源:DesignerMethodComboEnumEditor.cs

示例6: AbstractImprov

        public AbstractImprov(string name, string description, int scoreMultiplier, AgentType affectedType)
        {
            this.name = name;
            this.description = description;
            this.ScoreMultiplier = scoreMultiplier;
            this.AffectedType = affectedType;

            inUse = false;
        }
开发者ID:jvaity,项目名称:JellybeanModel,代码行数:9,代码来源:AbstractImprov.cs

示例7: Agent

 public Agent(AgentType type)
 {
     Name = CreateName(type);
     Type = type;
     Energy = MaxEnergy / 2;
     Age = 0;
     Generation = 1;
     Location = new Location(-1, -1);
     Direction = Direction.West;
 }
开发者ID:xilec,项目名称:LifeSimulation,代码行数:10,代码来源:Agent.cs

示例8: Agent

 public Agent(AgentType agtType, string login, string lastname, string firstname, string extension, string description, CSQ[] csq)
 {
     _agenttype = agtType;
     _loginid = login;
     _lastname = lastname;
     _firstname = firstname;
     _extension = extension;
     _description = description;
     _csqs = csq;
 }
开发者ID:gnomix,项目名称:T.A.L.K.,代码行数:10,代码来源:Agent.cs

示例9: Agent

 public Agent(AgentModule module, AgentType type, int hp)
 {
     AgentModule = module;
     AgentModule.Agent = this;
     ActiveEmotions = new List<Emotion>();
     ActiveEmotionPairs = new Dictionary<ActiveEmotionPair, float>();
     AgentType = type;
     HP = hp;
     EmotionState = EmotionState.resilent;
 }
开发者ID:V4ll3V,项目名称:Emotional-Agents,代码行数:10,代码来源:Agent.cs

示例10: AgentInfo

 public AgentInfo(Color colour_, float radius_, AgentType agType_, 
                 Int32 ID_, AgentState state_, float communicateRad_,
                 Coordinates coord_, float speed_, float viewRadius_)
 {
     agentID = ID_;
     agentColor = colour_;
     agentRadius = radius_;
     agentType = agType_;
     agentState = state_;
     communicteRadius = communicateRad_;
     coord = coord_;
     speed = speed_;
     viewRadius = viewRadius_;
 }
开发者ID:TotKtoNado,项目名称:TotKtoNada,代码行数:14,代码来源:DataStruct.cs

示例11: SolveInstance

    /// <summary>
    /// This is the method that actually does the work.
    /// </summary>
    /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
    protected override void SolveInstance(IGH_DataAccess DA)
    {
      // First, we need to retrieve all data from the input parameters.
      // We'll start by declaring variables and assigning them starting values.
      AgentType agent = new AgentType();

      // Then we need to access the input parameters individually. 
      // When data cannot be extracted from a parameter, we should abort this method.
      if (!DA.GetData(0, ref agent)) return;

      // We should now validate the data and warn the user if invalid data is supplied.

      // We're set to create the output now. To keep the size of the SolveInstance() method small, 
      // The actual functionality will be in a different method:

      // Finally assign the spiral to the output parameter.
      DA.SetData(0, agent.Position);
      DA.SetData(1, agent.Velocity);
      DA.SetData(2, agent.Acceleration);
      DA.SetData(3, agent.Lifespan);
    }
开发者ID:lxfschr,项目名称:Quelea,代码行数:25,代码来源:DeconstructAgentComponent.cs

示例12: EducateAgent

        public static Agent EducateAgent(AgentType agentType)
        {
            var agent = new Agent(agentType);
            var tmpInputs = agent.Inputs;

            ArtificialBrain choosenBrain;
            while (true)
            {
                var brain = CreateBrain();
                SetBrain(agent, brain);
                var scores = FitnessFunction(agent, StandardTests[agentType]);

                if (scores >= 1700)
                {
                    choosenBrain = brain;
                    break;
                }
            }

            SetBrain(agent, choosenBrain);
            agent.Inputs = tmpInputs;

            return agent;
        }
开发者ID:xilec,项目名称:LifeSimulation,代码行数:24,代码来源:TrainingCamp.cs

示例13: ResetMembers

        public virtual bool ResetMembers(bool check, AgentType agentType, bool clear, MethodDef method = null, PropertyDef property = null) {
            bool bReset = false;

            foreach(Attachments.Attachment attach in this.Attachments) {
                bReset |= attach.ResetMembers(check, agentType, clear, method, property);
            }

            foreach(Node child in this.GetChildNodes()) {
                bReset |= child.ResetMembers(check, agentType, clear, method, property);
            }

            return bReset;
        }
开发者ID:haolly,项目名称:behaviac,代码行数:13,代码来源:Node.cs

示例14: InitializeInputData

 private void InitializeInputData(AgentType currType)
 {
     if (currType == AgentType.Household)
     {
         mobelWrkrsConditionals = new DiscreteCondDistribution();
         mobelKidsConditionals = new DiscreteCondDistribution();
         mobelPersConditionals = new DiscreteCondDistribution();
     }
 }
开发者ID:Nasterska,项目名称:Simpsynz_,代码行数:9,代码来源:World.cs

示例15: OpenCensusFiles

        private void OpenCensusFiles(AgentType currType)
        {
            if (currType == AgentType.Household)
            {
                CensusPersonFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Household\\CensusNumOfPers.csv");
                CensusDwellFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Household\\CensusDwellingType.csv");
                CensusCarFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Household\\CensusNumOfCars.csv");

                CensusPersonFileReader.GetConditionalList();
                CensusDwellFileReader.GetConditionalList();
                CensusCarFileReader.GetConditionalList();
            }
            else if (currType == AgentType.Person)
            {
                CensusAgeFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Person\\Person Z-Stats.csv");

                CensusSexFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Person\\Person Z-Stats.csv");

                CensusHhldSizeFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Person\\Person Z-Stats.csv");

                CensusEduLevelFileReader = new InputDataReader(
                    Constants.DATA_DIR + "\\Person\\Person Z-Stats.csv");
                CensusEduLevelFileReader.GetConditionalList();
            }
        }
开发者ID:Nasterska,项目名称:Simpsynz_,代码行数:31,代码来源:World.cs


注:本文中的AgentType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。