Model (
   Model_Name  => Example_With_Offsets,
   Model_Date  => 2002-10-14);

-- Processing Resources

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> CPU_1);

-- Scheduling Servers

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> t1,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority	        => 30,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> t2,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority	        => 20,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> t3,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 10,
                Preassigned             => No),
	Server_Processing_Resource	=> CPU_1);

-- Operations

Operation (
	Type 				=> Simple,
	Name 				=> a11,
	Worst_Case_Execution_Time 	=> 10);

Operation (
	Type 				=> Simple,
	Name 				=> a12,
	Worst_Case_Execution_Time 	=> 10);

Operation (
	Type 				=> Simple,
	Name 				=> a21,
	Worst_Case_Execution_Time 	=> 25);

Operation (
	Type 				=> Simple,
	Name 				=> a22,
	Worst_Case_Execution_Time 	=> 5);

Operation (
	Type 				=> Simple,
	Name 				=> a23,
	Worst_Case_Execution_Time 	=> 5);

Operation (
	Type 				=> Simple,
	Name 				=> a31,
	Worst_Case_Execution_Time 	=> 30);

Operation (
	Type 				=> Simple,
	Name 				=> a32,
	Worst_Case_Execution_Time 	=> 30);

-- Transactions

Transaction (
	Type	=> Regular,
	Name	=> t_1,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E1,
		 Period 	=> 100)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> I12),
		(Type 	=> regular,
		 name 	=> I13),
		(Type 	=> regular,
		 name 	=> O1,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 100,
			 referenced_event => E1))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E1,
		 Output_Event 		=> I12,
		 Activity_Operation 	=> a11,
		 Activity_Server	=> t1),
		(Type 			=> Offset,
		 Input_Event 		=> I12,
		 Output_Event 		=> I13,
                 Delay_Min_Interval     => 50,
	         Delay_Max_Interval     => 50,
  	         Referenced_Event       => E1),
		(Type 			=> Activity,
		 Input_Event 		=> I13,
		 Output_Event 		=> O1,
		 Activity_Operation 	=> a12,
		 Activity_Server	=> t1)));

Transaction (
	Type	=> Regular,
	Name	=> t_2,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E2,
		 Period 	=> 100)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> I22),
		(Type 	=> regular,
		 name 	=> I23),
		(Type 	=> regular,
		 name 	=> I24),
		(Type 	=> regular,
		 name 	=> I25),
		(Type 	=> regular,
		 name 	=> O2,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 100,
			 referenced_event => E2))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E2,
		 Output_Event 		=> I22,
		 Activity_Operation 	=> a21,
		 Activity_Server	=> t2),
		(Type 			=> Offset,
		 Input_Event 		=> I22,
		 Output_Event 		=> I23,
                 Delay_Min_Interval     => 30,
	         Delay_Max_Interval     => 30,
  	         Referenced_Event       => E2),
		(Type 			=> Activity,
		 Input_Event 		=> I23,
		 Output_Event 		=> I24,
		 Activity_Operation 	=> a22,
		 Activity_Server	=> t2),                 
		(Type 			=> Offset,
		 Input_Event 		=> I24,
		 Output_Event 		=> I25,
                 Delay_Min_Interval     => 70,
	         Delay_Max_Interval     => 70,
  	         Referenced_Event       => E2),
		(Type 			=> Activity,
		 Input_Event 		=> I25,
		 Output_Event 		=> O2,
		 Activity_Operation 	=> a23,
		 Activity_Server	=> t2)));

Transaction (
	Type	=> Regular,
	Name	=> t_3,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E3,
		 Period 	=> 250)),
	Internal_Events => (
		(Type 	=> regular,
		 name 	=> I32),
		(Type 	=> regular,
		 name 	=> I33),
		(Type 	=> regular,
		 name 	=> O3,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 250,
			 referenced_event => E3))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E3,
		 Output_Event 		=> I32,
		 Activity_Operation 	=> a31,
		 Activity_Server	=> t3),
		(Type 			=> Offset,
		 Input_Event 		=> I32,
		 Output_Event 		=> I33,
                 Delay_Min_Interval     => 130,
	         Delay_Max_Interval     => 130,
  	         Referenced_Event       => E3),
		(Type 			=> Activity,
		 Input_Event 		=> I33,
		 Output_Event 		=> O3,
		 Activity_Operation 	=> a32,
		 Activity_Server	=> t3)));

