Coverage for backend/flowsheetInternals/unitops/config/objects/ac_bus_config.py: 100%
3 statements
« prev ^ index » next coverage.py v7.10.7, created at 2025-11-06 23:27 +0000
« 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 *
4ac_bus_config: ObjectType = ObjectType.model_validate({
5 "displayType": "AC Bus",
6 "ports": {
7 "inlet": {
8 "many": True,
9 "displayName": "Power Inlet",
10 "type": ConType.Inlet,
11 "streamType": "ac_stream",
12 "default": 1, # default number of inlets
13 "minimum": 1, # minimum number of inlets
14 },
17 "outlet": {
18 "many": True,
19 "displayName": "Power Outlet",
20 "type": ConType.Outlet,
21 "streamType": "ac_stream",
22 "default": 2, # default number of inlets
23 "minimum": 2, # minimum number of inlets
24 }
25 },
26 "propertyPackagePorts": default_property_package_ports(),
27 "graphicObject": unitop_graphic(),
28 "indexSets": ["splitter_fraction"],
29 "splitter_fraction_name": "Outlet",
30 "properties": {
31 "split_fraction": {
32 "displayName": "Split Ratio",
33 "type": "numeric",
34 "unitType": "ratio",
35 "indexSets": ["splitter_fraction"],
36 "sumToOne": True,
37 },
38 },
39 "propertySetGroups": {
40 "default": {
41 "type": "stateVars",
42 "displayName": "Properties",
43 "stateVars": ("split_fraction",),
44 }
45 },
46 "keyProperties": [
47 "split_fraction"
48 ]
49})