with Paes; use Paes; with Task_Clustering_Rules; use Task_Clustering_Rules; with Systems; use Systems; with Ada.Numerics.Float_Random ; use Ada.Numerics.Float_Random ; -- This package defines all subprograms needed -- to formulate PAES for the task clustering problem package Paes_For_Clustering is -- This global variable "Sys" is used to call The Cheddar -- tool for each candidate solution -- It is modified after each mutation Sys : system; G : Ada.Numerics.Float_Random.Generator; -- Global variables to extract Number of preemptions and sum of laxities -- from the response of "Scheduling_Simulation_Basics" when calling -- cheddar to verify the schedulability Nb_preemption_of_the_candidate_sol : integer; Sum_laxities_of_the_candidate_sol : integer; Min_laxities_of_the_candidate_sol : integer; -- These subprograms are the specific implementation -- of PAES generic subprograms procedure init_for_clustering; procedure evaluate_for_clustering (s : in out solution); procedure mutate_for_clustering (s : in out solution); -- "normalize" used to normalize a mutated solution -- exemple to normalize a solution: -- [5 2 5 3 4 5 2] => After normalization [1 2 1 3 4 1 2] procedure normalize(s : in out solution); -- return true if the task t is isolated i.e it is alone in the cluster to which it belongs -- false otherwise function is_isolated(t : integer; s : solution) return boolean; end Paes_For_Clustering;