Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ScheduleIndex |
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.
FUNCTION HasFractionalScheduleValue(ScheduleIndex) RESULT(HasFractions)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN March 2008
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function returns true if the schedule contains fractional
! values [>0, <1].
! 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) :: ScheduleIndex ! Which Schedule being tested
LOGICAL :: HasFractions ! True if the schedule has fractional values
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER WkSch
INTEGER DayT
INTEGER Loop
INTEGER Hour
INTEGER TStep
IF (ScheduleIndex == -1 .or. ScheduleIndex == 0) THEN
CONTINUE
ELSEIF (ScheduleIndex < 1 .or. ScheduleIndex > NumSchedules) THEN
CALL ShowFatalError('HasFractionalScheduleValue called with ScheduleIndex out of range')
ENDIF
HasFractions=.false.
IF (ScheduleIndex > 0) THEN
WkSch=Schedule(ScheduleIndex)%WeekSchedulePointer(1)
DayTLoop: DO DayT=1,MaxDayTypes
DO Hour=1,24
DO TStep=1,NumOfTimeStepInHour
IF (DaySchedule(WeekSchedule(WkSch)%DaySchedulePointer(DayT))%TSValue(Hour,TStep) > 0.0d0 .and. &
DaySchedule(WeekSchedule(WkSch)%DaySchedulePointer(DayT))%TSValue(Hour,TStep) < 1.0d0) THEN
HasFractions=.true.
EXIT DayTLoop
ENDIF
ENDDO
ENDDO
ENDDO DayTLoop
IF (.not. HasFractions) THEN
DO Loop=2,366
WkSch=Schedule(ScheduleIndex)%WeekSchedulePointer(Loop)
DayTLoop2: DO DayT=1,MaxDayTypes
DO Hour=1,24
DO TStep=1,NumOfTimeStepInHour
IF (DaySchedule(WeekSchedule(WkSch)%DaySchedulePointer(DayT))%TSValue(Hour,TStep) > 0.0d0 .and. &
DaySchedule(WeekSchedule(WkSch)%DaySchedulePointer(DayT))%TSValue(Hour,TStep) < 1.0d0) THEN
HasFractions=.true.
EXIT DayTLoop2
ENDIF
ENDDO
ENDDO
ENDDO DayTLoop2
ENDDO
ENDIF
ENDIF
RETURN
END FUNCTION HasFractionalScheduleValue