------------------------------------------- ------------------------------------- ------------------------------------------------------------------------------ -- Cheddar is a GNU GPL real time scheduling analysis tool. -- This program provides services to automatically check performances -- of real time architectures. -- -- Copyright (C) 2002-2010, by Frank Singhoff, Alain Plantec, Jerome Legrand -- -- The Cheddar project was started in 2002 by -- the LISyC Team, University of Western Britanny. -- -- Since 2008, Ellidiss technologies also contributes to the development of -- Cheddar and provides industrial support. -- -- 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: 523 $ -- $Date: 2012-09-26 15:09:39 +0200 (Wed, 26 Sep 2012) $ -- $Author: fotsing $ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ package body Queueing_System.theoretical is procedure theoretical_Results (A_Queueing_System : in Generic_Queueing_System_theoretical'Class; Message : in Unbounded_String) is Awt, Anc, Mwt, Mnc : Double := 0.0; begin -- criteria computation Qs_Average_Waiting_Time (A_Queueing_System, Awt); Qs_Average_Number_Customer (A_Queueing_System, Anc); Qs_Maximum_Waiting_Time (A_Queueing_System, Mwt); Qs_Maximum_Number_Customer (A_Queueing_System, Mnc); -- criteria display Put_Line ("theoretical Results"); New_Line; Put_Line ("AW" & To_String (Message) & " " & A_Queueing_System.Utilisation'Img & " " & Awt'Img); Put_Line ("AO" & To_String (Message) & " " & A_Queueing_System.Utilisation'Img & " " & Anc'Img); Put_Line ("MW" & To_String (Message) & " " & A_Queueing_System.Utilisation'Img & " " & Mwt'Img); Put_Line ("MO" & To_String (Message) & " " & A_Queueing_System.Utilisation'Img & " " & Mnc'Img); New_Line; end theoretical_Results; procedure Initialize (A_Queueing_System : in out Generic_Queueing_System_theoretical) is begin Initialize (Generic_Queueing_System (A_Queueing_System)); end Initialize; procedure Reset (A_Queueing_System : in out Generic_Queueing_System_theoretical) is begin Initialize (Generic_Queueing_System_theoretical (A_Queueing_System)); end Reset; function Get_Probability_Density (A_Queueing_System : in Generic_Queueing_System_theoretical'Class; N : in Natural := 0) return Double is State : Natural; Result : Double := 0.0; begin State := N; if State > A_Queueing_System.Max_State then return (-1.0); end if; if State = 0 then State := A_Queueing_System.Max_State; end if; for I in 0 .. State loop Result := Result + Get_Probability_Of_State (A_Queueing_System, I); end loop; return Result; end Get_Probability_Density; function Get_Probability_Of_Full_Buffer (A_Queueing_System : in Generic_Queueing_System_theoretical) return Double is begin raise Not_Implemented; return 0.0; end Get_Probability_Of_Full_Buffer; function Get_Probability_Of_Task_Block (A_Queueing_System : in Generic_Queueing_System_theoretical) return Double is begin raise Not_Implemented; return 0.0; end Get_Probability_Of_Task_Block; function Get_Probability_Of_Queueing (A_Queueing_System : in Generic_Queueing_System_theoretical) return Double is begin raise Not_Implemented; return 0.0; end Get_Probability_Of_Queueing; end Queueing_System.theoretical;