-- Processing Resources

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> Processor_1,
        Worst_Context_Switch 	=> 0.0);

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> Processor_2,
        Worst_Context_Switch 	=> 0.0);

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> Processor_3,
        Worst_Context_Switch 	=> 0.0);

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> Processor_4,
        Worst_Context_Switch 	=> 0.0);

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> Processor_5,
        Worst_Context_Switch 	=> 0.0);

Processing_Resource (
	Type 			=> Fixed_Priority_Processor,
	Name 			=> Processor_6,
        Worst_Context_Switch 	=> 0.0);

-- Scheduling Servers

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1_1,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 99,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_1);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1_2,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 99,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_2);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1_3,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 99,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_3);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1_4,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_4);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1_5,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_5);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_1_6,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_6);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2_1,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 99,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_6);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2_2,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 99,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_5);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2_3,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 99,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_4);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2_4,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_3);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2_5,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_2);

Scheduling_Server (
	Type				=> Fixed_Priority,
	Name 				=> Task_2_6,
	Server_Sched_Parameters		=> (
		Type		=> Fixed_Priority_policy,
		The_Priority		=> 100,
                Preassigned             => No),
	Server_Processing_Resource	=> Processor_1);

-- Resources


-- Operations

Operation (
	Type 				=> Simple,
	Name 				=> Task_1_1_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_1_2_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_1_3_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_1_4_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_1_5_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_1_6_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_2_1_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_2_2_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_2_3_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_2_4_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_2_5_Code,
	Worst_Case_Execution_Time 	=> 1);

Operation (
	Type 				=> Simple,
	Name 				=> Task_2_6_Code,
	Worst_Case_Execution_Time 	=> 1);

-- Transactions

Transaction (
	Type	=> Regular,
	Name	=> Trans_1,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E_1,
		 Period 	=> 3)),
	Internal_Events => (
		(Type 	=> regular,
		 Name 	=> O_1_1),
		(Type 	=> regular,
		 Name 	=> O_1_2),
		(Type 	=> regular,
		 Name 	=> O_1_3),
		(Type 	=> regular,
		 Name 	=> O_1_4),
		(Type 	=> regular,
		 Name 	=> O_1_5),
		(Type 	=> regular,
		 Name 	=> O_1_6,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 12,
			 referenced_event => E_1))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E_1,
		 Output_Event 		=> O_1_1,
		 Activity_Operation 	=> Task_1_1_Code,
		 Activity_Server	=> Task_1_1),
		(Type 			=> Activity,
		 Input_Event 		=> O_1_1,
		 Output_Event 		=> O_1_2,
		 Activity_Operation 	=> Task_1_2_Code,
		 Activity_Server	=> Task_1_2),
		(Type 			=> Activity,
		 Input_Event 		=> O_1_2,
		 Output_Event 		=> O_1_3,
		 Activity_Operation 	=> Task_1_3_Code,
		 Activity_Server	=> Task_1_3),
		(Type 			=> Activity,
		 Input_Event 		=> O_1_3,
		 Output_Event 		=> O_1_4,
		 Activity_Operation 	=> Task_1_4_Code,
		 Activity_Server	=> Task_1_4),
		(Type 			=> Activity,
		 Input_Event 		=> O_1_4,
		 Output_Event 		=> O_1_5,
		 Activity_Operation 	=> Task_1_5_Code,
		 Activity_Server	=> Task_1_5),
		(Type 			=> Activity,
		 Input_Event 		=> O_1_5,
		 Output_Event 		=> O_1_6,
		 Activity_Operation 	=> Task_1_6_Code,
		 Activity_Server	=> Task_1_6)));

Transaction (
	Type	=> Regular,
	Name	=> Trans_2,
	External_Events => (
		(Type 		=> Periodic,
		 Name 		=> E_2,
		 Period 	=> 3)),
	Internal_Events => (
		(Type 	=> regular,
		 Name 	=> O_2_1),
		(Type 	=> regular,
		 Name 	=> O_2_2),
		(Type 	=> regular,
		 Name 	=> O_2_3),
		(Type 	=> regular,
		 Name 	=> O_2_4),
		(Type 	=> regular,
		 Name 	=> O_2_5),
		(Type 	=> regular,
		 Name 	=> O_2_6,
                 Timing_Requirements => (
			 Type 		  => Hard_Global_Deadline,
			 Deadline 	  => 12,
			 referenced_event => E_2))),
	Event_Handlers => (
		(Type 			=> Activity,
		 Input_Event 		=> E_2,
		 Output_Event 		=> O_2_1,
		 Activity_Operation 	=> Task_2_1_Code,
		 Activity_Server	=> Task_2_1),
		(Type 			=> Activity,
		 Input_Event 		=> O_2_1,
		 Output_Event 		=> O_2_2,
		 Activity_Operation 	=> Task_2_2_Code,
		 Activity_Server	=> Task_2_2),
		(Type 			=> Activity,
		 Input_Event 		=> O_2_2,
		 Output_Event 		=> O_2_3,
		 Activity_Operation 	=> Task_2_3_Code,
		 Activity_Server	=> Task_2_3),
		(Type 			=> Activity,
		 Input_Event 		=> O_2_3,
		 Output_Event 		=> O_2_4,
		 Activity_Operation 	=> Task_2_4_Code,
		 Activity_Server	=> Task_2_4),
		(Type 			=> Activity,
		 Input_Event 		=> O_2_4,
		 Output_Event 		=> O_2_5,
		 Activity_Operation 	=> Task_2_5_Code,
		 Activity_Server	=> Task_2_5),
		(Type 			=> Activity,
		 Input_Event 		=> O_2_5,
		 Output_Event 		=> O_2_6,
		 Activity_Operation 	=> Task_2_6_Code,
		 Activity_Server	=> Task_2_6)));


