Esempio n. 1
0
        /// <summary>
        ///     Finalize all the agent's cognitive models
        /// </summary>
        protected override void FinalizeModels()
        {
            base.FinalizeModels();
            if (KnowledgeModel.On)
            {
                KnowledgeModel.InitializeExpertise(Schedule.Step);
                foreach (var knowledgeId in KnowledgeModel.Expertise.Select(x => x.Target))
                {
                    BeliefsModel.AddBeliefFromKnowledgeId(knowledgeId);
                }
            }

            if (BeliefsModel.On)
            {
                BeliefsModel.InitializeBeliefs();
            }
        }
Esempio n. 2
0
 public void InitializeExpertiseTest()
 {
     _cognitiveArchitecture.KnowledgeAndBeliefs.HasInitialKnowledge = false;
     _knowledgeModel.InitializeExpertise(0);
     Assert.IsFalse(Network.ActorKnowledge.ExistsSource(_agentId));
 }