Model (
   Model_Name          => controller,
   Model_Date          => 2000-01-01,
   System_Pip_Behaviour=> STRICT);

Processing_Resource (
   Type                   => Regular_Processor,
   Name                   => cpu_1,
   Max_Interrupt_Priority => 32767,
   Min_Interrupt_Priority => 1,
   Worst_ISR_Switch       => 0.00,
   Avg_ISR_Switch         => 0.00,
   Best_ISR_Switch        => 0.00);

Scheduler (
   Type            => Primary_Scheduler,
   Name            => cpu_1,
   Host            => cpu_1,
   Policy          => 
      ( Type                 => Fixed_Priority,
        Worst_Context_Switch => 0.250000,
        Avg_Context_Switch   => 0.00,
        Best_Context_Switch  => 0.00,
        Max_Priority         => 32767,
        Min_Priority         => 1));

Scheduling_Server (
   Type                       => Regular,
   Name                       => control_task,
   Server_Sched_Parameters    => 
      ( Type         => Fixed_Priority_Policy,
        The_Priority => 3,
        Preassigned  => NO),
   Scheduler                  => cpu_1);

Scheduling_Server (
   Type                       => Regular,
   Name                       => planning_task,
   Server_Sched_Parameters    => 
      ( Type         => Fixed_Priority_Policy,
        The_Priority => 2,
        Preassigned  => NO),
   Scheduler                  => cpu_1);

Scheduling_Server (
   Type                       => Regular,
   Name                       => status_task,
   Server_Sched_Parameters    => 
      ( Type         => Fixed_Priority_Policy,
        The_Priority => 1,
        Preassigned  => NO),
   Scheduler                  => cpu_1);

Scheduling_Server (
   Type                       => Regular,
   Name                       => emergency,
   Server_Sched_Parameters    => 
      ( Type         => Fixed_Priority_Policy,
        The_Priority => 4,
        Preassigned  => NO),
   Scheduler                  => cpu_1);

Shared_Resource (
   Type        => Immediate_Ceiling_Resource,
   Name        => data_server,
   Ceiling     => 32767,
   Preassigned => NO);

Shared_Resource (
   Type        => Immediate_Ceiling_Resource,
   Name        => comm_server,
   Ceiling     => 32767,
   Preassigned => NO);

Operation (
   Type                       => Simple,
   Name                       => read,
   Worst_Case_Execution_Time  => 2.00,
   Avg_Case_Execution_Time    => 1.000E+100,
   Best_Case_Execution_Time   => 0.00,
   Shared_Resources_To_Lock   => 
      ( data_server),
   Shared_Resources_To_Unlock => 
      ( data_server));

Operation (
   Type                       => Simple,
   Name                       => write,
   Worst_Case_Execution_Time  => 20.00,
   Avg_Case_Execution_Time    => 1.000E+100,
   Best_Case_Execution_Time   => 0.00,
   Shared_Resources_To_Lock   => 
      ( data_server),
   Shared_Resources_To_Unlock => 
      ( data_server));

Operation (
   Type                       => Simple,
   Name                       => send,
   Worst_Case_Execution_Time  => 10.00,
   Avg_Case_Execution_Time    => 1.000E+100,
   Best_Case_Execution_Time   => 0.00,
   Shared_Resources_To_Lock   => 
      ( comm_server),
   Shared_Resources_To_Unlock => 
      ( comm_server));

Operation (
   Type                       => Simple,
   Name                       => receive,
   Worst_Case_Execution_Time  => 10.00,
   Avg_Case_Execution_Time    => 1.000E+100,
   Best_Case_Execution_Time   => 0.00,
   Shared_Resources_To_Lock   => 
      ( comm_server),
   Shared_Resources_To_Unlock => 
      ( comm_server));

Operation (
   Type                     => Enclosing,
   Name                     => control,
   Worst_Case_Execution_Time=> 20.00,
   Avg_Case_Execution_Time  => 1.000E+100,
   Best_Case_Execution_Time => 0.00,
   Composite_Operation_List => 
      ( read,
        send));

Operation (
   Type                     => Enclosing,
   Name                     => planning,
   Worst_Case_Execution_Time=> 40.00,
   Avg_Case_Execution_Time  => 1.000E+100,
   Best_Case_Execution_Time => 0.00,
   Composite_Operation_List => 
      ( write));

Operation (
   Type                     => Enclosing,
   Name                     => status,
   Worst_Case_Execution_Time=> 100.00,
   Avg_Case_Execution_Time  => 1.000E+100,
   Best_Case_Execution_Time => 0.00,
   Composite_Operation_List => 
      ( receive));

Operation (
   Type                       => Simple,
   Name                       => emergency,
   Worst_Case_Execution_Time  => 5.00,
   Avg_Case_Execution_Time    => 1.000E+100,
   Best_Case_Execution_Time   => 0.00);

Transaction (
   Type            => regular,
   Name            => control_task,
   External_Events => 
      ( ( Type       => Periodic,
          Name       => e1,
          Period     => 100.000,
          Max_Jitter => 0.000,
          Phase      => 0.000)),
   Internal_Events => 
      ( ( Type => Regular,
          Name => o1)),
   Event_Handlers  => 
      ( (Type               => Activity,
         Input_Event        => e1,
         Output_Event       => o1,
         Activity_Operation => control,
         Activity_Server    => control_task)));

Transaction (
   Type            => regular,
   Name            => planning_task,
   External_Events => 
      ( ( Type       => Periodic,
          Name       => e2,
          Period     => 150.000,
          Max_Jitter => 0.000,
          Phase      => 0.000)),
   Internal_Events => 
      ( ( Type => Regular,
          Name => o2)),
   Event_Handlers  => 
      ( (Type               => Activity,
         Input_Event        => e2,
         Output_Event       => o2,
         Activity_Operation => planning,
         Activity_Server    => planning_task)));

Transaction (
   Type            => regular,
   Name            => status_task,
   External_Events => 
      ( ( Type       => Periodic,
          Name       => e3,
          Period     => 350.000,
          Max_Jitter => 0.000,
          Phase      => 0.000)),
   Internal_Events => 
      ( ( Type => Regular,
          Name => o3)),
   Event_Handlers  => 
      ( (Type               => Activity,
         Input_Event        => e3,
         Output_Event       => o3,
         Activity_Operation => status,
         Activity_Server    => status_task)));

Transaction (
   Type            => regular,
   Name            => emergency,
   External_Events => 
      ( ( Type             => Sporadic,
          Name             => e4,
          Avg_Interarrival => 0.000,
          Distribution     => UNIFORM,
          Min_Interarrival => 50.000)),
   Internal_Events => 
      ( ( Type => Regular,
          Name => o4)),
   Event_Handlers  => 
      ( (Type               => Activity,
         Input_Event        => e4,
         Output_Event       => o4,
         Activity_Operation => emergency,
         Activity_Server    => emergency)));

