------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real-time scheduling analysis tool. -- This program provides services to automatically check schedulability and -- other performance criteria of real-time architecture models. -- -- Copyright (C) 2002-2023, Frank Singhoff, Alain Plantec, Jerome Legrand, -- Hai Nam Tran, Stephane Rubini -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285, Université de Bretagne Occidentale -- -- Cheddar has been published in the "Agence de Protection des Programmes/France" in 2008. -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- The full list of contributors and sponsors can be found in README.md -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -- -- -- Contact : cheddar@listes.univ-brest.fr -- ------------------------------------------------------------------------------ -- Last update : -- $Rev: 3477 $ -- $Date: 2020-07-13 11:43:48 +0200 (Mon, 13 Jul 2020) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Ada.Containers.Vectors; use Ada.Containers; use Ada.Containers; with Ada.Directories; use Ada.Directories; with Ada.text_IO; use Ada.text_IO; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; use unbounded_strings.strings_table_package; use unbounded_strings.unbounded_string_list_package; with unbounded_strings; use unbounded_strings; with Ada.strings; use Ada.strings; with paes.objective_functions.deadline2energy; use paes.objective_functions.deadline2energy; with Debug; use Debug; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; with Ada.Float_Text_IO; use Ada.Float_Text_IO; with Paes.deadline2energy ; use Paes.deadline2energy; with Systems; use Systems; with sets; with Dependencies; use Dependencies; with Task_Dependencies; use Task_Dependencies; with Task_Dependencies; use Task_Dependencies.Half_Dep_Set; with MILS_Security; use MILS_Security; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Text_IO.Unbounded_IO; use Ada.Text_IO.Unbounded_IO; with paes.chromosome_Data_Manipulation_deadline2energy; use paes.chromosome_Data_Manipulation_deadline2energy; procedure paes.exhaustive_general_form_deadline2energy is package Solution_Container is new Vectors (Positive, solution_deadline2energy_ptr); use Solution_Container; package Integer_Container is new Vectors (Positive, Integer); use Integer_Container; search_space_is_exhausted : boolean := false; search_space_is_exhausted_com : boolean := false; non : boolean := True; next_solution : solution_deadline2energy_ptr; normalized_solution : solution_deadline2energy_ptr; all_feasible_solutions : Solution_Container.Vector; N_feasible_solutions : integer := 0; a_table : Integer_container.Vector; Cursor1,Cursor2 : Solution_Container.Cursor; Cursor3 : Integer_container.Cursor; k, j , i,l : integer; nb_rejectedSol : Integer; eidx : natural := 0; F : Ada.Text_IO.File_Type; F6 : Ada.Text_IO.File_Type; begin next_solution:=new solution_deadline2energy; normalized_solution:=new solution_deadline2energy; Append (Data3, "iteration" & " " & "Missed_deadline" &" " &"bell" &" " & "biba" &" "& ASCII.LF); init_deadline2energy; -- 2) enumerate and evaluate all feasible solutions -- i := 1; j := 1; k:=1; l:=1; --------------------------------------------------------------------------------------- i := 1; j:= 1; nb_sol_Exhaus:=0; while(True) loop search_space_is_exhausted:= False; if (i>1) then if (next_solution.chrom_task(i) >=1) and (next_solution.chrom_task(i)nb_partitions) then next_solution.chrom_task(i):= 0; i:=i-1; else if (next_solution.chrom_task(i)<=nb_partitions) then nb(next_solution.chrom_task(i)):= nb(next_solution.chrom_task(i))+1; end if; if (next_solution.chrom_task(i)<= i) and (i1) then j:=j-1; elsif (next_solution.chrom_com(NonSecure_list(j)).mode=undefined) and (j=1) then search_space_is_exhausted_com:=True; end if; end loop; search_space_is_exhausted_com:=False; elsif (next_solution.chrom_task(i)> i) and (i>1) then next_solution.chrom_task(i):= 0; i:=i-1; else exit; end if; end if; end if; end loop; nb_rejectedSol := nb_InitSol+ N_feasible_solutions - arclength; -- solutions add in the archive during the init process + N_feasible_solutions+iterations+ arclength Append (Data3," " & ASCII.LF); Append (Data3," " & ASCII.LF); Append (Data3,"Number of rejected solution during the archiving process : " & nb_rejectedSol'img & ASCII.LF); Append (Data3,"Number of solutions generate during the exhaustive research : " & nb_sol_Exhaus'img & ASCII.LF); Create(F6,Ada.Text_IO.Out_File,"Exhaustive_Execution_iter.dat"); Unbounded_IO.Put_Line(F6, Data3); Close(F6); end paes.exhaustive_general_form_deadline2energy;