with Text_IO; use Text_IO; with Translate; use Translate; with unbounded_strings; use unbounded_strings; with Scheduler; use Scheduler; with Scheduling_Analysis; use Scheduling_Analysis; use Scheduling_Analysis.Double_Tasks_Parameters_Package; with Tasks; use Tasks; use Tasks.Generic_Task_List_Package; with Task_Set; use Task_Set; with Offsets; use Offsets; with Offsets.extended; use Offsets.extended; with Task_Dependencies; use Task_Dependencies; with Dependencies; use Dependencies; package body Feasibility_Test.generated_C2 is function Processor_Utilization_Over_Period_C2 (My_Tasks : in Tasks_Set; Processor_Name : in Unbounded_String) return Double is Taski : Generic_Task_Ptr; My_Iterator : Tasks_Iterator; calcul : Double := 0.0; begin Periodic_Control (My_Tasks, Processor_Name); reset_iterator (My_Tasks, My_Iterator); loop current_element (My_Tasks, Taski, My_Iterator); if (Taski.task_type /= Aperiodic_Type) then calcul := calcul + (Double(Taski.capacity)/Double(Periodic_Task_Ptr(Taski).period)); end if; exit when is_last_element (My_Tasks, My_Iterator); next_element (My_Tasks, My_Iterator); end loop; return calcul; end Processor_Utilization_Over_Period_C2; function compute_less_C2 (My_Tasks : in Tasks_Set; Processor_Name : in Unbounded_String) return boolean is rightvalue, leftvalue : Double; begin leftvalue := Processor_Utilization_Over_Period_C2(My_Tasks,To_Unbounded_String("CPU_A")); rightvalue :=1.0; if leftvalue < rightvalue then return True; else return False; end if; end compute_less_C2; end Feasibility_Test.generated_C2;