Esempio n. 1
0
        public override object Clone()
        {
            MarkedTransition t = new MarkedTransition(this.Graph, this.Name);

            this.CopyTo(t);

            return t;
        }
Esempio n. 2
0
 public void ExecuteTransition(MarkedTransition t)
 {
     t.Execute();
 }
Esempio n. 3
0
        /// <summary>
        /// Function of execute transition in special marking
        /// State of the net won't change
        /// </summary>
        /// <param name="marking"></param>
        /// <param name="t"></param>
        /// <returns></returns>
        public uint[] GetStateAfterExecute(uint[] marking, MarkedTransition t)
        {
            uint[] newMarking = null;

            this.SaveMarkingAsStartMarking();
            this.SetMarking(marking);

            if (t.IsAvailable())
            {
                // execute transition
                t.Execute();
                // save marking
                newMarking = this.GetState();
            }
            // reset marking to start marking
            this.ResetMarking();

            // if t is unavailable return null
            return newMarking;
        }