Esempio n. 1
0
        /// <summary>
        /// Creates new instance of agent site with copied anticipation influence and goals state from current state
        /// </summary>
        /// <returns></returns>
        public AgentState CreateForNextIteration()
        {
            AgentState agentState = Create(IsSiteOriented);

            GoalsState.ForEach(kvp =>
            {
                agentState.GoalsState.Add(kvp.Key, kvp.Value.CreateForNextIteration());
            });

            RuleHistories.Keys.ForEach(site =>
            {
                agentState.RuleHistories.Add(site, new RuleHistory());
            });

            return(agentState);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates new instance of agent site with copied anticipation influence and goals state from current state
        /// </summary>
        /// <returns></returns>
        public AgentState <TSite> CreateForNextIteration()
        {
            AgentState <TSite> agentState = Create(IsSiteOriented);

            GoalsState.ForEach(kvp =>
            {
                agentState.GoalsState.Add(kvp.Key, kvp.Value.CreateForNextIteration());
            });

            DecisionOptionsHistories.Keys.ForEach(site =>
            {
                agentState.DecisionOptionsHistories.Add(site, new DecisionOptionsHistory());
            });

            return(agentState);
        }