Exemplo n.º 1
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;
 }
Exemplo n.º 2
0
 public bool Equals(ActionIndecisionPair other)
 {
     if (other != null)
     {
         return Right.Equals(other.Right) && Left.Equals(other.Left);
     }
     return false;
 }
Exemplo n.º 3
0
 public bool Equals(ActionIndecisionPair other)
 {
     if (other != null)
     {
         return(Right.Equals(other.Right) && Left.Equals(other.Left));
     }
     return(false);
 }
Exemplo 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);
        }
Exemplo 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);
        }