Example #1
0
        public HorseRaceForm()
        {
            InitializeComponent();
            this.rand = new Random();

            this.network = PetriNetwork.openFromXml(this.rand, @"network\Horserace.pn.xml");
            this.network.bindPetriEvent("goal", new PetriHandler(eventHandler));
        }
Example #2
0
 public StateVector(string name, long unid, PetriNetwork network)
     : base(name, unid, false)
 {
     this.tokenDistribution = new Dictionary<Int64, List<Token>>();
     foreach (Position position in network.Positions)
     {
         List<Token> copiedTokens = new List<Token>();
         copiedTokens.AddRange(position.Tokens);
         this.tokenDistribution.Add(position.Unid, copiedTokens);
     }
 }