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_R1 is function compute_reponse_time_R1 (My_Tasks : in Tasks_Set; Current_Task : in Generic_Task_Ptr) return Double is Iterator,Iterator2 : Tasks_Iterator; Taskj,Taski : Generic_Task_Ptr; calcul,tmp : Double; i: integer :=0; begin calcul := 0.0; tmp:=-0.1; current_element (My_Tasks, Taski, Iterator2); While (tmp/=calcul)or (calcul > Double(Periodic_Task_Ptr (Taski).period )) loop reset_iterator (My_Tasks, Iterator); tmp :=calcul; calcul := Double(Current_Task.capacity); put_line("current task capacity : " &Current_Task.capacity'img ); loop current_element (My_Tasks, Taskj, Iterator); if (Taskj.priority > Current_Task.priority) then calcul := calcul + double((Double(Taskj.capacity)*Double'Ceiling((tmp/Double(Periodic_Task_Ptr (Taskj).period))))); -- Put_line("calcul :" &calcul'img); Put_line ("period taskj :" &Periodic_Task_Ptr (Taskj).period'img); -- Put_line("tmp :" &tmp'img); --put_line("capacity taskj : " &Taskj.capacity'img); end if; exit when is_last_element (My_Tasks, Iterator); next_element (My_Tasks, Iterator); end loop; end loop; return calcul; end compute_reponse_time_R1; end Feasibility_Test.generated_R1;