with Candidates.Containers, Bundles.Containers; private with Ada.Containers.Vectors, Rationals; generic with package Given_Bundles is new Bundles (<>); with package Bundle_Containers is new Given_Bundles.Containers (<>); package Election is procedure Setup (Candidate_Data : in Candidates.Containers.Candidate_Vector; Preference_File : in String; Output_Dir, Main_Logfile : in String; Number_To_Elect : in Natural; Is_Verbose : in Boolean := False) with Post => Is_Properly_Setup; procedure Run with Pre => Is_Properly_Setup; function Is_Properly_Setup return Boolean; private type Candidate_Status is (Elected, Running, Excluded); type Entry_Data is record ID : Candidates.CandidateID; Vote_Change : Integer; Total_Votes : Natural; Paper_Change : Integer; Total_Papers : Natural; Status : Candidate_Status; Changed : Boolean; Order_Elected : Natural; end record; package Entry_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Entry_Data); type Pending_Transfer is record From : Candidates.CandidateID; Position : Positive; Value : Rationals.Fraction; end record; package Transfer_Vectors is new Ada.Containers.Vectors (Index_Type => Positive, Element_Type => Pending_Transfer); -- This is used to keep track of exhausted and -- fractional loss papers. type Extra_Data is record Paper_Change : Integer; Total_Papers : Natural; end record; end Election;