Esempio n. 1
0
        /// <summary>
        /// Adds decision option history to list. Can be used for not site oriented agents.
        /// </summary>
        /// <param name="history"></param>
        public void AddDecisionOptionsHistory(DecisionOptionsHistory history)
        {
            if (IsSiteOriented)
            {
                throw new SosielAlgorithmException("Couldn't add decision options history without site. It isn't possible for site oriented agents.");
            }

            DecisionOptionsHistories.Add(Site.DefaultSite, history);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates agent state with one decision option history. For not site oriented agents only.
        /// </summary>
        /// <param name="isSiteOriented"></param>
        /// <param name="history"></param>
        /// <returns></returns>
        public static AgentState Create(bool isSiteOriented, DecisionOptionsHistory history)
        {
            if (isSiteOriented)
            {
                throw new SosielAlgorithmException("Wrong AgentState.Create method usage");
            }

            AgentState state = Create(isSiteOriented);

            state.DecisionOptionsHistories.Add(Site.DefaultSite, history);

            return(state);
        }
Esempio n. 3
0
 /// <summary>
 /// Adds decision options history to list. Can be used for site oriented agents.
 /// </summary>
 /// <param name="history"></param>
 /// <param name="site"></param>
 public void AddDecisionOptionsHistory(DecisionOptionsHistory history, Site site)
 {
     DecisionOptionsHistories.Add(site, history);
 }