Prechádzať zdrojové kódy

ModelSequencer now creates execution model constructs for time events (after & every) on transitions. (#111)

terfloth@itemis.de 14 rokov pred
rodič
commit
91a87a3e35
44 zmenil súbory, kde vykonal 3531 pridanie a 797 odobranie
  1. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_entryAction_ScheduleTimeEvent.gif
  2. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_entryAction_UnscheduleTimeEvent.gif
  3. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_exitAction_ScheduleTimeEvent.gif
  4. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_exitAction_UnscheduleTimeEvent.gif
  5. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateReaction_effect_ScheduleTimeEvent.gif
  6. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateReaction_effect_UnscheduleTimeEvent.gif
  7. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateScheduleTimeEvent_timeValue_Statement.gif
  8. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateSequence_steps_ScheduleTimeEvent.gif
  9. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateSequence_steps_UnscheduleTimeEvent.gif
  10. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/ScheduleTimeEvent.gif
  11. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/TimeEvent.gif
  12. BIN
      plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/UnscheduleTimeEvent.gif
  13. 9 0
      plugins/org.yakindu.sct.model.sexec.edit/plugin.properties
  14. 22 2
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ExecutionStateItemProvider.java
  15. 11 1
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ReactionItemProvider.java
  16. 185 0
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ScheduleTimeEventItemProvider.java
  17. 11 1
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/SequenceItemProvider.java
  18. 75 3
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/SexecItemProviderAdapterFactory.java
  19. 162 0
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/TimeEventItemProvider.java
  20. 139 0
      plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/UnscheduleTimeEventItemProvider.java
  21. 23 11
      plugins/org.yakindu.sct.model.sexec/model/sexec.ecore
  22. 590 466
      plugins/org.yakindu.sct.model.sexec/model/sexec.ecorediag
  23. 8 0
      plugins/org.yakindu.sct.model.sexec/plugin.properties
  24. 81 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/ScheduleTimeEvent.java
  25. 27 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecFactory.java
  26. 377 103
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java
  27. 55 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/TimeEvent.java
  28. 53 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/UnscheduleTimeEvent.java
  29. 241 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/ScheduleTimeEventImpl.java
  30. 36 3
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecFactoryImpl.java
  31. 129 19
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecPackageImpl.java
  32. 168 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/TimeEventImpl.java
  33. 160 0
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/UnscheduleTimeEventImpl.java
  34. 18 1
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/FactoryExtension.xtend
  35. 132 27
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/ModelSequencer.xtend
  36. 27 1
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.xtend
  37. 120 10
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecAdapterFactory.java
  38. 135 18
      plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecSwitch.java
  39. 29 0
      plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/FactoryExtension.java
  40. 233 9
      plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/ModelSequencer.java
  41. 50 0
      plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.java
  42. 112 112
      plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore
  43. 89 0
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerTest.java
  44. 24 10
      test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SCTTestUtil.java

BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_entryAction_ScheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_entryAction_UnscheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_exitAction_ScheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateExecutionState_exitAction_UnscheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateReaction_effect_ScheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateReaction_effect_UnscheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateScheduleTimeEvent_timeValue_Statement.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateSequence_steps_ScheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/ctool16/CreateSequence_steps_UnscheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/ScheduleTimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/TimeEvent.gif


BIN
plugins/org.yakindu.sct.model.sexec.edit/icons/full/obj16/UnscheduleTimeEvent.gif


+ 9 - 0
plugins/org.yakindu.sct.model.sexec.edit/plugin.properties

@@ -59,3 +59,12 @@ _UI_Call_type = Call
 _UI_Call_step_feature = Step
 _UI_ExecutionState_entryAction_feature = Entry Action
 _UI_ExecutionState_exitAction_feature = Exit Action
+pluginName = Sexec Edit Support
+providerName = www.example.org
+_UI_TimeEvent_type = Time Event
+_UI_ScheduleTimeEvent_type = Schedule Time Event
+_UI_UnscheduleTimeEvent_type = Unschedule Time Event
+_UI_TimeEvent_periodic_feature = Periodic
+_UI_ScheduleTimeEvent_timeEvent_feature = Time Event
+_UI_ScheduleTimeEvent_timeValue_feature = Time Value
+_UI_UnscheduleTimeEvent_timeEvent_feature = Time Event

+ 22 - 2
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ExecutionStateItemProvider.java

@@ -235,6 +235,11 @@ public class ExecutionStateItemProvider
 				(SexecPackage.Literals.EXECUTION_STATE__ENTRY_ACTION,
 				 SexecFactory.eINSTANCE.createCheck()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.EXECUTION_STATE__ENTRY_ACTION,
+				 SexecFactory.eINSTANCE.createCheckRef()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.EXECUTION_STATE__ENTRY_ACTION,
@@ -263,7 +268,12 @@ public class ExecutionStateItemProvider
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.EXECUTION_STATE__ENTRY_ACTION,
-				 SexecFactory.eINSTANCE.createCheckRef()));
+				 SexecFactory.eINSTANCE.createScheduleTimeEvent()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.EXECUTION_STATE__ENTRY_ACTION,
+				 SexecFactory.eINSTANCE.createUnscheduleTimeEvent()));
 
 		newChildDescriptors.add
 			(createChildParameter
@@ -280,6 +290,11 @@ public class ExecutionStateItemProvider
 				(SexecPackage.Literals.EXECUTION_STATE__EXIT_ACTION,
 				 SexecFactory.eINSTANCE.createCheck()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.EXECUTION_STATE__EXIT_ACTION,
+				 SexecFactory.eINSTANCE.createCheckRef()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.EXECUTION_STATE__EXIT_ACTION,
@@ -308,7 +323,12 @@ public class ExecutionStateItemProvider
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.EXECUTION_STATE__EXIT_ACTION,
-				 SexecFactory.eINSTANCE.createCheckRef()));
+				 SexecFactory.eINSTANCE.createScheduleTimeEvent()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.EXECUTION_STATE__EXIT_ACTION,
+				 SexecFactory.eINSTANCE.createUnscheduleTimeEvent()));
 	}
 
 	/**

+ 11 - 1
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ReactionItemProvider.java

@@ -178,6 +178,11 @@ public class ReactionItemProvider
 				(SexecPackage.Literals.REACTION__EFFECT,
 				 SexecFactory.eINSTANCE.createCheck()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.REACTION__EFFECT,
+				 SexecFactory.eINSTANCE.createCheckRef()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.REACTION__EFFECT,
@@ -206,7 +211,12 @@ public class ReactionItemProvider
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.REACTION__EFFECT,
-				 SexecFactory.eINSTANCE.createCheckRef()));
+				 SexecFactory.eINSTANCE.createScheduleTimeEvent()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.REACTION__EFFECT,
+				 SexecFactory.eINSTANCE.createUnscheduleTimeEvent()));
 	}
 
 	/**

+ 185 - 0
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/ScheduleTimeEventItemProvider.java

@@ -0,0 +1,185 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
+import org.yakindu.sct.model.sexec.SexecPackage;
+
+import org.yakindu.sct.model.sgraph.SGraphFactory;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.sct.model.sexec.ScheduleTimeEvent} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ScheduleTimeEventItemProvider
+	extends StepItemProvider
+	implements
+		IEditingDomainItemProvider,
+		IStructuredItemContentProvider,
+		ITreeItemContentProvider,
+		IItemLabelProvider,
+		IItemPropertySource {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public ScheduleTimeEventItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addTimeEventPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Time Event feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addTimeEventPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_ScheduleTimeEvent_timeEvent_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_ScheduleTimeEvent_timeEvent_feature", "_UI_ScheduleTimeEvent_type"),
+				 SexecPackage.Literals.SCHEDULE_TIME_EVENT__TIME_EVENT,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+		if (childrenFeatures == null) {
+			super.getChildrenFeatures(object);
+			childrenFeatures.add(SexecPackage.Literals.SCHEDULE_TIME_EVENT__TIME_VALUE);
+		}
+		return childrenFeatures;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EStructuralFeature getChildFeature(Object object, Object child) {
+		// Check the type of the specified child object and return the proper feature to use for
+		// adding (see {@link AddCommand}) it as a child.
+
+		return super.getChildFeature(object, child);
+	}
+
+	/**
+	 * This returns ScheduleTimeEvent.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/ScheduleTimeEvent"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		String label = ((ScheduleTimeEvent)object).getName();
+		return label == null || label.length() == 0 ?
+			getString("_UI_ScheduleTimeEvent_type") :
+			getString("_UI_ScheduleTimeEvent_type") + " " + label;
+	}
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to update any cached
+	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(ScheduleTimeEvent.class)) {
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+				return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.SCHEDULE_TIME_EVENT__TIME_VALUE,
+				 SGraphFactory.eINSTANCE.createStatement()));
+	}
+
+}

+ 11 - 1
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/SequenceItemProvider.java

@@ -168,6 +168,11 @@ public class SequenceItemProvider
 				(SexecPackage.Literals.SEQUENCE__STEPS,
 				 SexecFactory.eINSTANCE.createCheck()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.SEQUENCE__STEPS,
+				 SexecFactory.eINSTANCE.createCheckRef()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.SEQUENCE__STEPS,
@@ -196,7 +201,12 @@ public class SequenceItemProvider
 		newChildDescriptors.add
 			(createChildParameter
 				(SexecPackage.Literals.SEQUENCE__STEPS,
-				 SexecFactory.eINSTANCE.createCheckRef()));
+				 SexecFactory.eINSTANCE.createScheduleTimeEvent()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SexecPackage.Literals.SEQUENCE__STEPS,
+				 SexecFactory.eINSTANCE.createUnscheduleTimeEvent()));
 	}
 
 }

+ 75 - 3
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/SexecItemProviderAdapterFactory.java

@@ -351,6 +351,52 @@ public class SexecItemProviderAdapterFactory extends SexecAdapterFactory impleme
 		return callItemProvider;
 	}
 
+	/**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.sexec.ScheduleTimeEvent} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected ScheduleTimeEventItemProvider scheduleTimeEventItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.yakindu.sct.model.sexec.ScheduleTimeEvent}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createScheduleTimeEventAdapter() {
+		if (scheduleTimeEventItemProvider == null) {
+			scheduleTimeEventItemProvider = new ScheduleTimeEventItemProvider(this);
+		}
+
+		return scheduleTimeEventItemProvider;
+	}
+
+	/**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected UnscheduleTimeEventItemProvider unscheduleTimeEventItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createUnscheduleTimeEventAdapter() {
+		if (unscheduleTimeEventItemProvider == null) {
+			unscheduleTimeEventItemProvider = new UnscheduleTimeEventItemProvider(this);
+		}
+
+		return unscheduleTimeEventItemProvider;
+	}
+
 	/**
 	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.sexec.CheckRef} instances.
 	 * <!-- begin-user-doc -->
@@ -397,6 +443,29 @@ public class SexecItemProviderAdapterFactory extends SexecAdapterFactory impleme
 		return stateVectorItemProvider;
 	}
 
+	/**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.sexec.TimeEvent} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected TimeEventItemProvider timeEventItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.yakindu.sct.model.sexec.TimeEvent}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createTimeEventAdapter() {
+		if (timeEventItemProvider == null) {
+			timeEventItemProvider = new TimeEventItemProvider(this);
+		}
+
+		return timeEventItemProvider;
+	}
+
 	/**
 	 * This returns the root adapter factory that contains this factory.
 	 * <!-- begin-user-doc -->
@@ -497,19 +566,22 @@ public class SexecItemProviderAdapterFactory extends SexecAdapterFactory impleme
 	 */
 	public void dispose() {
 		if (executionFlowItemProvider != null) executionFlowItemProvider.dispose();
+		if (namedElementItemProvider != null) namedElementItemProvider.dispose();
+		if (stateVectorItemProvider != null) stateVectorItemProvider.dispose();
+		if (timeEventItemProvider != null) timeEventItemProvider.dispose();
 		if (executionStateItemProvider != null) executionStateItemProvider.dispose();
 		if (reactionItemProvider != null) reactionItemProvider.dispose();
-		if (stateVectorItemProvider != null) stateVectorItemProvider.dispose();
-		if (namedElementItemProvider != null) namedElementItemProvider.dispose();
 		if (sequenceItemProvider != null) sequenceItemProvider.dispose();
 		if (cycleItemProvider != null) cycleItemProvider.dispose();
 		if (checkItemProvider != null) checkItemProvider.dispose();
+		if (checkRefItemProvider != null) checkRefItemProvider.dispose();
 		if (ifItemProvider != null) ifItemProvider.dispose();
 		if (executionItemProvider != null) executionItemProvider.dispose();
 		if (enterStateItemProvider != null) enterStateItemProvider.dispose();
 		if (exitStateItemProvider != null) exitStateItemProvider.dispose();
 		if (callItemProvider != null) callItemProvider.dispose();
-		if (checkRefItemProvider != null) checkRefItemProvider.dispose();
+		if (scheduleTimeEventItemProvider != null) scheduleTimeEventItemProvider.dispose();
+		if (unscheduleTimeEventItemProvider != null) unscheduleTimeEventItemProvider.dispose();
 	}
 
 }

+ 162 - 0
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/TimeEventItemProvider.java

@@ -0,0 +1,162 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.TimeEvent;
+
+import org.yakindu.sct.model.sgraph.provider.EventItemProvider;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.sct.model.sexec.TimeEvent} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TimeEventItemProvider
+	extends EventItemProvider
+	implements
+		IEditingDomainItemProvider,
+		IStructuredItemContentProvider,
+		ITreeItemContentProvider,
+		IItemLabelProvider,
+		IItemPropertySource {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TimeEventItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addPeriodicPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Periodic feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addPeriodicPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_TimeEvent_periodic_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_TimeEvent_periodic_feature", "_UI_TimeEvent_type"),
+				 SexecPackage.Literals.TIME_EVENT__PERIODIC,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This returns TimeEvent.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/TimeEvent"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		String label = ((TimeEvent)object).getName();
+		return label == null || label.length() == 0 ?
+			getString("_UI_TimeEvent_type") :
+			getString("_UI_TimeEvent_type") + " " + label;
+	}
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to update any cached
+	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(TimeEvent.class)) {
+			case SexecPackage.TIME_EVENT__PERIODIC:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public ResourceLocator getResourceLocator() {
+		return SexecEditPlugin.INSTANCE;
+	}
+
+}

+ 139 - 0
plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/UnscheduleTimeEventItemProvider.java

@@ -0,0 +1,139 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class UnscheduleTimeEventItemProvider
+	extends StepItemProvider
+	implements
+		IEditingDomainItemProvider,
+		IStructuredItemContentProvider,
+		ITreeItemContentProvider,
+		IItemLabelProvider,
+		IItemPropertySource {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public UnscheduleTimeEventItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+			addTimeEventPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Time Event feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addTimeEventPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_UnscheduleTimeEvent_timeEvent_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_UnscheduleTimeEvent_timeEvent_feature", "_UI_UnscheduleTimeEvent_type"),
+				 SexecPackage.Literals.UNSCHEDULE_TIME_EVENT__TIME_EVENT,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * This returns UnscheduleTimeEvent.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/UnscheduleTimeEvent"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		String label = ((UnscheduleTimeEvent)object).getName();
+		return label == null || label.length() == 0 ?
+			getString("_UI_UnscheduleTimeEvent_type") :
+			getString("_UI_UnscheduleTimeEvent_type") + " " + label;
+	}
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to update any cached
+	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+	}
+
+}

+ 23 - 11
plugins/org.yakindu.sct.model.sexec/model/sexec.ecore

@@ -13,6 +13,19 @@
     <eStructuralFeatures xsi:type="ecore:EReference" name="stateVector" eType="#//StateVector"
         containment="true"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="NamedElement">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="StateVector">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+        defaultValueLiteral="1"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="offset" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+        defaultValueLiteral="0"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="TimeEvent" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Event">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="periodic" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        defaultValueLiteral="false"/>
+  </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="ExecutionState" eSuperTypes="#//NamedElement">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="simpleName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
@@ -32,15 +45,6 @@
     <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Step"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="StateVector">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
-        defaultValueLiteral="1"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="offset" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
-        defaultValueLiteral="0"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="NamedElement">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Step" abstract="true" eSuperTypes="#//NamedElement">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="comment" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
@@ -53,6 +57,9 @@
     <eStructuralFeatures xsi:type="ecore:EReference" name="condition" eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Statement"
         containment="true"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="CheckRef" eSuperTypes="#//Check">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="check" eType="#//Check"/>
+  </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="If" eSuperTypes="#//Step">
     <eStructuralFeatures xsi:type="ecore:EReference" name="check" eType="#//Check"
         containment="true"/>
@@ -74,7 +81,12 @@
   <eClassifiers xsi:type="ecore:EClass" name="Call" eSuperTypes="#//Step">
     <eStructuralFeatures xsi:type="ecore:EReference" name="step" eType="#//Step"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="CheckRef" eSuperTypes="#//Check">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="check" eType="#//Check"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ScheduleTimeEvent" eSuperTypes="#//Step">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="timeEvent" eType="#//TimeEvent"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="timeValue" eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Statement"
+        containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="UnscheduleTimeEvent" eSuperTypes="#//Step">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="timeEvent" eType="#//TimeEvent"/>
   </eClassifiers>
 </ecore:EPackage>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 590 - 466
plugins/org.yakindu.sct.model.sexec/model/sexec.ecorediag


+ 8 - 0
plugins/org.yakindu.sct.model.sexec/plugin.properties

@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = Sexec Model
+providerName = www.example.org

+ 81 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/ScheduleTimeEvent.java

@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec;
+
+import org.yakindu.sct.model.sgraph.Statement;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Schedule Time Event</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeEvent <em>Time Event</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeValue <em>Time Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.sct.model.sexec.SexecPackage#getScheduleTimeEvent()
+ * @model
+ * @generated
+ */
+public interface ScheduleTimeEvent extends Step {
+	/**
+	 * Returns the value of the '<em><b>Time Event</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Time Event</em>' reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Time Event</em>' reference.
+	 * @see #setTimeEvent(TimeEvent)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getScheduleTimeEvent_TimeEvent()
+	 * @model
+	 * @generated
+	 */
+	TimeEvent getTimeEvent();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeEvent <em>Time Event</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Time Event</em>' reference.
+	 * @see #getTimeEvent()
+	 * @generated
+	 */
+	void setTimeEvent(TimeEvent value);
+
+	/**
+	 * Returns the value of the '<em><b>Time Value</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Time Value</em>' containment reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Time Value</em>' containment reference.
+	 * @see #setTimeValue(Statement)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getScheduleTimeEvent_TimeValue()
+	 * @model containment="true"
+	 * @generated
+	 */
+	Statement getTimeValue();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeValue <em>Time Value</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Time Value</em>' containment reference.
+	 * @see #getTimeValue()
+	 * @generated
+	 */
+	void setTimeValue(Statement value);
+
+} // ScheduleTimeEvent

+ 27 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecFactory.java

@@ -133,6 +133,24 @@ public interface SexecFactory extends EFactory {
 	 */
 	Call createCall();
 
+	/**
+	 * Returns a new object of class '<em>Schedule Time Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Schedule Time Event</em>'.
+	 * @generated
+	 */
+	ScheduleTimeEvent createScheduleTimeEvent();
+
+	/**
+	 * Returns a new object of class '<em>Unschedule Time Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Unschedule Time Event</em>'.
+	 * @generated
+	 */
+	UnscheduleTimeEvent createUnscheduleTimeEvent();
+
 	/**
 	 * Returns a new object of class '<em>Check Ref</em>'.
 	 * <!-- begin-user-doc -->
@@ -151,6 +169,15 @@ public interface SexecFactory extends EFactory {
 	 */
 	StateVector createStateVector();
 
+	/**
+	 * Returns a new object of class '<em>Time Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Time Event</em>'.
+	 * @generated
+	 */
+	TimeEvent createTimeEvent();
+
 	/**
 	 * Returns the package supported by this factory.
 	 * <!-- begin-user-doc -->

+ 377 - 103
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/SexecPackage.java

@@ -141,7 +141,7 @@ public interface SexecPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getNamedElement()
 	 * @generated
 	 */
-	int NAMED_ELEMENT = 4;
+	int NAMED_ELEMENT = 1;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -169,242 +169,279 @@ public interface SexecPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getExecutionState()
 	 * @generated
 	 */
-	int EXECUTION_STATE = 1;
+	int EXECUTION_STATE = 4;
 
 	/**
-	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ReactionImpl <em>Reaction</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.ReactionImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getReaction()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__NAME = NAMED_ELEMENT__NAME;
+	int REACTION = 5;
 
 	/**
-	 * The feature id for the '<em><b>Simple Name</b></em>' attribute.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.StepImpl <em>Step</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.StepImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getStep()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__SIMPLE_NAME = NAMED_ELEMENT_FEATURE_COUNT + 0;
+	int STEP = 6;
 
 	/**
-	 * The feature id for the '<em><b>Leaf</b></em>' attribute.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.SequenceImpl <em>Sequence</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.SequenceImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getSequence()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__LEAF = NAMED_ELEMENT_FEATURE_COUNT + 1;
+	int SEQUENCE = 7;
 
 	/**
-	 * The feature id for the '<em><b>Cycle</b></em>' containment reference.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CycleImpl <em>Cycle</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.CycleImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCycle()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__CYCLE = NAMED_ELEMENT_FEATURE_COUNT + 2;
+	int CYCLE = 8;
 
 	/**
-	 * The feature id for the '<em><b>Reactions</b></em>' containment reference list.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CheckImpl <em>Check</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.CheckImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCheck()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__REACTIONS = NAMED_ELEMENT_FEATURE_COUNT + 3;
+	int CHECK = 9;
 
 	/**
-	 * The feature id for the '<em><b>Entry Action</b></em>' containment reference.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.IfImpl <em>If</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.IfImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getIf()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__ENTRY_ACTION = NAMED_ELEMENT_FEATURE_COUNT + 4;
+	int IF = 11;
 
 	/**
-	 * The feature id for the '<em><b>Exit Action</b></em>' containment reference.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ExecutionImpl <em>Execution</em>}' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.ExecutionImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getExecution()
 	 * @generated
-	 * @ordered
 	 */
-	int EXECUTION_STATE__EXIT_ACTION = NAMED_ELEMENT_FEATURE_COUNT + 5;
+	int EXECUTION = 12;
 
 	/**
-	 * The number of structural features of the '<em>Execution State</em>' class.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.EnterStateImpl <em>Enter State</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.EnterStateImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getEnterState()
+	 * @generated
+	 */
+	int ENTER_STATE = 13;
+
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ExitStateImpl <em>Exit State</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.ExitStateImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getExitState()
+	 * @generated
+	 */
+	int EXIT_STATE = 14;
+
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.StateVectorImpl <em>State Vector</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.StateVectorImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getStateVector()
+	 * @generated
+	 */
+	int STATE_VECTOR = 2;
+
+	/**
+	 * The feature id for the '<em><b>Size</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int EXECUTION_STATE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 6;
+	int STATE_VECTOR__SIZE = 0;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ReactionImpl <em>Reaction</em>}' class.
+	 * The feature id for the '<em><b>Offset</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.ReactionImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getReaction()
 	 * @generated
+	 * @ordered
 	 */
-	int REACTION = 2;
+	int STATE_VECTOR__OFFSET = 1;
 
 	/**
-	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * The number of structural features of the '<em>State Vector</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int REACTION__NAME = NAMED_ELEMENT__NAME;
+	int STATE_VECTOR_FEATURE_COUNT = 2;
 
 	/**
-	 * The feature id for the '<em><b>Check</b></em>' containment reference.
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.TimeEventImpl <em>Time Event</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.TimeEventImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getTimeEvent()
+	 * @generated
+	 */
+	int TIME_EVENT = 3;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int REACTION__CHECK = NAMED_ELEMENT_FEATURE_COUNT + 0;
+	int TIME_EVENT__NAME = SGraphPackage.EVENT__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Effect</b></em>' containment reference.
+	 * The feature id for the '<em><b>Periodic</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int REACTION__EFFECT = NAMED_ELEMENT_FEATURE_COUNT + 1;
+	int TIME_EVENT__PERIODIC = SGraphPackage.EVENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The number of structural features of the '<em>Reaction</em>' class.
+	 * The number of structural features of the '<em>Time Event</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int REACTION_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2;
+	int TIME_EVENT_FEATURE_COUNT = SGraphPackage.EVENT_FEATURE_COUNT + 1;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.StepImpl <em>Step</em>}' class.
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.StepImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getStep()
 	 * @generated
+	 * @ordered
 	 */
-	int STEP = 5;
+	int EXECUTION_STATE__NAME = NAMED_ELEMENT__NAME;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.SequenceImpl <em>Sequence</em>}' class.
+	 * The feature id for the '<em><b>Simple Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.SequenceImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getSequence()
 	 * @generated
+	 * @ordered
 	 */
-	int SEQUENCE = 6;
+	int EXECUTION_STATE__SIMPLE_NAME = NAMED_ELEMENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CycleImpl <em>Cycle</em>}' class.
+	 * The feature id for the '<em><b>Leaf</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.CycleImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCycle()
 	 * @generated
+	 * @ordered
 	 */
-	int CYCLE = 7;
+	int EXECUTION_STATE__LEAF = NAMED_ELEMENT_FEATURE_COUNT + 1;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CheckImpl <em>Check</em>}' class.
+	 * The feature id for the '<em><b>Cycle</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.CheckImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCheck()
 	 * @generated
+	 * @ordered
 	 */
-	int CHECK = 8;
+	int EXECUTION_STATE__CYCLE = NAMED_ELEMENT_FEATURE_COUNT + 2;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.IfImpl <em>If</em>}' class.
+	 * The feature id for the '<em><b>Reactions</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.IfImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getIf()
 	 * @generated
+	 * @ordered
 	 */
-	int IF = 9;
+	int EXECUTION_STATE__REACTIONS = NAMED_ELEMENT_FEATURE_COUNT + 3;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ExecutionImpl <em>Execution</em>}' class.
+	 * The feature id for the '<em><b>Entry Action</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.ExecutionImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getExecution()
 	 * @generated
+	 * @ordered
 	 */
-	int EXECUTION = 10;
+	int EXECUTION_STATE__ENTRY_ACTION = NAMED_ELEMENT_FEATURE_COUNT + 4;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.EnterStateImpl <em>Enter State</em>}' class.
+	 * The feature id for the '<em><b>Exit Action</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.EnterStateImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getEnterState()
 	 * @generated
+	 * @ordered
 	 */
-	int ENTER_STATE = 11;
+	int EXECUTION_STATE__EXIT_ACTION = NAMED_ELEMENT_FEATURE_COUNT + 5;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ExitStateImpl <em>Exit State</em>}' class.
+	 * The number of structural features of the '<em>Execution State</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.ExitStateImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getExitState()
 	 * @generated
+	 * @ordered
 	 */
-	int EXIT_STATE = 12;
+	int EXECUTION_STATE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 6;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.StateVectorImpl <em>State Vector</em>}' class.
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.StateVectorImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getStateVector()
 	 * @generated
+	 * @ordered
 	 */
-	int STATE_VECTOR = 3;
+	int REACTION__NAME = NAMED_ELEMENT__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Size</b></em>' attribute.
+	 * The feature id for the '<em><b>Check</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATE_VECTOR__SIZE = 0;
+	int REACTION__CHECK = NAMED_ELEMENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Offset</b></em>' attribute.
+	 * The feature id for the '<em><b>Effect</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATE_VECTOR__OFFSET = 1;
+	int REACTION__EFFECT = NAMED_ELEMENT_FEATURE_COUNT + 1;
 
 	/**
-	 * The number of structural features of the '<em>State Vector</em>' class.
+	 * The number of structural features of the '<em>Reaction</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATE_VECTOR_FEATURE_COUNT = 2;
+	int REACTION_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -541,6 +578,91 @@ public interface SexecPackage extends EPackage {
 	 */
 	int CHECK_FEATURE_COUNT = STEP_FEATURE_COUNT + 1;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CallImpl <em>Call</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.CallImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCall()
+	 * @generated
+	 */
+	int CALL = 15;
+
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.ScheduleTimeEventImpl <em>Schedule Time Event</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.ScheduleTimeEventImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getScheduleTimeEvent()
+	 * @generated
+	 */
+	int SCHEDULE_TIME_EVENT = 16;
+
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.UnscheduleTimeEventImpl <em>Unschedule Time Event</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.UnscheduleTimeEventImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getUnscheduleTimeEvent()
+	 * @generated
+	 */
+	int UNSCHEDULE_TIME_EVENT = 17;
+
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CheckRefImpl <em>Check Ref</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sexec.impl.CheckRefImpl
+	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCheckRef()
+	 * @generated
+	 */
+	int CHECK_REF = 10;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int CHECK_REF__NAME = CHECK__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Comment</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int CHECK_REF__COMMENT = CHECK__COMMENT;
+
+	/**
+	 * The feature id for the '<em><b>Condition</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int CHECK_REF__CONDITION = CHECK__CONDITION;
+
+	/**
+	 * The feature id for the '<em><b>Check</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int CHECK_REF__CHECK = CHECK_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Check Ref</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int CHECK_REF_FEATURE_COUNT = CHECK_FEATURE_COUNT + 1;
+
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
@@ -703,16 +825,6 @@ public interface SexecPackage extends EPackage {
 	 */
 	int EXIT_STATE_FEATURE_COUNT = STEP_FEATURE_COUNT + 1;
 
-	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CallImpl <em>Call</em>}' class.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.CallImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCall()
-	 * @generated
-	 */
-	int CALL = 13;
-
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
@@ -750,59 +862,85 @@ public interface SexecPackage extends EPackage {
 	int CALL_FEATURE_COUNT = STEP_FEATURE_COUNT + 1;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sexec.impl.CheckRefImpl <em>Check Ref</em>}' class.
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sexec.impl.CheckRefImpl
-	 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getCheckRef()
 	 * @generated
+	 * @ordered
 	 */
-	int CHECK_REF = 14;
+	int SCHEDULE_TIME_EVENT__NAME = STEP__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * The feature id for the '<em><b>Comment</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int CHECK_REF__NAME = CHECK__NAME;
+	int SCHEDULE_TIME_EVENT__COMMENT = STEP__COMMENT;
 
 	/**
-	 * The feature id for the '<em><b>Comment</b></em>' attribute.
+	 * The feature id for the '<em><b>Time Event</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int CHECK_REF__COMMENT = CHECK__COMMENT;
+	int SCHEDULE_TIME_EVENT__TIME_EVENT = STEP_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Condition</b></em>' containment reference.
+	 * The feature id for the '<em><b>Time Value</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int CHECK_REF__CONDITION = CHECK__CONDITION;
+	int SCHEDULE_TIME_EVENT__TIME_VALUE = STEP_FEATURE_COUNT + 1;
 
 	/**
-	 * The feature id for the '<em><b>Check</b></em>' reference.
+	 * The number of structural features of the '<em>Schedule Time Event</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int CHECK_REF__CHECK = CHECK_FEATURE_COUNT + 0;
+	int SCHEDULE_TIME_EVENT_FEATURE_COUNT = STEP_FEATURE_COUNT + 2;
 
 	/**
-	 * The number of structural features of the '<em>Check Ref</em>' class.
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int CHECK_REF_FEATURE_COUNT = CHECK_FEATURE_COUNT + 1;
+	int UNSCHEDULE_TIME_EVENT__NAME = STEP__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Comment</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int UNSCHEDULE_TIME_EVENT__COMMENT = STEP__COMMENT;
+
+	/**
+	 * The feature id for the '<em><b>Time Event</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int UNSCHEDULE_TIME_EVENT__TIME_EVENT = STEP_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Unschedule Time Event</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int UNSCHEDULE_TIME_EVENT_FEATURE_COUNT = STEP_FEATURE_COUNT + 1;
 
 
 	/**
@@ -1188,6 +1326,59 @@ public interface SexecPackage extends EPackage {
 	 */
 	EReference getCall_Step();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent <em>Schedule Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Schedule Time Event</em>'.
+	 * @see org.yakindu.sct.model.sexec.ScheduleTimeEvent
+	 * @generated
+	 */
+	EClass getScheduleTimeEvent();
+
+	/**
+	 * Returns the meta object for the reference '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeEvent <em>Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the reference '<em>Time Event</em>'.
+	 * @see org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeEvent()
+	 * @see #getScheduleTimeEvent()
+	 * @generated
+	 */
+	EReference getScheduleTimeEvent_TimeEvent();
+
+	/**
+	 * Returns the meta object for the containment reference '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeValue <em>Time Value</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Time Value</em>'.
+	 * @see org.yakindu.sct.model.sexec.ScheduleTimeEvent#getTimeValue()
+	 * @see #getScheduleTimeEvent()
+	 * @generated
+	 */
+	EReference getScheduleTimeEvent_TimeValue();
+
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent <em>Unschedule Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Unschedule Time Event</em>'.
+	 * @see org.yakindu.sct.model.sexec.UnscheduleTimeEvent
+	 * @generated
+	 */
+	EClass getUnscheduleTimeEvent();
+
+	/**
+	 * Returns the meta object for the reference '{@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent#getTimeEvent <em>Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the reference '<em>Time Event</em>'.
+	 * @see org.yakindu.sct.model.sexec.UnscheduleTimeEvent#getTimeEvent()
+	 * @see #getUnscheduleTimeEvent()
+	 * @generated
+	 */
+	EReference getUnscheduleTimeEvent_TimeEvent();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.CheckRef <em>Check Ref</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1241,6 +1432,27 @@ public interface SexecPackage extends EPackage {
 	 */
 	EAttribute getStateVector_Offset();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sexec.TimeEvent <em>Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Time Event</em>'.
+	 * @see org.yakindu.sct.model.sexec.TimeEvent
+	 * @generated
+	 */
+	EClass getTimeEvent();
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sexec.TimeEvent#isPeriodic <em>Periodic</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Periodic</em>'.
+	 * @see org.yakindu.sct.model.sexec.TimeEvent#isPeriodic()
+	 * @see #getTimeEvent()
+	 * @generated
+	 */
+	EAttribute getTimeEvent_Periodic();
+
 	/**
 	 * Returns the factory that creates the instances of the model.
 	 * <!-- begin-user-doc -->
@@ -1577,6 +1789,50 @@ public interface SexecPackage extends EPackage {
 		 */
 		EReference CALL__STEP = eINSTANCE.getCall_Step();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sexec.impl.ScheduleTimeEventImpl <em>Schedule Time Event</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sexec.impl.ScheduleTimeEventImpl
+		 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getScheduleTimeEvent()
+		 * @generated
+		 */
+		EClass SCHEDULE_TIME_EVENT = eINSTANCE.getScheduleTimeEvent();
+
+		/**
+		 * The meta object literal for the '<em><b>Time Event</b></em>' reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference SCHEDULE_TIME_EVENT__TIME_EVENT = eINSTANCE.getScheduleTimeEvent_TimeEvent();
+
+		/**
+		 * The meta object literal for the '<em><b>Time Value</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference SCHEDULE_TIME_EVENT__TIME_VALUE = eINSTANCE.getScheduleTimeEvent_TimeValue();
+
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sexec.impl.UnscheduleTimeEventImpl <em>Unschedule Time Event</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sexec.impl.UnscheduleTimeEventImpl
+		 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getUnscheduleTimeEvent()
+		 * @generated
+		 */
+		EClass UNSCHEDULE_TIME_EVENT = eINSTANCE.getUnscheduleTimeEvent();
+
+		/**
+		 * The meta object literal for the '<em><b>Time Event</b></em>' reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference UNSCHEDULE_TIME_EVENT__TIME_EVENT = eINSTANCE.getUnscheduleTimeEvent_TimeEvent();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sexec.impl.CheckRefImpl <em>Check Ref</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -1621,6 +1877,24 @@ public interface SexecPackage extends EPackage {
 		 */
 		EAttribute STATE_VECTOR__OFFSET = eINSTANCE.getStateVector_Offset();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sexec.impl.TimeEventImpl <em>Time Event</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sexec.impl.TimeEventImpl
+		 * @see org.yakindu.sct.model.sexec.impl.SexecPackageImpl#getTimeEvent()
+		 * @generated
+		 */
+		EClass TIME_EVENT = eINSTANCE.getTimeEvent();
+
+		/**
+		 * The meta object literal for the '<em><b>Periodic</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute TIME_EVENT__PERIODIC = eINSTANCE.getTimeEvent_Periodic();
+
 	}
 
 } //SexecPackage

+ 55 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/TimeEvent.java

@@ -0,0 +1,55 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec;
+
+import org.yakindu.sct.model.sgraph.Event;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Time Event</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.TimeEvent#isPeriodic <em>Periodic</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.sct.model.sexec.SexecPackage#getTimeEvent()
+ * @model
+ * @generated
+ */
+public interface TimeEvent extends Event {
+	/**
+	 * Returns the value of the '<em><b>Periodic</b></em>' attribute.
+	 * The default value is <code>"false"</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Periodic</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Periodic</em>' attribute.
+	 * @see #setPeriodic(boolean)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getTimeEvent_Periodic()
+	 * @model default="false"
+	 * @generated
+	 */
+	boolean isPeriodic();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.TimeEvent#isPeriodic <em>Periodic</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Periodic</em>' attribute.
+	 * @see #isPeriodic()
+	 * @generated
+	 */
+	void setPeriodic(boolean value);
+
+} // TimeEvent

+ 53 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/UnscheduleTimeEvent.java

@@ -0,0 +1,53 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Unschedule Time Event</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent#getTimeEvent <em>Time Event</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.sct.model.sexec.SexecPackage#getUnscheduleTimeEvent()
+ * @model
+ * @generated
+ */
+public interface UnscheduleTimeEvent extends Step {
+	/**
+	 * Returns the value of the '<em><b>Time Event</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Time Event</em>' reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Time Event</em>' reference.
+	 * @see #setTimeEvent(TimeEvent)
+	 * @see org.yakindu.sct.model.sexec.SexecPackage#getUnscheduleTimeEvent_TimeEvent()
+	 * @model
+	 * @generated
+	 */
+	TimeEvent getTimeEvent();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent#getTimeEvent <em>Time Event</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Time Event</em>' reference.
+	 * @see #getTimeEvent()
+	 * @generated
+	 */
+	void setTimeEvent(TimeEvent value);
+
+} // UnscheduleTimeEvent

+ 241 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/ScheduleTimeEventImpl.java

@@ -0,0 +1,241 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.TimeEvent;
+
+import org.yakindu.sct.model.sgraph.Statement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Schedule Time Event</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.ScheduleTimeEventImpl#getTimeEvent <em>Time Event</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.ScheduleTimeEventImpl#getTimeValue <em>Time Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ScheduleTimeEventImpl extends StepImpl implements ScheduleTimeEvent {
+	/**
+	 * The cached value of the '{@link #getTimeEvent() <em>Time Event</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTimeEvent()
+	 * @generated
+	 * @ordered
+	 */
+	protected TimeEvent timeEvent;
+
+	/**
+	 * The cached value of the '{@link #getTimeValue() <em>Time Value</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTimeValue()
+	 * @generated
+	 * @ordered
+	 */
+	protected Statement timeValue;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected ScheduleTimeEventImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SexecPackage.Literals.SCHEDULE_TIME_EVENT;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TimeEvent getTimeEvent() {
+		if (timeEvent != null && timeEvent.eIsProxy()) {
+			InternalEObject oldTimeEvent = (InternalEObject)timeEvent;
+			timeEvent = (TimeEvent)eResolveProxy(oldTimeEvent);
+			if (timeEvent != oldTimeEvent) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, SexecPackage.SCHEDULE_TIME_EVENT__TIME_EVENT, oldTimeEvent, timeEvent));
+			}
+		}
+		return timeEvent;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TimeEvent basicGetTimeEvent() {
+		return timeEvent;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setTimeEvent(TimeEvent newTimeEvent) {
+		TimeEvent oldTimeEvent = timeEvent;
+		timeEvent = newTimeEvent;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.SCHEDULE_TIME_EVENT__TIME_EVENT, oldTimeEvent, timeEvent));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Statement getTimeValue() {
+		return timeValue;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetTimeValue(Statement newTimeValue, NotificationChain msgs) {
+		Statement oldTimeValue = timeValue;
+		timeValue = newTimeValue;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE, oldTimeValue, newTimeValue);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setTimeValue(Statement newTimeValue) {
+		if (newTimeValue != timeValue) {
+			NotificationChain msgs = null;
+			if (timeValue != null)
+				msgs = ((InternalEObject)timeValue).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE, null, msgs);
+			if (newTimeValue != null)
+				msgs = ((InternalEObject)newTimeValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE, null, msgs);
+			msgs = basicSetTimeValue(newTimeValue, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE, newTimeValue, newTimeValue));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE:
+				return basicSetTimeValue(null, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_EVENT:
+				if (resolve) return getTimeEvent();
+				return basicGetTimeEvent();
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE:
+				return getTimeValue();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_EVENT:
+				setTimeEvent((TimeEvent)newValue);
+				return;
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE:
+				setTimeValue((Statement)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_EVENT:
+				setTimeEvent((TimeEvent)null);
+				return;
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE:
+				setTimeValue((Statement)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_EVENT:
+				return timeEvent != null;
+			case SexecPackage.SCHEDULE_TIME_EVENT__TIME_VALUE:
+				return timeValue != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //ScheduleTimeEventImpl

+ 36 - 3
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecFactoryImpl.java

@@ -61,19 +61,22 @@ public class SexecFactoryImpl extends EFactoryImpl implements SexecFactory {
 	public EObject create(EClass eClass) {
 		switch (eClass.getClassifierID()) {
 			case SexecPackage.EXECUTION_FLOW: return createExecutionFlow();
+			case SexecPackage.NAMED_ELEMENT: return createNamedElement();
+			case SexecPackage.STATE_VECTOR: return createStateVector();
+			case SexecPackage.TIME_EVENT: return createTimeEvent();
 			case SexecPackage.EXECUTION_STATE: return createExecutionState();
 			case SexecPackage.REACTION: return createReaction();
-			case SexecPackage.STATE_VECTOR: return createStateVector();
-			case SexecPackage.NAMED_ELEMENT: return createNamedElement();
 			case SexecPackage.SEQUENCE: return createSequence();
 			case SexecPackage.CYCLE: return createCycle();
 			case SexecPackage.CHECK: return createCheck();
+			case SexecPackage.CHECK_REF: return createCheckRef();
 			case SexecPackage.IF: return createIf();
 			case SexecPackage.EXECUTION: return createExecution();
 			case SexecPackage.ENTER_STATE: return createEnterState();
 			case SexecPackage.EXIT_STATE: return createExitState();
 			case SexecPackage.CALL: return createCall();
-			case SexecPackage.CHECK_REF: return createCheckRef();
+			case SexecPackage.SCHEDULE_TIME_EVENT: return createScheduleTimeEvent();
+			case SexecPackage.UNSCHEDULE_TIME_EVENT: return createUnscheduleTimeEvent();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -199,6 +202,26 @@ public class SexecFactoryImpl extends EFactoryImpl implements SexecFactory {
 		return call;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public ScheduleTimeEvent createScheduleTimeEvent() {
+		ScheduleTimeEventImpl scheduleTimeEvent = new ScheduleTimeEventImpl();
+		return scheduleTimeEvent;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public UnscheduleTimeEvent createUnscheduleTimeEvent() {
+		UnscheduleTimeEventImpl unscheduleTimeEvent = new UnscheduleTimeEventImpl();
+		return unscheduleTimeEvent;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -219,6 +242,16 @@ public class SexecFactoryImpl extends EFactoryImpl implements SexecFactory {
 		return stateVector;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TimeEvent createTimeEvent() {
+		TimeEventImpl timeEvent = new TimeEventImpl();
+		return timeEvent;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 129 - 19
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/SexecPackageImpl.java

@@ -23,11 +23,14 @@ import org.yakindu.sct.model.sexec.ExitState;
 import org.yakindu.sct.model.sexec.If;
 import org.yakindu.sct.model.sexec.NamedElement;
 import org.yakindu.sct.model.sexec.Reaction;
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
 import org.yakindu.sct.model.sexec.Sequence;
 import org.yakindu.sct.model.sexec.SexecFactory;
 import org.yakindu.sct.model.sexec.SexecPackage;
 import org.yakindu.sct.model.sexec.StateVector;
 import org.yakindu.sct.model.sexec.Step;
+import org.yakindu.sct.model.sexec.TimeEvent;
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 
 /**
@@ -128,6 +131,20 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 	 */
 	private EClass callEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass scheduleTimeEventEClass = null;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass unscheduleTimeEventEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -142,6 +159,13 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 	 */
 	private EClass stateVectorEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass timeEventEClass = null;
+
 	/**
 	 * Creates an instance of the model <b>Package</b>, registered with
 	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
@@ -530,6 +554,51 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		return (EReference)callEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getScheduleTimeEvent() {
+		return scheduleTimeEventEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getScheduleTimeEvent_TimeEvent() {
+		return (EReference)scheduleTimeEventEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getScheduleTimeEvent_TimeValue() {
+		return (EReference)scheduleTimeEventEClass.getEStructuralFeatures().get(1);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getUnscheduleTimeEvent() {
+		return unscheduleTimeEventEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getUnscheduleTimeEvent_TimeEvent() {
+		return (EReference)unscheduleTimeEventEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -575,6 +644,24 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		return (EAttribute)stateVectorEClass.getEStructuralFeatures().get(1);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getTimeEvent() {
+		return timeEventEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getTimeEvent_Periodic() {
+		return (EAttribute)timeEventEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -609,6 +696,16 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		createEReference(executionFlowEClass, EXECUTION_FLOW__ENTER_SEQUENCE);
 		createEReference(executionFlowEClass, EXECUTION_FLOW__STATE_VECTOR);
 
+		namedElementEClass = createEClass(NAMED_ELEMENT);
+		createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);
+
+		stateVectorEClass = createEClass(STATE_VECTOR);
+		createEAttribute(stateVectorEClass, STATE_VECTOR__SIZE);
+		createEAttribute(stateVectorEClass, STATE_VECTOR__OFFSET);
+
+		timeEventEClass = createEClass(TIME_EVENT);
+		createEAttribute(timeEventEClass, TIME_EVENT__PERIODIC);
+
 		executionStateEClass = createEClass(EXECUTION_STATE);
 		createEAttribute(executionStateEClass, EXECUTION_STATE__SIMPLE_NAME);
 		createEAttribute(executionStateEClass, EXECUTION_STATE__LEAF);
@@ -621,13 +718,6 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		createEReference(reactionEClass, REACTION__CHECK);
 		createEReference(reactionEClass, REACTION__EFFECT);
 
-		stateVectorEClass = createEClass(STATE_VECTOR);
-		createEAttribute(stateVectorEClass, STATE_VECTOR__SIZE);
-		createEAttribute(stateVectorEClass, STATE_VECTOR__OFFSET);
-
-		namedElementEClass = createEClass(NAMED_ELEMENT);
-		createEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);
-
 		stepEClass = createEClass(STEP);
 		createEAttribute(stepEClass, STEP__COMMENT);
 
@@ -639,6 +729,9 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		checkEClass = createEClass(CHECK);
 		createEReference(checkEClass, CHECK__CONDITION);
 
+		checkRefEClass = createEClass(CHECK_REF);
+		createEReference(checkRefEClass, CHECK_REF__CHECK);
+
 		ifEClass = createEClass(IF);
 		createEReference(ifEClass, IF__CHECK);
 		createEReference(ifEClass, IF__THEN_STEP);
@@ -656,8 +749,12 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		callEClass = createEClass(CALL);
 		createEReference(callEClass, CALL__STEP);
 
-		checkRefEClass = createEClass(CHECK_REF);
-		createEReference(checkRefEClass, CHECK_REF__CHECK);
+		scheduleTimeEventEClass = createEClass(SCHEDULE_TIME_EVENT);
+		createEReference(scheduleTimeEventEClass, SCHEDULE_TIME_EVENT__TIME_EVENT);
+		createEReference(scheduleTimeEventEClass, SCHEDULE_TIME_EVENT__TIME_VALUE);
+
+		unscheduleTimeEventEClass = createEClass(UNSCHEDULE_TIME_EVENT);
+		createEReference(unscheduleTimeEventEClass, UNSCHEDULE_TIME_EVENT__TIME_EVENT);
 	}
 
 	/**
@@ -693,18 +790,21 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		// Add supertypes to classes
 		executionFlowEClass.getESuperTypes().add(theSGraphPackage.getScopedElement());
 		executionFlowEClass.getESuperTypes().add(this.getNamedElement());
+		timeEventEClass.getESuperTypes().add(theSGraphPackage.getEvent());
 		executionStateEClass.getESuperTypes().add(this.getNamedElement());
 		reactionEClass.getESuperTypes().add(this.getNamedElement());
 		stepEClass.getESuperTypes().add(this.getNamedElement());
 		sequenceEClass.getESuperTypes().add(this.getStep());
 		cycleEClass.getESuperTypes().add(this.getSequence());
 		checkEClass.getESuperTypes().add(this.getStep());
+		checkRefEClass.getESuperTypes().add(this.getCheck());
 		ifEClass.getESuperTypes().add(this.getStep());
 		executionEClass.getESuperTypes().add(this.getStep());
 		enterStateEClass.getESuperTypes().add(this.getStep());
 		exitStateEClass.getESuperTypes().add(this.getStep());
 		callEClass.getESuperTypes().add(this.getStep());
-		checkRefEClass.getESuperTypes().add(this.getCheck());
+		scheduleTimeEventEClass.getESuperTypes().add(this.getStep());
+		unscheduleTimeEventEClass.getESuperTypes().add(this.getStep());
 
 		// Initialize classes and features; add operations and parameters
 		initEClass(executionFlowEClass, ExecutionFlow.class, "ExecutionFlow", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -713,6 +813,16 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		initEReference(getExecutionFlow_EnterSequence(), this.getSequence(), null, "enterSequence", null, 0, 1, ExecutionFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getExecutionFlow_StateVector(), this.getStateVector(), null, "stateVector", null, 0, 1, ExecutionFlow.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(namedElementEClass, NamedElement.class, "NamedElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(stateVectorEClass, StateVector.class, "StateVector", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getStateVector_Size(), ecorePackage.getEInt(), "size", "1", 0, 1, StateVector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getStateVector_Offset(), ecorePackage.getEInt(), "offset", "0", 0, 1, StateVector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(timeEventEClass, TimeEvent.class, "TimeEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getTimeEvent_Periodic(), ecorePackage.getEBoolean(), "periodic", "false", 0, 1, TimeEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		initEClass(executionStateEClass, ExecutionState.class, "ExecutionState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getExecutionState_SimpleName(), ecorePackage.getEString(), "simpleName", null, 0, 1, ExecutionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getExecutionState_Leaf(), ecorePackage.getEBoolean(), "leaf", "false", 0, 1, ExecutionState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -725,13 +835,6 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		initEReference(getReaction_Check(), this.getCheck(), null, "check", null, 0, 1, Reaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getReaction_Effect(), this.getStep(), null, "effect", null, 0, 1, Reaction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
-		initEClass(stateVectorEClass, StateVector.class, "StateVector", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEAttribute(getStateVector_Size(), ecorePackage.getEInt(), "size", "1", 0, 1, StateVector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getStateVector_Offset(), ecorePackage.getEInt(), "offset", "0", 0, 1, StateVector.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
-		initEClass(namedElementEClass, NamedElement.class, "NamedElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
 		initEClass(stepEClass, Step.class, "Step", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getStep_Comment(), ecorePackage.getEString(), "comment", null, 0, 1, Step.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
@@ -743,6 +846,9 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		initEClass(checkEClass, Check.class, "Check", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getCheck_Condition(), theSGraphPackage.getStatement(), null, "condition", null, 0, 1, Check.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(checkRefEClass, CheckRef.class, "CheckRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getCheckRef_Check(), this.getCheck(), null, "check", null, 0, 1, CheckRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		initEClass(ifEClass, If.class, "If", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getIf_Check(), this.getCheck(), null, "check", null, 0, 1, If.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getIf_ThenStep(), this.getStep(), null, "thenStep", null, 0, 1, If.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -760,8 +866,12 @@ public class SexecPackageImpl extends EPackageImpl implements SexecPackage {
 		initEClass(callEClass, Call.class, "Call", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getCall_Step(), this.getStep(), null, "step", null, 0, 1, Call.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
-		initEClass(checkRefEClass, CheckRef.class, "CheckRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getCheckRef_Check(), this.getCheck(), null, "check", null, 0, 1, CheckRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEClass(scheduleTimeEventEClass, ScheduleTimeEvent.class, "ScheduleTimeEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getScheduleTimeEvent_TimeEvent(), this.getTimeEvent(), null, "timeEvent", null, 0, 1, ScheduleTimeEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getScheduleTimeEvent_TimeValue(), theSGraphPackage.getStatement(), null, "timeValue", null, 0, 1, ScheduleTimeEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		initEClass(unscheduleTimeEventEClass, UnscheduleTimeEvent.class, "UnscheduleTimeEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getUnscheduleTimeEvent_TimeEvent(), this.getTimeEvent(), null, "timeEvent", null, 0, 1, UnscheduleTimeEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		// Create resource
 		createResource(eNS_URI);

+ 168 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/TimeEventImpl.java

@@ -0,0 +1,168 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.TimeEvent;
+
+import org.yakindu.sct.model.sgraph.impl.EventImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Time Event</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.TimeEventImpl#isPeriodic <em>Periodic</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TimeEventImpl extends EventImpl implements TimeEvent {
+	/**
+	 * The default value of the '{@link #isPeriodic() <em>Periodic</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isPeriodic()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final boolean PERIODIC_EDEFAULT = false;
+
+	/**
+	 * The cached value of the '{@link #isPeriodic() <em>Periodic</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #isPeriodic()
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean periodic = PERIODIC_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected TimeEventImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SexecPackage.Literals.TIME_EVENT;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isPeriodic() {
+		return periodic;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setPeriodic(boolean newPeriodic) {
+		boolean oldPeriodic = periodic;
+		periodic = newPeriodic;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.TIME_EVENT__PERIODIC, oldPeriodic, periodic));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case SexecPackage.TIME_EVENT__PERIODIC:
+				return isPeriodic();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case SexecPackage.TIME_EVENT__PERIODIC:
+				setPeriodic((Boolean)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SexecPackage.TIME_EVENT__PERIODIC:
+				setPeriodic(PERIODIC_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SexecPackage.TIME_EVENT__PERIODIC:
+				return periodic != PERIODIC_EDEFAULT;
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (periodic: ");
+		result.append(periodic);
+		result.append(')');
+		return result.toString();
+	}
+
+} //TimeEventImpl

+ 160 - 0
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/impl/UnscheduleTimeEventImpl.java

@@ -0,0 +1,160 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.yakindu.sct.model.sexec.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.yakindu.sct.model.sexec.SexecPackage;
+import org.yakindu.sct.model.sexec.TimeEvent;
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Unschedule Time Event</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sexec.impl.UnscheduleTimeEventImpl#getTimeEvent <em>Time Event</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class UnscheduleTimeEventImpl extends StepImpl implements UnscheduleTimeEvent {
+	/**
+	 * The cached value of the '{@link #getTimeEvent() <em>Time Event</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTimeEvent()
+	 * @generated
+	 * @ordered
+	 */
+	protected TimeEvent timeEvent;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected UnscheduleTimeEventImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SexecPackage.Literals.UNSCHEDULE_TIME_EVENT;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TimeEvent getTimeEvent() {
+		if (timeEvent != null && timeEvent.eIsProxy()) {
+			InternalEObject oldTimeEvent = (InternalEObject)timeEvent;
+			timeEvent = (TimeEvent)eResolveProxy(oldTimeEvent);
+			if (timeEvent != oldTimeEvent) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, SexecPackage.UNSCHEDULE_TIME_EVENT__TIME_EVENT, oldTimeEvent, timeEvent));
+			}
+		}
+		return timeEvent;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TimeEvent basicGetTimeEvent() {
+		return timeEvent;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setTimeEvent(TimeEvent newTimeEvent) {
+		TimeEvent oldTimeEvent = timeEvent;
+		timeEvent = newTimeEvent;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SexecPackage.UNSCHEDULE_TIME_EVENT__TIME_EVENT, oldTimeEvent, timeEvent));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case SexecPackage.UNSCHEDULE_TIME_EVENT__TIME_EVENT:
+				if (resolve) return getTimeEvent();
+				return basicGetTimeEvent();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case SexecPackage.UNSCHEDULE_TIME_EVENT__TIME_EVENT:
+				setTimeEvent((TimeEvent)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SexecPackage.UNSCHEDULE_TIME_EVENT__TIME_EVENT:
+				setTimeEvent((TimeEvent)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SexecPackage.UNSCHEDULE_TIME_EVENT__TIME_EVENT:
+				return timeEvent != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //UnscheduleTimeEventImpl

+ 18 - 1
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/FactoryExtension.xtend

@@ -30,6 +30,10 @@ import org.yakindu.sct.model.sgraph.Transition
 import org.yakindu.sct.model.sexec.CheckRef
 import org.yakindu.sct.model.sexec.Call
 import org.yakindu.sct.model.sexec.Step
+import org.yakindu.sct.model.sexec.TimeEvent
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent
+import org.yakindu.sct.model.sgraph.Statement
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent
 
 class FactoryExtension {
 	
@@ -71,13 +75,26 @@ class FactoryExtension {
 		val r = sexecFactory.createCheckRef
 		r.check = check
 		r
-	}
+	} 
 
 	def Call newCall(Step step) {
 		val r = sexecFactory.createCall
 		r.step = step
 		r
 	}
+	
+	def ScheduleTimeEvent newScheduleTimeEvent(TimeEvent te, Statement timeValue) {
+		val r = sexecFactory.createScheduleTimeEvent
+		r.timeEvent = te
+		r.timeValue = timeValue
+		r
+	}
+
+	def UnscheduleTimeEvent newUnscheduleTimeEvent(TimeEvent te) {
+		val r = sexecFactory.createUnscheduleTimeEvent
+		r.timeEvent = te
+		r
+	}
 
 	//--------- UTILS ---------------
 	def sexecFactory() { SexecFactory::eINSTANCE }

+ 132 - 27
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/ModelSequencer.xtend

@@ -52,6 +52,13 @@ import org.yakindu.sct.model.stext.stext.ExitEvent
 import org.eclipse.xtext.common.services.Ecore2XtextTerminalConverters
 import org.eclipse.emf.ecore.util.EcoreUtil$AbstractFilteredSettingsIterator
 import java.util.ArrayList
+import org.yakindu.sct.model.stext.stext.TimeEventSpec
+import org.yakindu.sct.model.sexec.TimeEvent
+import org.yakindu.sct.model.stext.stext.TimeEventType
+import org.yakindu.sct.model.stext.stext.PrimitiveValueExpression
+import org.yakindu.sct.model.stext.stext.TimeUnit
+import org.yakindu.sct.model.stext.stext.MultiplicativeOperator
+import org.yakindu.sct.model.stext.stext.NumericalMultiplyDivideExpression
 
 class ModelSequencer {
 	
@@ -70,6 +77,7 @@ class ModelSequencer {
 		// during mapping the basic structural elements will be mapped from the source statechart to the execution flow
 		sc.mapScopes(ef)
 		sc.mapStates(ef)
+		sc.mapTimeEvents(ef)
 		sc.mapTransitions(ef)
 		
 		// derive all additional information that is necessary for the execution
@@ -144,6 +152,40 @@ class ModelSequencer {
 	}
 	 
 
+	/** Time trigger will be mapped to execution model time events for each real state. */
+	def ExecutionFlow mapTimeEvents(Statechart statechart, ExecutionFlow r) {
+		var content = EcoreUtil2::eAllContentsAsList(statechart)
+		val allStates = content.filter(typeof(State))
+		allStates.forEach( s | s.mapTimeEventSpecs)
+		return r
+	}
+	
+	
+	def mapTimeEventSpecs(State state) {
+		
+		val timeEventSpecs = state.timeEventSpecs
+		
+		val result = new ArrayList<TimeEvent>();
+		for (tes : timeEventSpecs ) {
+			val timeEvent = tes.createDerivedEvent
+			timeEvent.name = state.name + "_time_event_" + timeEventSpecs.indexOf(tes);
+			state.statechart.create.timeEventScope.declarations.add(timeEvent);
+			result.add(timeEvent);
+			
+		}	
+		
+//		var result = timeEventSpecs.map( tes | { 
+//			val timeEvent = tes.createDerivedEvent
+//			timeEvent.name = state.name + "_time_event_" + timeEventSpecs.indexOf(tes);
+//			state.statechart.create.timeEventScope.declarations.add(timeEvent);
+//			timeEvent
+//		})
+				
+		result
+	}
+	
+
+
 	def ExecutionFlow mapTransitions(Statechart statechart, ExecutionFlow r){
 		var content = EcoreUtil2::eAllContentsAsList(statechart)
 		val allStates = content.filter(e | e instanceof State)
@@ -201,9 +243,20 @@ class ModelSequencer {
 	}
 	
 	
+	/** 
+	 * The entry action sequence of a state consist all action that are specified with the 'entry' pseudo trigger within local reactions
+	 * and all scheduling actions for time triggers.
+	 */
 	def Step mapEntryAction(State state) {
 		val seq = sexecFactory.createSequence
 		seq.name = "entryAction"
+		
+		for (tes : state.timeEventSpecs ) {
+			val timeEvent = tes.createDerivedEvent
+			val scheduleStep = timeEvent.newScheduleTimeEvent(tes.buildValueExpression)
+			seq.steps.add(scheduleStep)
+		}	
+		
 		state.entryReactions
 			.map([lr | if (lr.effect != null) { (lr.effect as ReactionEffect).mapEffect } else null])
 			.forEach(e | if (e != null) { seq.steps.add(e) })
@@ -211,9 +264,58 @@ class ModelSequencer {
 		if (seq.steps.size > 0) seq else null
 	}
 	
+	
+	def Statement buildValueExpression(TimeEventSpec tes) {
+		val PrimitiveValueExpression pve = stextFactory.createPrimitiveValueExpression 
+		pve.value = tes.value.toString
+	
+		switch (tes.unit) {
+			case TimeUnit::MILLISECOND : pve
+			case TimeUnit::NANOSECOND  : pve.divide(1000)
+			case TimeUnit::SECOND      : pve.multiply(1000)
+			default : pve
+		} 
+	}
+	
+	
+	def Statement divide(Expression stmnt, long divisor) {
+		val NumericalMultiplyDivideExpression div = stextFactory.createNumericalMultiplyDivideExpression
+		val PrimitiveValueExpression pve = stextFactory.createPrimitiveValueExpression 
+		pve.value = divisor.toString
+		
+		div.operator = MultiplicativeOperator::DIV
+		div.leftOperand = stmnt
+		div.rightOperand = pve
+		
+		div
+	}
+	
+	def Statement multiply(Expression stmnt, long factor) {
+		val NumericalMultiplyDivideExpression div = stextFactory.createNumericalMultiplyDivideExpression
+		val PrimitiveValueExpression pve = stextFactory.createPrimitiveValueExpression 
+		pve.value = factor.toString
+		
+		div.operator = MultiplicativeOperator::MUL
+		div.leftOperand = stmnt
+		div.rightOperand = pve
+		
+		div
+	}
+
+	/** 
+	 * The exit action sequence of a state consist all action that are specified with the 'exit' pseudo trigger within local reactions
+	 * and all unscheduling actions for time triggers.
+	 */
 	def Step mapExitAction(State state) {
 		val seq = sexecFactory.createSequence
 		seq.name = "exitAction"
+		
+		for (tes : state.timeEventSpecs ) {
+			val timeEvent = tes.createDerivedEvent
+			val unscheduleStep = timeEvent.newUnscheduleTimeEvent()
+			seq.steps.add(unscheduleStep)
+		}	
+		
 		state.exitReactions
 			.map([lr | if (lr.effect != null) { (lr.effect as ReactionEffect).mapEffect } else null])
 			.forEach(e | if (e != null) { seq.steps.add(e) })
@@ -248,30 +350,7 @@ class ModelSequencer {
 		return cycle
 	}
 	
-//	def Cycle create r : sexecFactory.createCycle buildCycle(State state) {	
-//		val folded = state.outgoingTransitions.reverseView.fold(null as If, [s, t | {
-//				var ifStep = t.buildTransitionSequence
-//				// TODO then ...
-//				ifStep.elseStep = s
-//				ifStep
-//			}])
-//			
-//		if (folded != null) r.steps.add(folded)
-//	}
-	
-	
-//	def If buildTransitionSequence(Transition t) {
-//		var ifStep = sexecFactory.createIf
-//		if (t.trigger != null) ifStep.check = t.trigger.mapToCheck 
-//		val thenSequence = sexecFactory.createSequence 
-//		ifStep.thenStep = thenSequence
-//		if (t.source != null) thenSequence.steps.add(newExitStateStep(t.source as State))		
-//		if (t.target != null) thenSequence.steps.add(newEnterStateStep(t.target as State))
-//		
-//		return ifStep	
-//	}
 	
-
 	def dispatch Check mapToCheck(Trigger tr) { null }
 	  
 	def dispatch Check mapToCheck(ReactionTrigger tr) {
@@ -280,10 +359,8 @@ class ModelSequencer {
 		return check
 	}
 	
-	def dispatch Statement buildCondition (Trigger t) {
-		null
-	}
 	
+	def dispatch Statement buildCondition (Trigger t) { null }
 	
 	def dispatch Statement buildCondition (ReactionTrigger t) {
 		if (! t.triggers.empty) t.triggers.reverseView.fold(null as Expression,
@@ -309,13 +386,36 @@ class ModelSequencer {
 	def dispatch Expression raised(EventSpec e) {
 	}
 
-
 	def dispatch Expression raised(RegularEventSpec e) {
 		val r = stextFactory.createElementReferenceExpression
 		r.value = (e.event as EventDefinition).create
 		return r
 	}
 	
+	def dispatch Expression raised(TimeEventSpec e) {
+		val r = stextFactory.createElementReferenceExpression
+		r.value = e.createDerivedEvent
+		return r
+	}
+
+	
+	
+	/* ==========================================================================
+	 * HANDLING TIME EVENTS
+	 */
+	 
+	
+	
+	def TimeEvent create r : sexecFactory.createTimeEvent createDerivedEvent(TimeEventSpec tes) {
+		r.periodic = tes.type == TimeEventType::EVERY
+	}
+		
+	//def flow(ExecutionState state) { state.eContainer as ExecutionFlow }
+	
+	def Scope create r : sgraphFactory.createScope timeEventScope(ExecutionFlow flow) {
+		flow.scopes.add(r);
+	}
+	
 	
 	/************** Calculating Structure information **************/
 
@@ -393,9 +493,14 @@ class ModelSequencer {
 		ed.create	
 	}
 	
+	def dispatch replaced(TimeEvent ed) {
+		ed	
+	}
+	
 	
 	//--------- UTILS ---------------
 	def sexecFactory() { SexecFactory::eINSTANCE }
+	def sgraphFactory() { SGraphFactory::eINSTANCE }
 	def stextFactory() { StextFactory::eINSTANCE }
 	
 	

+ 27 - 1
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.xtend

@@ -7,6 +7,10 @@ import org.yakindu.sct.model.sgraph.State
 import org.yakindu.sct.model.sgraph.Trigger
 import org.yakindu.sct.model.sgraph.Reaction
 import org.yakindu.sct.model.sgraph.Transition
+import java.util.List
+import java.util.ArrayList
+import org.yakindu.sct.model.stext.stext.TimeEventSpec
+import org.eclipse.xtext.EcoreUtil2
 
 class StatechartExtensions {
 	
@@ -35,12 +39,34 @@ class StatechartExtensions {
 
 
 	//=================================================================
-	// navigation util extensions
+	// navigation and query util extensions
 	//
 		
 	def reaction(Trigger tr) { tr.eContainer as Reaction }
 
 
+	def Statechart statechart(State state) { state.parentRegion.statechart }
+	
+	def Statechart statechart(Region region) { 
+		if (region.eContainer instanceof Statechart) 
+			region.eContainer as Statechart
+			else (region.eContainer as State).statechart		
+	}
+	
+	
+	/** 
+	 * Provides a list of all TimeEventSpecs that are defined in the context of 'state'.
+	 */
+	def List<TimeEventSpec> timeEventSpecs(State state) { 
+		// TODO: also query local reactions
+		state.outgoingTransitions.fold(new ArrayList<TimeEventSpec>(), 
+			[s, r | {
+				EcoreUtil2::eAllContentsAsList(r).filter(typeof (TimeEventSpec)).forEach(tes | s.add(tes))
+				s
+			}]
+		)
+	}
+
 	//=================================================================
 	// naming util extensions
 	//

+ 120 - 10
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecAdapterFactory.java

@@ -14,6 +14,8 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
 import org.eclipse.emf.ecore.EObject;
 
 import org.yakindu.sct.model.sexec.*;
+import org.yakindu.sct.model.sgraph.Declaration;
+import org.yakindu.sct.model.sgraph.Event;
 import org.yakindu.sct.model.sgraph.ScopedElement;
 
 /**
@@ -77,20 +79,24 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 				return createExecutionFlowAdapter();
 			}
 			@Override
-			public Adapter caseExecutionState(ExecutionState object) {
-				return createExecutionStateAdapter();
-			}
-			@Override
-			public Adapter caseReaction(Reaction object) {
-				return createReactionAdapter();
+			public Adapter caseNamedElement(NamedElement object) {
+				return createNamedElementAdapter();
 			}
 			@Override
 			public Adapter caseStateVector(StateVector object) {
 				return createStateVectorAdapter();
 			}
 			@Override
-			public Adapter caseNamedElement(NamedElement object) {
-				return createNamedElementAdapter();
+			public Adapter caseTimeEvent(TimeEvent object) {
+				return createTimeEventAdapter();
+			}
+			@Override
+			public Adapter caseExecutionState(ExecutionState object) {
+				return createExecutionStateAdapter();
+			}
+			@Override
+			public Adapter caseReaction(Reaction object) {
+				return createReactionAdapter();
 			}
 			@Override
 			public Adapter caseStep(Step object) {
@@ -109,6 +115,10 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 				return createCheckAdapter();
 			}
 			@Override
+			public Adapter caseCheckRef(CheckRef object) {
+				return createCheckRefAdapter();
+			}
+			@Override
 			public Adapter caseIf(If object) {
 				return createIfAdapter();
 			}
@@ -129,14 +139,30 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 				return createCallAdapter();
 			}
 			@Override
-			public Adapter caseCheckRef(CheckRef object) {
-				return createCheckRefAdapter();
+			public Adapter caseScheduleTimeEvent(ScheduleTimeEvent object) {
+				return createScheduleTimeEventAdapter();
+			}
+			@Override
+			public Adapter caseUnscheduleTimeEvent(UnscheduleTimeEvent object) {
+				return createUnscheduleTimeEventAdapter();
 			}
 			@Override
 			public Adapter caseScopedElement(ScopedElement object) {
 				return createScopedElementAdapter();
 			}
 			@Override
+			public Adapter caseSGraph_NamedElement(org.yakindu.sct.model.sgraph.NamedElement object) {
+				return createSGraph_NamedElementAdapter();
+			}
+			@Override
+			public Adapter caseDeclaration(Declaration object) {
+				return createDeclarationAdapter();
+			}
+			@Override
+			public Adapter caseEvent(Event object) {
+				return createEventAdapter();
+			}
+			@Override
 			public Adapter defaultCase(EObject object) {
 				return createEObjectAdapter();
 			}
@@ -338,6 +364,34 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sexec.ScheduleTimeEvent <em>Schedule Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sexec.ScheduleTimeEvent
+	 * @generated
+	 */
+	public Adapter createScheduleTimeEventAdapter() {
+		return null;
+	}
+
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sexec.UnscheduleTimeEvent <em>Unschedule Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sexec.UnscheduleTimeEvent
+	 * @generated
+	 */
+	public Adapter createUnscheduleTimeEventAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sexec.CheckRef <em>Check Ref</em>}'.
 	 * <!-- begin-user-doc -->
@@ -366,6 +420,20 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sexec.TimeEvent <em>Time Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sexec.TimeEvent
+	 * @generated
+	 */
+	public Adapter createTimeEventAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.ScopedElement <em>Scoped Element</em>}'.
 	 * <!-- begin-user-doc -->
@@ -380,6 +448,48 @@ public class SexecAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.NamedElement <em>Named Element</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sgraph.NamedElement
+	 * @generated
+	 */
+	public Adapter createSGraph_NamedElementAdapter() {
+		return null;
+	}
+
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.Declaration <em>Declaration</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sgraph.Declaration
+	 * @generated
+	 */
+	public Adapter createDeclarationAdapter() {
+		return null;
+	}
+
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.Event <em>Event</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sgraph.Event
+	 * @generated
+	 */
+	public Adapter createEventAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for the default case.
 	 * <!-- begin-user-doc -->

+ 135 - 18
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/util/SexecSwitch.java

@@ -12,6 +12,8 @@ import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.Switch;
 
 import org.yakindu.sct.model.sexec.*;
+import org.yakindu.sct.model.sgraph.Declaration;
+import org.yakindu.sct.model.sgraph.Event;
 import org.yakindu.sct.model.sgraph.ScopedElement;
 
 /**
@@ -79,6 +81,27 @@ public class SexecSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case SexecPackage.NAMED_ELEMENT: {
+				NamedElement namedElement = (NamedElement)theEObject;
+				T result = caseNamedElement(namedElement);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
+			case SexecPackage.STATE_VECTOR: {
+				StateVector stateVector = (StateVector)theEObject;
+				T result = caseStateVector(stateVector);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
+			case SexecPackage.TIME_EVENT: {
+				TimeEvent timeEvent = (TimeEvent)theEObject;
+				T result = caseTimeEvent(timeEvent);
+				if (result == null) result = caseEvent(timeEvent);
+				if (result == null) result = caseDeclaration(timeEvent);
+				if (result == null) result = caseSGraph_NamedElement(timeEvent);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			case SexecPackage.EXECUTION_STATE: {
 				ExecutionState executionState = (ExecutionState)theEObject;
 				T result = caseExecutionState(executionState);
@@ -93,18 +116,6 @@ public class SexecSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
-			case SexecPackage.STATE_VECTOR: {
-				StateVector stateVector = (StateVector)theEObject;
-				T result = caseStateVector(stateVector);
-				if (result == null) result = defaultCase(theEObject);
-				return result;
-			}
-			case SexecPackage.NAMED_ELEMENT: {
-				NamedElement namedElement = (NamedElement)theEObject;
-				T result = caseNamedElement(namedElement);
-				if (result == null) result = defaultCase(theEObject);
-				return result;
-			}
 			case SexecPackage.STEP: {
 				Step step = (Step)theEObject;
 				T result = caseStep(step);
@@ -137,6 +148,15 @@ public class SexecSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case SexecPackage.CHECK_REF: {
+				CheckRef checkRef = (CheckRef)theEObject;
+				T result = caseCheckRef(checkRef);
+				if (result == null) result = caseCheck(checkRef);
+				if (result == null) result = caseStep(checkRef);
+				if (result == null) result = caseNamedElement(checkRef);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			case SexecPackage.IF: {
 				If if_ = (If)theEObject;
 				T result = caseIf(if_);
@@ -177,12 +197,19 @@ public class SexecSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
-			case SexecPackage.CHECK_REF: {
-				CheckRef checkRef = (CheckRef)theEObject;
-				T result = caseCheckRef(checkRef);
-				if (result == null) result = caseCheck(checkRef);
-				if (result == null) result = caseStep(checkRef);
-				if (result == null) result = caseNamedElement(checkRef);
+			case SexecPackage.SCHEDULE_TIME_EVENT: {
+				ScheduleTimeEvent scheduleTimeEvent = (ScheduleTimeEvent)theEObject;
+				T result = caseScheduleTimeEvent(scheduleTimeEvent);
+				if (result == null) result = caseStep(scheduleTimeEvent);
+				if (result == null) result = caseNamedElement(scheduleTimeEvent);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
+			case SexecPackage.UNSCHEDULE_TIME_EVENT: {
+				UnscheduleTimeEvent unscheduleTimeEvent = (UnscheduleTimeEvent)theEObject;
+				T result = caseUnscheduleTimeEvent(unscheduleTimeEvent);
+				if (result == null) result = caseStep(unscheduleTimeEvent);
+				if (result == null) result = caseNamedElement(unscheduleTimeEvent);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -385,6 +412,36 @@ public class SexecSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Schedule Time Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Schedule Time Event</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseScheduleTimeEvent(ScheduleTimeEvent object) {
+		return null;
+	}
+
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Unschedule Time Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Unschedule Time Event</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseUnscheduleTimeEvent(UnscheduleTimeEvent object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Check Ref</em>'.
 	 * <!-- begin-user-doc -->
@@ -415,6 +472,21 @@ public class SexecSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Time Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Time Event</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseTimeEvent(TimeEvent object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Scoped Element</em>'.
 	 * <!-- begin-user-doc -->
@@ -430,6 +502,51 @@ public class SexecSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Named Element</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Named Element</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseSGraph_NamedElement(org.yakindu.sct.model.sgraph.NamedElement object) {
+		return null;
+	}
+
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Declaration</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Declaration</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseDeclaration(Declaration object) {
+		return null;
+	}
+
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Event</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Event</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseEvent(Event object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
 	 * <!-- begin-user-doc -->

+ 29 - 0
plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/FactoryExtension.java

@@ -12,13 +12,17 @@ import org.yakindu.sct.model.sexec.Check;
 import org.yakindu.sct.model.sexec.CheckRef;
 import org.yakindu.sct.model.sexec.ExecutionFlow;
 import org.yakindu.sct.model.sexec.ExecutionState;
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
 import org.yakindu.sct.model.sexec.SexecFactory;
 import org.yakindu.sct.model.sexec.Step;
+import org.yakindu.sct.model.sexec.TimeEvent;
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
 import org.yakindu.sct.model.sexec.transformation.StatechartExtensions;
 import org.yakindu.sct.model.sgraph.Reaction;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.sgraph.Statement;
 import org.yakindu.sct.model.sgraph.Transition;
 import org.yakindu.sct.model.stext.stext.EventDefinition;
 import org.yakindu.sct.model.stext.stext.InterfaceScope;
@@ -211,6 +215,31 @@ public class FactoryExtension {
     return _xblockexpression;
   }
   
+  public ScheduleTimeEvent newScheduleTimeEvent(final TimeEvent te, final Statement timeValue) {
+    ScheduleTimeEvent _xblockexpression = null;
+    {
+      SexecFactory _sexecFactory = this.sexecFactory();
+      ScheduleTimeEvent _createScheduleTimeEvent = _sexecFactory.createScheduleTimeEvent();
+      final ScheduleTimeEvent r = _createScheduleTimeEvent;
+      r.setTimeEvent(te);
+      r.setTimeValue(timeValue);
+      _xblockexpression = (r);
+    }
+    return _xblockexpression;
+  }
+  
+  public UnscheduleTimeEvent newUnscheduleTimeEvent(final TimeEvent te) {
+    UnscheduleTimeEvent _xblockexpression = null;
+    {
+      SexecFactory _sexecFactory = this.sexecFactory();
+      UnscheduleTimeEvent _createUnscheduleTimeEvent = _sexecFactory.createUnscheduleTimeEvent();
+      final UnscheduleTimeEvent r = _createUnscheduleTimeEvent;
+      r.setTimeEvent(te);
+      _xblockexpression = (r);
+    }
+    return _xblockexpression;
+  }
+  
   public SexecFactory sexecFactory() {
     return SexecFactory.eINSTANCE;
   }

+ 233 - 9
plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/ModelSequencer.java

@@ -2,6 +2,7 @@ package org.yakindu.sct.model.sexec.transformation;
 
 import com.google.inject.Inject;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EObject;
@@ -10,12 +11,14 @@ import org.eclipse.xtext.EcoreUtil2;
 import org.eclipse.xtext.naming.IQualifiedNameProvider;
 import org.eclipse.xtext.xbase.lib.BooleanExtensions;
 import org.eclipse.xtext.xbase.lib.CollectionExtensions;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
 import org.eclipse.xtext.xbase.lib.ComparableExtensions;
 import org.eclipse.xtext.xbase.lib.Functions.Function1;
 import org.eclipse.xtext.xbase.lib.Functions.Function2;
 import org.eclipse.xtext.xbase.lib.IterableExtensions;
 import org.eclipse.xtext.xbase.lib.ListExtensions;
 import org.eclipse.xtext.xbase.lib.ObjectExtensions;
+import org.eclipse.xtext.xbase.lib.StringExtensions;
 import org.yakindu.sct.model.sexec.Call;
 import org.yakindu.sct.model.sexec.Check;
 import org.yakindu.sct.model.sexec.CheckRef;
@@ -27,10 +30,13 @@ import org.yakindu.sct.model.sexec.ExecutionState;
 import org.yakindu.sct.model.sexec.ExitState;
 import org.yakindu.sct.model.sexec.If;
 import org.yakindu.sct.model.sexec.Reaction;
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
 import org.yakindu.sct.model.sexec.Sequence;
 import org.yakindu.sct.model.sexec.SexecFactory;
 import org.yakindu.sct.model.sexec.StateVector;
 import org.yakindu.sct.model.sexec.Step;
+import org.yakindu.sct.model.sexec.TimeEvent;
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
 import org.yakindu.sct.model.sexec.transformation.FactoryExtension;
 import org.yakindu.sct.model.sexec.transformation.StatechartExtensions;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -38,6 +44,7 @@ import org.yakindu.sct.model.sgraph.Effect;
 import org.yakindu.sct.model.sgraph.Entry;
 import org.yakindu.sct.model.sgraph.Event;
 import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.SGraphFactory;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
@@ -53,10 +60,16 @@ import org.yakindu.sct.model.stext.stext.EventSpec;
 import org.yakindu.sct.model.stext.stext.Expression;
 import org.yakindu.sct.model.stext.stext.LocalReaction;
 import org.yakindu.sct.model.stext.stext.LogicalOrExpression;
+import org.yakindu.sct.model.stext.stext.MultiplicativeOperator;
+import org.yakindu.sct.model.stext.stext.NumericalMultiplyDivideExpression;
+import org.yakindu.sct.model.stext.stext.PrimitiveValueExpression;
 import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.ReactionTrigger;
 import org.yakindu.sct.model.stext.stext.RegularEventSpec;
 import org.yakindu.sct.model.stext.stext.StextFactory;
+import org.yakindu.sct.model.stext.stext.TimeEventSpec;
+import org.yakindu.sct.model.stext.stext.TimeEventType;
+import org.yakindu.sct.model.stext.stext.TimeUnit;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 @SuppressWarnings("all")
@@ -77,6 +90,7 @@ public class ModelSequencer {
       final ExecutionFlow ef = _create;
       this.mapScopes(sc, ef);
       this.mapStates(sc, ef);
+      this.mapTimeEvents(sc, ef);
       this.mapTransitions(sc, ef);
       this.defineStateVector(ef, sc);
       this.defineEnterSequence(ef, sc);
@@ -187,6 +201,52 @@ public class ModelSequencer {
     }
   }
   
+  public ExecutionFlow mapTimeEvents(final Statechart statechart, final ExecutionFlow r) {
+    {
+      List<EObject> _eAllContentsAsList = EcoreUtil2.eAllContentsAsList(statechart);
+      List<EObject> content = _eAllContentsAsList;
+      Iterable<State> _filter = IterableExtensions.<State>filter(content, org.yakindu.sct.model.sgraph.State.class);
+      final Iterable<State> allStates = _filter;
+      final Function1<State,ArrayList<TimeEvent>> _function = new Function1<State,ArrayList<TimeEvent>>() {
+          public ArrayList<TimeEvent> apply(final State s) {
+            ArrayList<TimeEvent> _mapTimeEventSpecs = ModelSequencer.this.mapTimeEventSpecs(s);
+            return _mapTimeEventSpecs;
+          }
+        };
+      IterableExtensions.<State>forEach(allStates, _function);
+      return r;
+    }
+  }
+  
+  public ArrayList<TimeEvent> mapTimeEventSpecs(final State state) {
+    ArrayList<TimeEvent> _xblockexpression = null;
+    {
+      List<TimeEventSpec> _timeEventSpecs = this.sct.timeEventSpecs(state);
+      final List<TimeEventSpec> timeEventSpecs = _timeEventSpecs;
+      ArrayList<TimeEvent> _arrayList = new ArrayList<TimeEvent>();
+      final ArrayList<TimeEvent> result = _arrayList;
+      for (TimeEventSpec tes : timeEventSpecs) {
+        {
+          TimeEvent _createDerivedEvent = this.createDerivedEvent(tes);
+          final TimeEvent timeEvent = _createDerivedEvent;
+          String _name = state.getName();
+          String _operator_plus = StringExtensions.operator_plus(_name, "_time_event_");
+          int _indexOf = timeEventSpecs.indexOf(tes);
+          String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, ((Integer)_indexOf));
+          timeEvent.setName(_operator_plus_1);
+          Statechart _statechart = this.sct.statechart(state);
+          ExecutionFlow _create = this.factory.create(_statechart);
+          Scope _timeEventScope = this.timeEventScope(_create);
+          EList<Declaration> _declarations = _timeEventScope.getDeclarations();
+          _declarations.add(timeEvent);
+          result.add(timeEvent);
+        }
+      }
+      _xblockexpression = (result);
+    }
+    return _xblockexpression;
+  }
+  
   public ExecutionFlow mapTransitions(final Statechart statechart, final ExecutionFlow r) {
     {
       List<EObject> _eAllContentsAsList = EcoreUtil2.eAllContentsAsList(statechart);
@@ -366,6 +426,18 @@ public class ModelSequencer {
       Sequence _createSequence = _sexecFactory.createSequence();
       final Sequence seq = _createSequence;
       seq.setName("entryAction");
+      List<TimeEventSpec> _timeEventSpecs = this.sct.timeEventSpecs(state);
+      for (TimeEventSpec tes : _timeEventSpecs) {
+        {
+          TimeEvent _createDerivedEvent = this.createDerivedEvent(tes);
+          final TimeEvent timeEvent = _createDerivedEvent;
+          Statement _buildValueExpression = this.buildValueExpression(tes);
+          ScheduleTimeEvent _newScheduleTimeEvent = this.factory.newScheduleTimeEvent(timeEvent, _buildValueExpression);
+          final ScheduleTimeEvent scheduleStep = _newScheduleTimeEvent;
+          EList<Step> _steps = seq.getSteps();
+          _steps.add(scheduleStep);
+        }
+      }
       List<LocalReaction> _entryReactions = this.entryReactions(state);
       final Function1<LocalReaction,Sequence> _function = new Function1<LocalReaction,Sequence>() {
           public Sequence apply(final LocalReaction lr) {
@@ -388,8 +460,8 @@ public class ModelSequencer {
             Boolean _xifexpression_1 = null;
             boolean _operator_notEquals_1 = ObjectExtensions.operator_notEquals(e, null);
             if (_operator_notEquals_1) {
-              EList<Step> _steps = seq.getSteps();
-              boolean _add = _steps.add(e);
+              EList<Step> _steps_1 = seq.getSteps();
+              boolean _add = _steps_1.add(e);
               _xifexpression_1 = _add;
             }
             return _xifexpression_1;
@@ -397,8 +469,8 @@ public class ModelSequencer {
         };
       IterableExtensions.<Sequence>forEach(_map, _function_1);
       Sequence _xifexpression_2 = null;
-      EList<Step> _steps_1 = seq.getSteps();
-      int _size = _steps_1.size();
+      EList<Step> _steps_2 = seq.getSteps();
+      int _size = _steps_2.size();
       boolean _operator_greaterThan = ComparableExtensions.<Integer>operator_greaterThan(((Integer)_size), ((Integer)0));
       if (_operator_greaterThan) {
         _xifexpression_2 = seq;
@@ -410,6 +482,85 @@ public class ModelSequencer {
     return _xblockexpression;
   }
   
+  public Statement buildValueExpression(final TimeEventSpec tes) {
+    Statement _xblockexpression = null;
+    {
+      StextFactory _stextFactory = this.stextFactory();
+      PrimitiveValueExpression _createPrimitiveValueExpression = _stextFactory.createPrimitiveValueExpression();
+      final PrimitiveValueExpression pve = _createPrimitiveValueExpression;
+      int _value = tes.getValue();
+      String _string = ((Integer)_value).toString();
+      pve.setValue(_string);
+      Statement _switchResult = null;
+      TimeUnit _unit = tes.getUnit();
+      final TimeUnit __valOfSwitchOver = _unit;
+      boolean matched = false;
+      if (!matched) {
+        if (org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_equals(__valOfSwitchOver,TimeUnit.MILLISECOND)) {
+          matched=true;
+          _switchResult = pve;
+        }
+      }
+      if (!matched) {
+        if (org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_equals(__valOfSwitchOver,TimeUnit.NANOSECOND)) {
+          matched=true;
+          Statement _divide = this.divide(pve, 1000);
+          _switchResult = _divide;
+        }
+      }
+      if (!matched) {
+        if (org.eclipse.xtext.xbase.lib.ObjectExtensions.operator_equals(__valOfSwitchOver,TimeUnit.SECOND)) {
+          matched=true;
+          Statement _multiply = this.multiply(pve, 1000);
+          _switchResult = _multiply;
+        }
+      }
+      if (!matched) {
+        _switchResult = pve;
+      }
+      _xblockexpression = (_switchResult);
+    }
+    return _xblockexpression;
+  }
+  
+  public Statement divide(final Expression stmnt, final long divisor) {
+    NumericalMultiplyDivideExpression _xblockexpression = null;
+    {
+      StextFactory _stextFactory = this.stextFactory();
+      NumericalMultiplyDivideExpression _createNumericalMultiplyDivideExpression = _stextFactory.createNumericalMultiplyDivideExpression();
+      final NumericalMultiplyDivideExpression div = _createNumericalMultiplyDivideExpression;
+      StextFactory _stextFactory_1 = this.stextFactory();
+      PrimitiveValueExpression _createPrimitiveValueExpression = _stextFactory_1.createPrimitiveValueExpression();
+      final PrimitiveValueExpression pve = _createPrimitiveValueExpression;
+      String _string = ((Long)divisor).toString();
+      pve.setValue(_string);
+      div.setOperator(MultiplicativeOperator.DIV);
+      div.setLeftOperand(stmnt);
+      div.setRightOperand(pve);
+      _xblockexpression = (div);
+    }
+    return _xblockexpression;
+  }
+  
+  public Statement multiply(final Expression stmnt, final long factor) {
+    NumericalMultiplyDivideExpression _xblockexpression = null;
+    {
+      StextFactory _stextFactory = this.stextFactory();
+      NumericalMultiplyDivideExpression _createNumericalMultiplyDivideExpression = _stextFactory.createNumericalMultiplyDivideExpression();
+      final NumericalMultiplyDivideExpression div = _createNumericalMultiplyDivideExpression;
+      StextFactory _stextFactory_1 = this.stextFactory();
+      PrimitiveValueExpression _createPrimitiveValueExpression = _stextFactory_1.createPrimitiveValueExpression();
+      final PrimitiveValueExpression pve = _createPrimitiveValueExpression;
+      String _string = ((Long)factor).toString();
+      pve.setValue(_string);
+      div.setOperator(MultiplicativeOperator.MUL);
+      div.setLeftOperand(stmnt);
+      div.setRightOperand(pve);
+      _xblockexpression = (div);
+    }
+    return _xblockexpression;
+  }
+  
   public Step mapExitAction(final State state) {
     Sequence _xblockexpression = null;
     {
@@ -417,6 +568,17 @@ public class ModelSequencer {
       Sequence _createSequence = _sexecFactory.createSequence();
       final Sequence seq = _createSequence;
       seq.setName("exitAction");
+      List<TimeEventSpec> _timeEventSpecs = this.sct.timeEventSpecs(state);
+      for (TimeEventSpec tes : _timeEventSpecs) {
+        {
+          TimeEvent _createDerivedEvent = this.createDerivedEvent(tes);
+          final TimeEvent timeEvent = _createDerivedEvent;
+          UnscheduleTimeEvent _newUnscheduleTimeEvent = this.factory.newUnscheduleTimeEvent(timeEvent);
+          final UnscheduleTimeEvent unscheduleStep = _newUnscheduleTimeEvent;
+          EList<Step> _steps = seq.getSteps();
+          _steps.add(unscheduleStep);
+        }
+      }
       List<LocalReaction> _exitReactions = this.exitReactions(state);
       final Function1<LocalReaction,Sequence> _function = new Function1<LocalReaction,Sequence>() {
           public Sequence apply(final LocalReaction lr) {
@@ -439,8 +601,8 @@ public class ModelSequencer {
             Boolean _xifexpression_1 = null;
             boolean _operator_notEquals_1 = ObjectExtensions.operator_notEquals(e, null);
             if (_operator_notEquals_1) {
-              EList<Step> _steps = seq.getSteps();
-              boolean _add = _steps.add(e);
+              EList<Step> _steps_1 = seq.getSteps();
+              boolean _add = _steps_1.add(e);
               _xifexpression_1 = _add;
             }
             return _xifexpression_1;
@@ -448,8 +610,8 @@ public class ModelSequencer {
         };
       IterableExtensions.<Sequence>forEach(_map, _function_1);
       Sequence _xifexpression_2 = null;
-      EList<Step> _steps_1 = seq.getSteps();
-      int _size = _steps_1.size();
+      EList<Step> _steps_2 = seq.getSteps();
+      int _size = _steps_2.size();
       boolean _operator_greaterThan = ComparableExtensions.<Integer>operator_greaterThan(((Integer)_size), ((Integer)0));
       if (_operator_greaterThan) {
         _xifexpression_2 = seq;
@@ -596,6 +758,56 @@ public class ModelSequencer {
     }
   }
   
+  protected Expression _raised(final TimeEventSpec e) {
+    {
+      StextFactory _stextFactory = this.stextFactory();
+      ElementReferenceExpression _createElementReferenceExpression = _stextFactory.createElementReferenceExpression();
+      final ElementReferenceExpression r = _createElementReferenceExpression;
+      TimeEvent _createDerivedEvent = this.createDerivedEvent(e);
+      r.setValue(_createDerivedEvent);
+      return r;
+    }
+  }
+  
+  private final HashMap<ArrayList<?>,TimeEvent> _createCache_createDerivedEvent = new HashMap<ArrayList<?>,TimeEvent>();
+  
+  public TimeEvent createDerivedEvent(final TimeEventSpec tes) {
+    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(tes);
+    TimeEvent r;
+    synchronized (_createCache_createDerivedEvent) {
+      if (_createCache_createDerivedEvent.containsKey(_cacheKey)) {
+        return _createCache_createDerivedEvent.get(_cacheKey);
+      }
+      SexecFactory _sexecFactory = this.sexecFactory();
+      TimeEvent _createTimeEvent = _sexecFactory.createTimeEvent();
+      r = _createTimeEvent;
+      _createCache_createDerivedEvent.put(_cacheKey, r);
+    }
+    TimeEventType _type = tes.getType();
+    boolean _operator_equals = ObjectExtensions.operator_equals(_type, TimeEventType.EVERY);
+    r.setPeriodic(_operator_equals);
+    return r;
+  }
+  
+  private final HashMap<ArrayList<?>,Scope> _createCache_timeEventScope = new HashMap<ArrayList<?>,Scope>();
+  
+  public Scope timeEventScope(final ExecutionFlow flow) {
+    final ArrayList<?>_cacheKey = CollectionLiterals.newArrayList(flow);
+    Scope r;
+    synchronized (_createCache_timeEventScope) {
+      if (_createCache_timeEventScope.containsKey(_cacheKey)) {
+        return _createCache_timeEventScope.get(_cacheKey);
+      }
+      SGraphFactory _sgraphFactory = this.sgraphFactory();
+      Scope _createScope = _sgraphFactory.createScope();
+      r = _createScope;
+      _createCache_timeEventScope.put(_cacheKey, r);
+    }
+    EList<Scope> _scopes = flow.getScopes();
+    _scopes.add(r);
+    return r;
+  }
+  
   public void defineStateVector(final ExecutionFlow flow, final Statechart sc) {
     {
       SexecFactory _sexecFactory = this.sexecFactory();
@@ -773,10 +985,18 @@ public class ModelSequencer {
     return _create;
   }
   
+  protected Declaration _replaced(final TimeEvent ed) {
+    return ed;
+  }
+  
   public SexecFactory sexecFactory() {
     return SexecFactory.eINSTANCE;
   }
   
+  public SGraphFactory sgraphFactory() {
+    return SGraphFactory.eINSTANCE;
+  }
+  
   public StextFactory stextFactory() {
     return StextFactory.eINSTANCE;
   }
@@ -946,6 +1166,8 @@ public class ModelSequencer {
   public Expression raised(final EventSpec e) {
     if ((e instanceof RegularEventSpec)) {
       return _raised((RegularEventSpec)e);
+    } else if ((e instanceof TimeEventSpec)) {
+      return _raised((TimeEventSpec)e);
     } else if ((e instanceof EventSpec)) {
       return _raised((EventSpec)e);
     } else {
@@ -955,7 +1177,9 @@ public class ModelSequencer {
   }
   
   public Declaration replaced(final Declaration ed) {
-    if ((ed instanceof EventDefinition)) {
+    if ((ed instanceof TimeEvent)) {
+      return _replaced((TimeEvent)ed);
+    } else if ((ed instanceof EventDefinition)) {
       return _replaced((EventDefinition)ed);
     } else if ((ed instanceof VariableDefinition)) {
       return _replaced((VariableDefinition)ed);

+ 50 - 0
plugins/org.yakindu.sct.model.sexec/xtend-gen/org/yakindu/sct/model/sexec/transformation/StatechartExtensions.java

@@ -1,8 +1,12 @@
 package org.yakindu.sct.model.sexec.transformation;
 
+import java.util.ArrayList;
+import java.util.List;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.EcoreUtil2;
 import org.eclipse.xtext.xbase.lib.ComparableExtensions;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
 import org.eclipse.xtext.xbase.lib.Functions.Function2;
 import org.eclipse.xtext.xbase.lib.IntegerExtensions;
 import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -15,6 +19,7 @@ import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.sgraph.Transition;
 import org.yakindu.sct.model.sgraph.Trigger;
 import org.yakindu.sct.model.sgraph.Vertex;
+import org.yakindu.sct.model.stext.stext.TimeEventSpec;
 
 @SuppressWarnings("all")
 public class StatechartExtensions {
@@ -87,6 +92,51 @@ public class StatechartExtensions {
     return ((Reaction) _eContainer);
   }
   
+  public Statechart statechart(final State state) {
+    Region _parentRegion = state.getParentRegion();
+    Statechart _statechart = this.statechart(_parentRegion);
+    return _statechart;
+  }
+  
+  public Statechart statechart(final Region region) {
+    Statechart _xifexpression = null;
+    EObject _eContainer = region.eContainer();
+    if ((_eContainer instanceof org.yakindu.sct.model.sgraph.Statechart)) {
+      EObject _eContainer_1 = region.eContainer();
+      _xifexpression = ((Statechart) _eContainer_1);
+    } else {
+      EObject _eContainer_2 = region.eContainer();
+      Statechart _statechart = this.statechart(((State) _eContainer_2));
+      _xifexpression = _statechart;
+    }
+    return _xifexpression;
+  }
+  
+  public List<TimeEventSpec> timeEventSpecs(final State state) {
+    EList<Transition> _outgoingTransitions = state.getOutgoingTransitions();
+    ArrayList<TimeEventSpec> _arrayList = new ArrayList<TimeEventSpec>();
+    final Function2<ArrayList<TimeEventSpec>,Transition,ArrayList<TimeEventSpec>> _function = new Function2<ArrayList<TimeEventSpec>,Transition,ArrayList<TimeEventSpec>>() {
+        public ArrayList<TimeEventSpec> apply(final ArrayList<TimeEventSpec> s , final Transition r) {
+          ArrayList<TimeEventSpec> _xblockexpression = null;
+          {
+            List<EObject> _eAllContentsAsList = EcoreUtil2.eAllContentsAsList(r);
+            Iterable<TimeEventSpec> _filter = IterableExtensions.<TimeEventSpec>filter(_eAllContentsAsList, org.yakindu.sct.model.stext.stext.TimeEventSpec.class);
+            final Function1<TimeEventSpec,Boolean> _function_1 = new Function1<TimeEventSpec,Boolean>() {
+                public Boolean apply(final TimeEventSpec tes) {
+                  boolean _add = s.add(tes);
+                  return ((Boolean)_add);
+                }
+              };
+            IterableExtensions.<TimeEventSpec>forEach(_filter, _function_1);
+            _xblockexpression = (s);
+          }
+          return _xblockexpression;
+        }
+      };
+    ArrayList<TimeEventSpec> _fold = IterableExtensions.<Transition, ArrayList<TimeEventSpec>>fold(_outgoingTransitions, _arrayList, _function);
+    return _fold;
+  }
+  
   protected String _id(final Object obj) {
     return null;
   }

+ 112 - 112
plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore

@@ -1,112 +1,112 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
-    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sgraph"
-    nsURI="http://www.yakindu.org/sct/2.0.0" nsPrefix="sgraph">
-  <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Pseudostate" abstract="true" eSuperTypes="#//Vertex"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Vertex" abstract="true" eSuperTypes="#//NamedElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="IncomingTransitionCount OutgoingTransitionCount"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="parentRegion" ordered="false"
-        lowerBound="1" eType="#//Region" eOpposite="#//Region/vertices"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" ordered="false"
-        upperBound="-1" eType="#//Transition" eOpposite="#//Transition/target"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" ordered="false"
-        upperBound="-1" eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//NamedElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="ExactlyOneInitialState"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="vertices" ordered="false"
-        upperBound="-1" eType="#//Vertex" containment="true" eOpposite="#//Vertex/parentRegion"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
-    <eAnnotations source="InjectMembers"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="target" ordered="false"
-        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/incomingTransitions"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="source" ordered="false"
-        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/outgoingTransitions"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="FinalState" eSuperTypes="#//Vertex"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//Declaration"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Junction" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Event" abstract="true" eSuperTypes="#//Declaration"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
-    <eAnnotations source="InjectMembers"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" ordered="false"
-        lowerBound="1" upperBound="-1" eType="#//Region" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="DisallowTrigger"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Trigger" abstract="true"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Effect" abstract="true"/>
-  <eClassifiers xsi:type="ecore:EClass" name="ExpressionElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//NamedElement"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Reaction" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="trigger" eType="#//Trigger"
-        containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Effect"
-        containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EEnum" name="EntryKind">
-    <eLiterals name="initial" literal="INITIAL"/>
-    <eLiterals name="shallowHistory" value="1" literal="SHALLOW_HISTORY"/>
-    <eLiterals name="deepHistory" value="2" literal="DEEP_HISTORY"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
-        eType="#//Reaction" changeable="false" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
-        eType="#//Reaction" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Scope">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
-        eType="#//Declaration" containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
-        eType="#//Event" changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
-        upperBound="-1" eType="#//Variable" changeable="false" volatile="true" transient="true"
-        derived="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
-        eType="#//Scope" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Synchronization" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//Vertex #//ExpressionElement #//ReactiveElement #//ScopedElement">
-    <eAnnotations source="InjectMembers"/>
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="NameIsNotEmpty"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="subRegions" ordered="false"
-        upperBound="-1" eType="#//Region" containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="orthogonal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="substatechart" eType="#//Statechart"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="simple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="composite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sgraph"
+    nsURI="http://www.yakindu.org/sct/2.0.0" nsPrefix="sgraph">
+  <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Pseudostate" abstract="true" eSuperTypes="#//Vertex"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Vertex" abstract="true" eSuperTypes="#//NamedElement">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="IncomingTransitionCount OutgoingTransitionCount"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="parentRegion" ordered="false"
+        lowerBound="1" eType="#//Region" eOpposite="#//Region/vertices"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" ordered="false"
+        upperBound="-1" eType="#//Transition" eOpposite="#//Transition/target"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" ordered="false"
+        upperBound="-1" eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//NamedElement">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="ExactlyOneInitialState"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="vertices" ordered="false"
+        upperBound="-1" eType="#//Vertex" containment="true" eOpposite="#//Vertex/parentRegion"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
+    <eAnnotations source="InjectMembers"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="target" ordered="false"
+        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/incomingTransitions"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="source" ordered="false"
+        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/outgoingTransitions"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="FinalState" eSuperTypes="#//Vertex"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Junction" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Event" abstract="true" eSuperTypes="#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
+    <eAnnotations source="InjectMembers"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" ordered="false"
+        lowerBound="1" upperBound="-1" eType="#//Region" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="DisallowTrigger"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Trigger" abstract="true"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Effect" abstract="true"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ExpressionElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//NamedElement"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Reaction" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="trigger" eType="#//Trigger"
+        containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Effect"
+        containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="EntryKind">
+    <eLiterals name="initial" literal="INITIAL"/>
+    <eLiterals name="shallowHistory" value="1" literal="SHALLOW_HISTORY"/>
+    <eLiterals name="deepHistory" value="2" literal="DEEP_HISTORY"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
+        eType="#//Reaction" changeable="false" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
+        eType="#//Reaction" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Scope">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
+        eType="#//Declaration" containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
+        eType="#//Event" changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
+        upperBound="-1" eType="#//Variable" changeable="false" volatile="true" transient="true"
+        derived="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
+        eType="#//Scope" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Synchronization" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//Vertex #//ExpressionElement #//ReactiveElement #//ScopedElement">
+    <eAnnotations source="InjectMembers"/>
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="NameIsNotEmpty"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="subRegions" ordered="false"
+        upperBound="-1" eType="#//Region" containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="orthogonal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="substatechart" eType="#//Statechart"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="simple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="composite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
+</ecore:EPackage>

+ 89 - 0
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/ModelSequencerTest.java

@@ -14,7 +14,10 @@ import org.yakindu.sct.model.sexec.ExecutionState;
 import org.yakindu.sct.model.sexec.ExitState;
 import org.yakindu.sct.model.sexec.If;
 import org.yakindu.sct.model.sexec.Reaction;
+import org.yakindu.sct.model.sexec.ScheduleTimeEvent;
 import org.yakindu.sct.model.sexec.Sequence;
+import org.yakindu.sct.model.sexec.TimeEvent;
+import org.yakindu.sct.model.sexec.UnscheduleTimeEvent;
 import org.yakindu.sct.model.sexec.transformation.ModelSequencer;
 import org.yakindu.sct.model.sexec.transformation.SequencerModule;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -36,8 +39,13 @@ import org.yakindu.sct.model.stext.stext.InterfaceScope;
 import org.yakindu.sct.model.stext.stext.InternalScope;
 import org.yakindu.sct.model.stext.stext.LocalReaction;
 import org.yakindu.sct.model.stext.stext.LogicalOrExpression;
+import org.yakindu.sct.model.stext.stext.MultiplicativeOperator;
+import org.yakindu.sct.model.stext.stext.NumericalMultiplyDivideExpression;
+import org.yakindu.sct.model.stext.stext.PrimitiveValueExpression;
 import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.ReactionTrigger;
+import org.yakindu.sct.model.stext.stext.TimeEventType;
+import org.yakindu.sct.model.stext.stext.TimeUnit;
 import org.yakindu.sct.model.stext.stext.Type;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
@@ -654,5 +662,86 @@ public class ModelSequencerTest {
 		assertEquals(0, flow.getStateVector().getSize());
 		assertEquals(0, flow.getStateVector().getOffset());
 	}
+	
+	
+	/**
+	 * If a time trigger is defined for a transition then an event must be introduced into the execution flow.
+	 */
+	@Test public void testSingleTransitionTimeTrigger() {
+		
+		Statechart sc = _createStatechart("test");
+		Scope scope = _createInterfaceScope("interface", sc);
+		VariableDefinition v1 = _createVariableDefinition("v1", Type.INTEGER, scope);
+		Region r = _createRegion("main", sc);
+		State s= _createState("s", r);
+
+		Transition t = _createTransition(s, s);
+		ReactionTrigger tr1 = _createReactionTrigger(t);
+		_createTimeEventSpec(TimeEventType.AFTER, 1, TimeUnit.SECOND, tr1);
+
+		Assignment assign = _createVariableAssignment(v1, AssignmentOperator.ASSIGN, _createValue("42"), (ReactionEffect) t.getEffect());
+		
+		ExecutionFlow flow = sequencer.transform(sc);
+		
+		// assert definition of time event
+		Scope timerScope = flow.getScopes().get(1);
+		assertTrue(timerScope.getDeclarations().get(0) instanceof TimeEvent);
+		
+		TimeEvent te = (TimeEvent) timerScope.getDeclarations().get(0);
+		
+		// assert that the reaction check checks the time event
+		assertEquals(1, flow.getStates().size());
+		ExecutionState _s = flow.getStates().get(0);
+		assertEquals(s.getName(), _s.getSimpleName());
+		If _if = (If) flow.getStates().get(0).getCycle().getSteps().get(0);
+
+		ElementReferenceExpression _ere = (ElementReferenceExpression) _if.getCheck().getCondition();
+		assertSame(te, _ere.getValue());
+		
+		// assert the scheduling of the time event during state entry
+		assertNotNull(_s.getEntryAction());
+		Sequence entryAction = (Sequence) _s.getEntryAction();
+		ScheduleTimeEvent ste = (ScheduleTimeEvent) entryAction.getSteps().get(0);
+		assertSame(te, ste.getTimeEvent());
+		NumericalMultiplyDivideExpression multiply = (NumericalMultiplyDivideExpression) ste.getTimeValue();
+		assertEquals("1", ((PrimitiveValueExpression)multiply.getLeftOperand()).getValue());
+		assertEquals("1000", ((PrimitiveValueExpression)multiply.getRightOperand()).getValue());
+		assertEquals(MultiplicativeOperator.MUL, multiply.getOperator());
+				
+		
+		// assert the unscheduling of the time events during state exit
+		assertNotNull(_s.getExitAction());
+		Sequence exitAction = (Sequence) _s.getExitAction();
+		UnscheduleTimeEvent ute = (UnscheduleTimeEvent) exitAction.getSteps().get(0);
+		assertSame(te, ute.getTimeEvent());
+	}
+
+	/**
+	 * 
+	 */
+	@Test public void testSingleLocalTimeTrigger() {
+		
+		Statechart sc = _createStatechart("test");
+		Scope scope = _createInterfaceScope("interface", sc);
+		VariableDefinition v1 = _createVariableDefinition("v1", Type.INTEGER, scope);
+		Region r = _createRegion("main", sc);
+		State s= _createState("s", r);
+
+		LocalReaction timeTriggeredReaction = _createTimeTriggeredReaction(s, TimeEventType.AFTER, 2, TimeUnit.MILLISECOND);
+		Assignment assign = _createVariableAssignment(v1, AssignmentOperator.ASSIGN, _createValue("42"), (ReactionEffect) timeTriggeredReaction.getEffect());
+		
+		ExecutionFlow flow = sequencer.transform(sc);
+		
+		Scope timerScope = flow.getScopes().get(1);
+		assertTrue(timerScope.getDeclarations().get(0) instanceof EventDefinition);
+		
+		
+		fail("incomplete test: time event check");
+
+		fail("incomplete test: scheduling time events");
+		
+		fail("incomplete test: unscheduling time events");
+
+	}
 
 }

+ 24 - 10
test-plugins/org.yakindu.sct.model.sexec.test/src/org/yakindu/sct/model/sexec/transformation/test/SCTTestUtil.java

@@ -27,6 +27,9 @@ import org.yakindu.sct.model.stext.stext.ReactionEffect;
 import org.yakindu.sct.model.stext.stext.ReactionTrigger;
 import org.yakindu.sct.model.stext.stext.RegularEventSpec;
 import org.yakindu.sct.model.stext.stext.StextFactory;
+import org.yakindu.sct.model.stext.stext.TimeEventSpec;
+import org.yakindu.sct.model.stext.stext.TimeEventType;
+import org.yakindu.sct.model.stext.stext.TimeUnit;
 import org.yakindu.sct.model.stext.stext.Type;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
@@ -127,17 +130,19 @@ public class SCTTestUtil {
 	}
 	
 	
+	public static TimeEventSpec _createTimeEventSpec(TimeEventType type, int value, TimeUnit unit, ReactionTrigger rt) {
+		TimeEventSpec timeTrigger = StextFactory.eINSTANCE.createTimeEventSpec();
+		timeTrigger.setType(type);
+		timeTrigger.setValue(value);
+		timeTrigger.setUnit(unit);
+
+		if (rt!=null) rt.getTriggers().add(timeTrigger);
+		return timeTrigger;
+	}
+
+	
 	public static LocalReaction _createEntryAction(ReactiveElement parent) {
-		LocalReaction reaction = StextFactory.eINSTANCE.createLocalReaction();
-		ReactionTrigger trigger = StextFactory.eINSTANCE.createReactionTrigger();
-		EntryEvent entryEvent = StextFactory.eINSTANCE.createEntryEvent();
-		_createReactionEffect(reaction);
-		
-		trigger.getTriggers().add(entryEvent);
-		reaction.setTrigger(trigger);
-		if (parent != null) parent.getLocalReactions().add(reaction);
-		
-		return reaction;
+		return _createLocalRection(parent, StextFactory.eINSTANCE.createEntryEvent() );
 	}
 	
 	
@@ -145,6 +150,15 @@ public class SCTTestUtil {
 		return _createLocalRection(parent, StextFactory.eINSTANCE.createExitEvent() );
 	}
 	
+	public static LocalReaction _createTimeTriggeredReaction(ReactiveElement parent, TimeEventType type, int value, TimeUnit unit) {
+//		TimeEventSpec timeTrigger = StextFactory.eINSTANCE.createTimeEventSpec();
+//		timeTrigger.setType(type);
+//		timeTrigger.setValue(value);
+//		timeTrigger.setUnit(unit);
+		return _createLocalRection(parent, _createTimeEventSpec(type, value, unit, null) );
+	}
+	
+
 	public static LocalReaction _createLocalRection(ReactiveElement parent, EventSpec triggerEvent) {
 		LocalReaction reaction = StextFactory.eINSTANCE.createLocalReaction();
 		ReactionTrigger trigger = StextFactory.eINSTANCE.createReactionTrigger();