1 PACKAGE electrical_system IS
2 CONSTANT epsi : real := 1.0e-18;
3 -- declare subtypes for voltage and current
4 SUBTYPE voltage IS real; -- TOLERANCE "default_voltage";
5 SUBTYPE current IS real; -- TOLERANCE "default_current";
6 SUBTYPE charge IS real; -- TOLERANCE "default_charge";
8 -- basic nature and reference terminal for electrical systems
11 current THROUGH ground reference;
12 FUNCTION always_positive (x:real) RETURN real;
14 -- a subnature that is compatible with electrical but has
15 -- different tolerance codes for across and through aspects
16 -- SUBNATURE high_voltage IS electrical
17 -- TOLERANCE "MV" ACROSS "A" THROUGH;
19 -- support for terminal arrays
20 -- NATURE electrical_vector IS ARRAY (integer RANGE <>) OF electrical;
22 -- Type quantity_vector IS ARRAY (integer RANGE <>) OF real;
23 -- Type Adresse is array (integer RANGE <>) of integer;
25 END PACKAGE electrical_system;
26 ---------------------------------------------------------------------
28 PACKAGE BODY electrical_system IS
29 FUNCTION always_positive (x:real) RETURN real IS