Coverage for backend/flowsheetInternals/unitops/config/objects/grid_config.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-11-06 23:27 +0000

1from core.auxiliary.enums.unitsOfMeasure import UnitOfMeasure 

2 

3from common.config_types import * 

4from common.config_utils import * 

5 

6grid_config: ObjectType = ObjectType.model_validate({ 

7 "displayType": "Grid", 

8 "displayName": "Grid", 

9 

10 "ports": { 

11 "inlet": { 

12 "displayName": "Residual Power in", 

13 "type": ConType.Inlet, 

14 "streamType": "energy_stream", 

15 "streamName": "PS" 

16 } 

17 }, 

18 "propertyPackagePorts": default_property_package_ports(), 

19 "graphicObject": unitop_graphic(), 

20 "properties": { 

21 "n_capacity": { 

22 "displayName": "N-Capacity", 

23 "type": "numeric", 

24 "unitType": "heatflow" 

25 }, 

26 "n_minus_one": { 

27 "displayName": "N-1 Capacity", 

28 "type": "numeric", 

29 "unitType": "heatflow" 

30 }, 

31 "import_export": { 

32 "displayName": "Power In/Out", 

33 "type": "numeric", 

34 "unitType": "heatflow" 

35 }, 

36 }, 

37 "propertySetGroups": { 

38 "default": { 

39 "type": "stateVars", 

40 "displayName": "Properties", 

41 "stateVars": ("n_capacity","n_minus_one" ), 

42 } 

43 }, 

44 "keyProperties": [ 

45 "import_export", 

46 ] 

47})