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

4 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2026-05-13 02:47 +0000

1from common.config_types import * 

2from common.config_utils import * 

3from ..spec_helpers import * 

4 

5pid_controller_config: ObjectType = ObjectType( 

6 displayType="PID", 

7 displayName="PID ", 

8 ports={}, 

9 graphicObject=unitop_graphic(), 

10 properties=PropertiesType({ 

11 "setpoint": PropertyType( 

12 displayName="Setpoint", 

13 type="numeric", 

14 unitType="ratio", 

15 ), 

16 "process_var": PropertyType( 

17 displayName="Process Variable", 

18 type="numeric", 

19 unitType="ratio", 

20 ), 

21 "manipulated_var": PropertyType( 

22 displayName="Manipulated Variable", 

23 type="numeric", 

24 unitType="ratio", 

25 ), 

26 "mv_ref": PropertyType( 

27 displayName="Controller Bias", 

28 type="numeric", 

29 unitType="ratio", 

30 ), 

31 "gain_i": PropertyType( 

32 displayName="Integral Gain", 

33 type="numeric", 

34 unitType="rpm", 

35 ), 

36 "gain_p": PropertyType( 

37 displayName="Proportional Gain", 

38 type="numeric", 

39 unitType="ratio", 

40 ), 

41 }), 

42 propertySetGroups={ 

43 "default": { 

44 "type": "stateVars", 

45 "displayName": "Properties", 

46 "stateVars": ("setpoint", "process_var", "mv_ref", "gain_i", "gain_p"), 

47 } 

48 }, 

49 keyProperties=[], 

50 idaes_adapter=UnitModelAdapter( 

51 args=ArgAdapter({ 

52 "dynamic": ConstantArg(True), 

53 "controller_type": ConstantArg(ControllerType.PI), 

54 "calculate_initial_integral": ConstantArg(True), 

55 "mv_bound_type": ConstantArg(ControllerMVBoundType.SMOOTH_BOUND), 

56 }), 

57 properties=SerialisePropertiesAdapter(), 

58 ports=SerialisePortAdapter() 

59 ), 

60)