------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- 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-2016, Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- Frank Singhoff, Lab-STICC UMR 6285 laboratory, 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 AUTHORS.txt and SPONSORS.txt -- -- 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: 1249 $ -- $Date: 2014-08-28 07:02:15 +0200 (Fri, 28 Aug 2014) $ -- $Author: singhoff $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Tasks; use Tasks; with Task_Set; use Task_Set; with Resources; use Resources; With Resource_set; use Resource_set; with Systems; use Systems; with paes; use paes; with Scheduler; use Scheduler; with Scheduler_Interface; use Scheduler_Interface; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with unbounded_strings; use unbounded_strings; with framework_config; use framework_config; package Task_Clustering_Rules is -- Global variables -- Initial_System : System; Hyperperiod_of_Initial_Taskset : integer; The_Scheduler : Schedulers_Type; Task_priority : Integer; Sched_policy : Policies; -------------------------------------------------------------------------- -- Declaration of the **Anti-Ideal point** (which represent the "worst" -- value of each objective, explored in the search space) In our case -- we deal with a minimization problem, so "worst" means the maximum value -- can be taken by each objective. -- these values shoult be determined among all iterations --------------------------------------------------------------------------- Z1_anti_ideal, Z2_anti_ideal: Float; --------------------------------------------------------------------------- -- and the **Ideal point** which is defined by -- the "better" value of each objective, -- explored in the search space (i.e. the min value of each objective) -- These values are determined from the final archive --------------------------------------------------------------------------- Z1_ideal, Z2_ideal : Float; -- Generate a schedulable task set using the UUnifast -- method to generate utilizations of tasks -- from a given cpu utilization. -- procedure Generate_initial_schedulable_system (my_system : in out System; N : in Integer; U : in Float; N_diff_periods : in Integer; N_resources : in Integer; rsf : in Float; csr : in Float); -- Compute the number of tasks from a given solution -- function Number_of_tasks (s : in solution) return integer; -- Applying clustering rules on a given solution -- to generate the corresponding architecture system -- Procedure Appling_clustering_rules (A_sys : in out System; s : in solution); -- Create a system i.e a system with a core_unit, a processor -- and an address_Space -- procedure Create_system (A_system : in out System); -- This function checks if a solution is consistent or not : -- 1) Check for each task of the candidate solution that Ci <= Di -- 2) Check that the total processor Utilization <= 1 -- 3) check if there are two non-harmonic functions which are -- grouped alone in the same task. -- function Check_Consistency_Of_A_Solution (s : in solution) return boolean; end Task_Clustering_Rules;