/// <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); }
/// <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); }
/// <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); }