/// <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 override object Clone() { ColouredTransition t = new ColouredTransition(this.Graph as ColouredPetriGraph, this.Name); this.CopyTo(t); return t; }
public void ExecuteTransition(ColouredTransition t) { t.Execute(); }
public ColouredTransitionWrapper(ColouredPetriGraphWrapper graphWrapper, ColouredTransition transition) : base(graphWrapper, transition) { }