Esempio n. 1
0
        private static SuccessionType[,] CreateFootprintTable(PetriNet petriNet)
        {
            var transactions = petriNet.Transitions;

            var footprintTable = new SuccessionType[transactions.Count,
                                                    transactions.Count];

            for (int i = 0; i < transactions.Count; i++)
            {
                var transactionId = transactions[-(i + 1)].id;
                var childrenIds   = petriNet.GetIdsOfChildTransactions(transactionId);
                var parentIds     = petriNet.GetIdsOfParentTransactions(transactionId);

                for (int j = 0; j < transactions.Count; j++)
                {
                    footprintTable[i, j] = DetermineSuccessionType(childrenIds,
                                                                   parentIds, -(j + 1));
                }
            }
            return(footprintTable);
        }