/// <summary> /// Function of execute the transition in a 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, ColouredTransition 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; }
public void ExecuteTransition(ColouredTransition t) { t.Execute(); }