Coverage for backend/flowsheetInternals/unitops/config/objects/deferrable_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 *
4deferrable_config: ObjectType = ObjectType.model_validate({
5 "displayType": "Deferrable Load",
6 "ports": {
7 "inlet": {
8 "many": True,
9 "displayName": "Inlet",
10 "type": ConType.Inlet,
11 "default": 3, # default number of inlets
12 "minimum": 3, # minimum number of inlets
13 },
14 "outlet": {
15 "many": True,
16 "displayName": "Outlet",
17 "type": ConType.Outlet,
18 "default": 3, # default number of inlets
19 "minimum": 1, # minimum number of inlets
20 }
21 },
22 # TODO: ensure this will work with n number of inlets & outlets
23 "propertyPackagePorts": default_property_package_ports(),
24 "graphicObject": unitop_graphic(),
25 "propertySets": {
26 # "constraints": general_constraints()
27 "properties": {
28 "type": "calculationModes",
29 "displayName": "Properties",
30 "containedProperties": {
31 "load": {
32 "displayName": "Total Grid Load",
33 "type": "numeric",
34 "unitType": "heatflow"
35 },
36 "costPerKwh": {
37 "displayName": "Energy Price",
38 "type": "numeric",
39 "unitType": "powerPrice"
40 },
41 },
42 "calculationModes": {
43 "heatAdded": {
44 "displayName": "Heat Added",
45 "properties": (
46 "load",
47 "costPerKwh"
48 )
49 },
50 }
51 },
52 }
53})