public bool Equals(ActionIndecisionPair other)
 {
     if (other != null)
     {
         return Right.Equals(other.Right) && Left.Equals(other.Left);
     }
     return false;
 }
Esempio n. 2
0
 public bool Equals(ActionIndecisionPair other)
 {
     if (other != null)
     {
         return(Right.Equals(other.Right) && Left.Equals(other.Left));
     }
     return(false);
 }
Esempio n. 3
0
        public AssossiativeSet <Agent> GetTagedAgentOfTransitionBetween(ActionState a, ActionState b)
        {
            ActionIndecisionPair key = new ActionIndecisionPair(a, b);

            key = TransitionRelation.Find(x => x.Equals(key));
            if (key == null)
            {
                return(null);
            }
            return(key.TagedAgents);
        }
Esempio n. 4
0
        public SecretAnnouncement(string name, Dictionary<string, Agent> allAgents, Dictionary<string, Agent> audience, Formula announcement)
            : base(name , allAgents , audience , announcement)
        {
            ActionState trueState = new ActionState("TrueState");
            SecretState = new ActionState("Secret");
            SecretState.Precondition = announcement;
            ActionStates.Add(trueState);
            ActionStates.Add(SecretState);

            Relation = new ActionIndecisionPair(SecretState, trueState);
            Relation.TagedAgents = GetSubtractionOfAgentDics(allAgents, audience);
            TransitionRelation.Add(Relation);
        }
Esempio n. 5
0
        public SecretAnnouncement(string name, Dictionary <string, Agent> allAgents, Dictionary <string, Agent> audience, Formula announcement)
            : base(name, allAgents, audience, announcement)
        {
            ActionState trueState = new ActionState("TrueState");

            SecretState = new ActionState("Secret");
            SecretState.Precondition = announcement;
            ActionStates.Add(trueState);
            ActionStates.Add(SecretState);

            Relation             = new ActionIndecisionPair(SecretState, trueState);
            Relation.TagedAgents = GetSubtractionOfAgentDics(allAgents, audience);
            TransitionRelation.Add(Relation);
        }