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

3 statements  

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

1from common.config_types import * 

2from common.config_utils import * 

3 

4mdb_config: ObjectType = ObjectType.model_validate({ 

5 "displayType": "Main Distribution Board", 

6 "displayName": "Main Distribution Board", 

7 "ports": { 

8 "inlet": { 

9 "many": True, 

10 "displayName": "Power Inlet", 

11 "type": ConType.Inlet, 

12 "streamType": "energy_stream", 

13 "streamName": "PS", 

14 "default": 1, # default number of inlets 

15 "minimum": 1, # minimum number of inlets 

16 }, 

17 "outlet": { 

18 "many": True, 

19 "displayName": "Connection", 

20 "type": ConType.Outlet, 

21 "streamType": "energy_stream", 

22 "streamName": "PS", 

23 "default": 2, # default number of outlets 

24 "minimum": 2, # minimum number of outlets 

25 }, 

26 }, 

27 "propertyPackagePorts": default_property_package_ports(), 

28 "graphicObject": unitop_graphic(), 

29 "indexSets": ["splitter_fraction"], 

30 "properties": { 

31 "priorities": { 

32 "displayName": "Power Distribution Prioritisation", 

33 "type": "numeric", 

34 "unitType": "heatflow", 

35 "indexSets": ["splitter_fraction"], 

36 "sumToOne": False, 

37 }, 

38 }, 

39 "splitter_fraction_name": "Priority", 

40 "propertySetGroups": { 

41 "default": { 

42 "type": "exceptLast", 

43 "displayName": "Properties", 

44 "stateVars": ("priorities",), 

45 } 

46 }, 

47})