Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ControlNum |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
LOGICAL FUNCTION CheckMaxActiveController( ControlNum )
! FUNCTION INFORMATION:
! AUTHOR Dimitri Curtil
! DATE WRITTEN May 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Returns true if controller is max-constrained. false otherwise.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ControlNum
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
! na
CheckMaxActiveController = .FALSE.
! Check that actuated value is the max avail actuated value
IF ( ControllerProps(ControlNum)%ActuatedValue /= ControllerProps(ControlNum)%MaxAvailActuated ) THEN
CheckMaxActiveController = .FALSE.
RETURN
END IF
SelectAction: SELECT CASE (ControllerProps(ControlNum)%Action)
CASE (iNormalAction) ! "NORMAL"
! Check for max constrained convergence
IF (ControllerProps(ControlNum)%SetPointValue >= ControllerProps(ControlNum)%SensedValue) THEN
CheckMaxActiveController = .TRUE.
RETURN
END IF
CASE (iReverseAction) ! "REVERSE"
! Check for max constrained convergence
IF (ControllerProps(ControlNum)%SetPointValue <= ControllerProps(ControlNum)%SensedValue) THEN
CheckMaxActiveController = .TRUE.
RETURN
END IF
CASE DEFAULT
! Should never happen
CALL ShowSevereError( &
'CheckMaxActiveController: Invalid controller action during '//TRIM(CreateHVACStepFullString())//'.' &
)
CALL ShowContinueError( &
'CheckMaxActiveController: Controller name='//TRIM(ControllerProps(ControlNum)%ControllerName) &
)
CALL ShowContinueError('CheckMaxActiveController: Valid choices are "NORMAL" or "REVERSE"')
CALL ShowFatalError('CheckMaxActiveController: Preceding error causes program termination.')
END SELECT SelectAction
RETURN
END FUNCTION CheckMaxActiveController