Skip to content

Commit

Permalink
Remove AirTerminal:SingleDuct:Uncontrolled - move transition to 9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Oct 10, 2019
1 parent 0c72c25 commit bfa65cd
Show file tree
Hide file tree
Showing 7 changed files with 261 additions and 546 deletions.
5 changes: 4 additions & 1 deletion src/Transition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ list( APPEND VERSIONS 8_9_0 )
list( APPEND VERSIONS 9_0_0 )
list( APPEND VERSIONS 9_1_0 )
list( APPEND VERSIONS 9_2_0 )
list( APPEND VERSIONS 9_2_0b )
list( APPEND VERSIONS 9_3_0 )

if(APPLE)
if( "${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU" )
Expand Down Expand Up @@ -150,6 +150,7 @@ install(FILES "InputRulesFiles/Rules8-8-0-to-8-9-0.md" DESTINATION "PreProcess/I
install(FILES "InputRulesFiles/Rules8-9-0-to-9-0-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
install(FILES "InputRulesFiles/Rules9-0-0-to-9-1-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
install(FILES "InputRulesFiles/Rules9-1-0-to-9-2-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
install(FILES "InputRulesFiles/Rules9-2-0-to-9-3-0.md" DESTINATION "PreProcess/IDFVersionUpdater")

# output changes file first introduced with v8.5.0, so no older ones exist
install(FILES "OutputRulesFiles/OutputChanges8-4-0-to-8-5-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
Expand All @@ -160,6 +161,7 @@ install(FILES "OutputRulesFiles/OutputChanges8-8-0-to-8-9-0.md" DESTINATION "Pre
install(FILES "OutputRulesFiles/OutputChanges8-9-0-to-9-0-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
install(FILES "OutputRulesFiles/OutputChanges9-0-0-to-9-1-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
install(FILES "OutputRulesFiles/OutputChanges9-1-0-to-9-2-0.md" DESTINATION "PreProcess/IDFVersionUpdater")
install(FILES "OutputRulesFiles/OutputChanges9-2-0-to-9-3-0.md" DESTINATION "PreProcess/IDFVersionUpdater")

install(FILES "SupportFiles/Report Variables 7-2-0-006 to 8-0-0.csv" DESTINATION "PreProcess/IDFVersionUpdater/")
install(FILES "SupportFiles/Report Variables 8-0-0-007 to 8-1-0.csv" DESTINATION "PreProcess/IDFVersionUpdater/")
Expand All @@ -174,3 +176,4 @@ install(FILES "SupportFiles/Report Variables 8-8-0 to 8-9-0.csv" DESTINATION "Pr
install(FILES "SupportFiles/Report Variables 8-9-0 to 9-0-0.csv" DESTINATION "PreProcess/IDFVersionUpdater/")
install(FILES "SupportFiles/Report Variables 9-0-0 to 9-1-0.csv" DESTINATION "PreProcess/IDFVersionUpdater/")
install(FILES "SupportFiles/Report Variables 9-1-0 to 9-2-0.csv" DESTINATION "PreProcess/IDFVersionUpdater/")
install(FILES "SupportFiles/Report Variables 9-2-0 to 9-3-0.csv" DESTINATION "PreProcess/IDFVersionUpdater/")
354 changes: 2 additions & 352 deletions src/Transition/CreateNewIDFUsingRulesV9_2_0.f90

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ MODULE SetVersion
CONTAINS

SUBROUTINE SetThisVersionVariables()
VerString='Conversion 9.2 => 9.2b'
VersionNum=9.2
sVersionNum='9.2'
IDDFileNameWithPath=TRIM(ProgramPath)//'V9-2-0-Energy+Old.idd'
NewIDDFileNameWithPath=TRIM(ProgramPath)//'V9-2-0-Energy+.idd'
RepVarFileNameWithPath=TRIM(ProgramPath)//'Report Variables 9-1-0 to 9-2-0.csv'
VerString='Conversion 9.2 => 9.3'
VersionNum=9.3
sVersionNum='9.3'
IDDFileNameWithPath=TRIM(ProgramPath)//'V9-2-0-Energy+.idd'
NewIDDFileNameWithPath=TRIM(ProgramPath)//'V9-3-0-Energy+.idd'
RepVarFileNameWithPath=TRIM(ProgramPath)//'Report Variables 9-2-0 to 9-3-0.csv'
END SUBROUTINE

END MODULE
Expand Down Expand Up @@ -99,6 +99,17 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
CHARACTER(len=10) :: LocalFileExtension=' '
LOGICAL :: WildMatch

! For Table:Lookup objects
INTEGER NumPerimObjs
INTEGER PArgs

INTEGER :: iPt, iPt2, iPt3
INTEGER, ALLOCATABLE, DIMENSION(:) :: NumIndVarsVals, CurIndices, Increments, StepSize
INTEGER NumOutputVals, NumIndVars, RefIndex, FlatIndex, NumMiniTables, MiniTableSize
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:,:) :: IndVars
INTEGER, ALLOCATABLE, DIMENSION(:,:) :: IndVarOrder
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: OutputVals

LOGICAL :: ConnComp
LOGICAL :: ConnCompCtrl
LOGICAL :: FileExist
Expand Down Expand Up @@ -129,20 +140,6 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
INTEGER PNumArgs ! Number of Arguments in a definition
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: POutArgs


! For Defaulting now-required RunPeriod Name
INTEGER :: TotRunPeriods = 0
INTEGER :: runPeriodNum = 0
INTEGER :: iterateRunPeriod = 0
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: CurrentRunPeriodNames
CHARACTER(len=20) :: PotentialRunPeriodName

! Only needed for ZoneHVAC:EquipmentList translation
INTEGER zeqNum
CHARACTER(len=20) :: zeqNumStr
CHARACTER(len=7) :: zeqHeatingOrCooling
LOGICAL :: writeScheduleTypeObj = .true.

! For AirTerminal:SingleDuct:Uncontrolled transition
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: ATSDUNodeNames
CHARACTER(len=MaxNameLength), ALLOCATABLE, DIMENSION(:) :: MatchingATSDUAirFlowNodeNames
Expand All @@ -155,6 +152,7 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
INTEGER nodeCountA
LOGICAL :: nodeFound = .false.


If (FirstTime) THEN ! do things that might be applicable only to this new version
FirstTime=.false.
EndIf
Expand Down Expand Up @@ -325,8 +323,6 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
END IF
ENDDO



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! P R O C E S S I N G !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Expand Down Expand Up @@ -423,13 +419,13 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
SELECT CASE (MakeUPPERCase(TRIM(IDFRecords(Num)%Name)))

CASE ('VERSION')
! IF ((InArgs(1)(1:3)) == sVersionNum .and. ArgFile) THEN
! CALL ShowWarningError('File is already at latest version. No new diff file made.',Auditf)
! CLOSE(diflfn,STATUS='DELETE')
! LatestVersion=.true.
! EXIT
! ENDIF
! CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
IF ((InArgs(1)(1:3)) == sVersionNum .and. ArgFile) THEN
CALL ShowWarningError('File is already at latest version. No new diff file made.',Auditf)
CLOSE(diflfn,STATUS='DELETE')
LatestVersion=.true.
EXIT
ENDIF
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
OutArgs(1) = sVersionNum
NoDiff=.false.

Expand Down Expand Up @@ -468,6 +464,25 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
POutArgs(7) = InArgs(7)
CALL WriteOutIDFLines(DifLfn,'ZoneHVAC:AirDistributionUnit',PNumArgs,POutArgs,PFldNames,PFldUnits)

! This is part of the transition for AirTerminal:SingleDuct:Uncontrolled
CASE('ZONEHVAC:EQUIPMENTLIST')
nodiff = .false.
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
DO CurField = 1, CurArgs
! Add air terminal unit object type and name change here (see AirTerminal:SingleDuct:Uncontrolled above)
IF (CurField > 2) THEN
IF (SameString(TRIM(InArgs(CurField)),'AirTerminal:SingleDuct:Uncontrolled')) THEN
OutArgs(CurField) = 'ZoneHVAC:AirDistributionUnit'
ELSE IF (SameString(TRIM(InArgs(CurField-1)),'AirTerminal:SingleDuct:Uncontrolled')) THEN
OutArgs(CurField) = TRIM(InArgs(CurField)) // ' ADU'
ELSE
OutArgs(CurField) = InArgs(CurField)
END IF
ELSE
OutArgs(CurField) = InArgs(CurField)
END IF
END DO

! This is part of the transition for AirTerminal:SingleDuct:Uncontrolled
CASE('AIRLOOPHVAC:ZONESPLITTER')
IF(TotATSDUObjs > 0) THEN
Expand Down Expand Up @@ -747,7 +762,6 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
NoDiff=.true.
ENDIF
! Whew - Done with the transition for AirTerminal:SingleDuct:Uncontrolled
! Well - almost done, there's more in the case below for ZoneHVAC:EquipmentList . . .

! If your original object starts with B, insert the rules here

Expand Down Expand Up @@ -777,6 +791,11 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile

! If your original object starts with R, insert the rules here

! See above - this object is part of the transition for AirTerminal:SingleDuct:Uncontrolled
! CASE('ROOMAIR:NODE:AIRFLOWNETWORK:HVACEQUIPMENT')

! If your original object starts with S, insert the rules here

! If your original object starts with T, insert the rules here

! If your original object starts with U, insert the rules here
Expand All @@ -786,23 +805,9 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
! If your original object starts with W, insert the rules here

! If your original object starts with Z, insert the rules here
CASE('ZONEHVAC:EQUIPMENTLIST')
nodiff = .false.
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
DO CurField = 1, CurArgs
! Add air terminal unit object type and name change here (see AirTerminal:SingleDuct:Uncontrolled above)
IF (CurField > 2) THEN
IF (SameString(TRIM(InArgs(CurField)),'AirTerminal:SingleDuct:Uncontrolled')) THEN
OutArgs(CurField) = 'ZoneHVAC:AirDistributionUnit'
ELSE IF (SameString(TRIM(InArgs(CurField-1)),'AirTerminal:SingleDuct:Uncontrolled')) THEN
OutArgs(CurField) = TRIM(InArgs(CurField)) // ' ADU'
ELSE
OutArgs(CurField) = InArgs(CurField)
END IF
ELSE
OutArgs(CurField) = InArgs(CurField)
END IF
END DO

! See above - this object is part of the transition for AirTerminal:SingleDuct:Uncontrolled
! CASE('ZONEHVAC:EQUIPMENTLIST')

!!! Changes for report variables, meters, tables -- update names
CASE('OUTPUT:VARIABLE')
Expand Down Expand Up @@ -1365,3 +1370,49 @@ SUBROUTINE CreateNewIDFUsingRules(EndOfFile,DiffOnly,InLfn,AskForInput,InputFile
RETURN

END SUBROUTINE CreateNewIDFUsingRules

SUBROUTINE SortUnique(StrArray, Size, Order)
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
CHARACTER(len=*), DIMENSION(Size) :: StrArray
Integer, DIMENSION(Size) :: Order
INTEGER :: Size, InitSize

REAL, ALLOCATABLE, DIMENSION(:) :: InNumbers
REAL, ALLOCATABLE, DIMENSION(:) :: OutNumbers
INTEGER :: I, I2
REAL :: min_val, max_val

ALLOCATE(InNumbers(Size))
ALLOCATE(OutNumbers(Size))

InitSize = Size

DO I=1,Size
READ(StrArray(I),*) InNumbers(I)
END DO

min_val = minval(InNumbers)-1
max_val = maxval(InNumbers)

Size = 0
DO WHILE (min_val<max_val)
Size = Size+1
min_val = minval(InNumbers, MASK=InNumbers>min_val)
OutNumbers(Size) = min_val
END DO

DO I=1,Size
WRITE(StrArray(I),'(F0.5)') OutNumbers(I)
StrArray(I) = TRIM(StrArray(I))
END DO

DO I=1,InitSize
DO I2=1,Size
IF (OutNumbers(I2) == InNumbers(I)) THEN
Order(I) = I2
EXIT
END IF
END DO
END DO

END SUBROUTINE SortUnique
Loading

6 comments on commit bfa65cd

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeAirTermSDUncontrolled (mjwitte) - x86_64-Linux-Ubuntu-18.04-custom_check: OK (11 of 11 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeAirTermSDUncontrolled (mjwitte) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeAirTermSDUncontrolled (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4: OK (2528 of 2619 tests passed, 81 test warnings)

Messages:\n

  • 170 tests had: AUD diffs.
  • 170 tests had: BND diffs.
  • 170 tests had: EIO diffs.
  • 156 tests had: RDD diffs.
  • 13 tests had: ESO small diffs.
  • 29 tests had: MTD diffs.
  • 17 tests had: MTR small diffs.
  • 12 tests had: Table small diffs.
  • 32 tests had: ESO big diffs.
  • 85 tests had: Table big diffs.
  • 21 tests had: MTR big diffs.
  • 6 tests had: ERR diffs.
  • 5 tests had: EDD diffs.
  • 1 test had: MDD diffs.

Failures:\n

integration Test Summary

  • Passed: 672
  • Failed: 2

regression Test Summary

  • Passed: 600
  • Failed: 89

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeAirTermSDUncontrolled (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-UnitTestsCoverage-Debug: OK (1239 of 1239 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeAirTermSDUncontrolled (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2488 of 2579 tests passed, 81 test warnings)

Messages:\n

  • 170 tests had: AUD diffs.
  • 170 tests had: BND diffs.
  • 170 tests had: EIO diffs.
  • 156 tests had: RDD diffs.
  • 13 tests had: ESO small diffs.
  • 29 tests had: MTD diffs.
  • 18 tests had: MTR small diffs.
  • 12 tests had: Table small diffs.
  • 32 tests had: ESO big diffs.
  • 85 tests had: Table big diffs.
  • 21 tests had: MTR big diffs.
  • 6 tests had: ERR diffs.
  • 5 tests had: EDD diffs.
  • 1 test had: MDD diffs.

Failures:\n

integration Test Summary

  • Passed: 669
  • Failed: 2

regression Test Summary

  • Passed: 580
  • Failed: 89

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeAirTermSDUncontrolled (mjwitte) - x86_64-Linux-Ubuntu-18.04-gcc-7.4-IntegrationCoverage-Debug: OK (671 of 674 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 671
  • Failed: 3

Build Badge Test Badge Coverage Badge

Please sign in to comment.