src/energyplus/ForwardTranslator/ForwardTranslateOutputControlFiles.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "../ForwardTranslator.hpp" | ||
| 7 | #include "../../model/Model.hpp" | ||
| 8 | |||
| 9 | #include "../../model/OutputControlFiles.hpp" | ||
| 10 | |||
| 11 | #include <utilities/idd/OutputControl_Files_FieldEnums.hxx> | ||
| 12 | // #include "../../utilities/idd/IddEnums.hpp" | ||
| 13 | #include <utilities/idd/IddEnums.hxx> | ||
| 14 | |||
| 15 | using namespace openstudio::model; | ||
| 16 | |||
| 17 | namespace openstudio { | ||
| 18 | |||
| 19 | namespace energyplus { | ||
| 20 | |||
| 21 | 32 | boost::optional<IdfObject> ForwardTranslator::translateOutputControlFiles(OutputControlFiles& modelObject) { | |
| 22 | |||
| 23 |
2/2✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
|
32 | IdfObject idfObject = createAndRegisterIdfObject(openstudio::IddObjectType::OutputControl_Files, modelObject); |
| 24 | |||
| 25 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputCSV()) { |
| 26 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputCSV, "Yes"); |
| 27 | } else { | ||
| 28 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputCSV, "No"); |
| 29 | } | ||
| 30 | |||
| 31 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputMTR()) { |
| 32 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputMTR, "Yes"); |
| 33 | } else { | ||
| 34 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputMTR, "No"); |
| 35 | } | ||
| 36 | |||
| 37 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputESO()) { |
| 38 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputESO, "Yes"); |
| 39 | } else { | ||
| 40 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputESO, "No"); |
| 41 | } | ||
| 42 | |||
| 43 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputEIO()) { |
| 44 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputEIO, "Yes"); |
| 45 | } else { | ||
| 46 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputEIO, "No"); |
| 47 | } | ||
| 48 | |||
| 49 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputTabular()) { |
| 50 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputTabular, "Yes"); |
| 51 | } else { | ||
| 52 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputTabular, "No"); |
| 53 | } | ||
| 54 | |||
| 55 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputSQLite()) { |
| 56 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputSQLite, "Yes"); |
| 57 | } else { | ||
| 58 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputSQLite, "No"); |
| 59 | } | ||
| 60 | |||
| 61 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputJSON()) { |
| 62 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputJSON, "Yes"); |
| 63 | } else { | ||
| 64 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputJSON, "No"); |
| 65 | } | ||
| 66 | |||
| 67 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputAUDIT()) { |
| 68 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputAUDIT, "Yes"); |
| 69 | } else { | ||
| 70 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputAUDIT, "No"); |
| 71 | } | ||
| 72 | |||
| 73 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputSpaceSizing()) { |
| 74 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputSpaceSizing, "Yes"); |
| 75 | } else { | ||
| 76 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputSpaceSizing, "No"); |
| 77 | } | ||
| 78 | |||
| 79 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputZoneSizing()) { |
| 80 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputZoneSizing, "Yes"); |
| 81 | } else { | ||
| 82 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputZoneSizing, "No"); |
| 83 | } | ||
| 84 | |||
| 85 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputSystemSizing()) { |
| 86 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputSystemSizing, "Yes"); |
| 87 | } else { | ||
| 88 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputSystemSizing, "No"); |
| 89 | } | ||
| 90 | |||
| 91 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputDXF()) { |
| 92 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputDXF, "Yes"); |
| 93 | } else { | ||
| 94 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputDXF, "No"); |
| 95 | } | ||
| 96 | |||
| 97 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputBND()) { |
| 98 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputBND, "Yes"); |
| 99 | } else { | ||
| 100 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputBND, "No"); |
| 101 | } | ||
| 102 | |||
| 103 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputRDD()) { |
| 104 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputRDD, "Yes"); |
| 105 | } else { | ||
| 106 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputRDD, "No"); |
| 107 | } | ||
| 108 | |||
| 109 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputMDD()) { |
| 110 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputMDD, "Yes"); |
| 111 | } else { | ||
| 112 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputMDD, "No"); |
| 113 | } | ||
| 114 | |||
| 115 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputMTD()) { |
| 116 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputMTD, "Yes"); |
| 117 | } else { | ||
| 118 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputMTD, "No"); |
| 119 | } | ||
| 120 | |||
| 121 |
2/2✓ Branch 1 taken 32 times.
✓ Branch 4 taken 32 times.
|
32 | idfObject.setString(OutputControl_FilesFields::OutputEND, "Yes"); |
| 122 | |||
| 123 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputSHD()) { |
| 124 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputSHD, "Yes"); |
| 125 | } else { | ||
| 126 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputSHD, "No"); |
| 127 | } | ||
| 128 | |||
| 129 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputDFS()) { |
| 130 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputDFS, "Yes"); |
| 131 | } else { | ||
| 132 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputDFS, "No"); |
| 133 | } | ||
| 134 | |||
| 135 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputGLHE()) { |
| 136 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputGLHE, "Yes"); |
| 137 | } else { | ||
| 138 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputGLHE, "No"); |
| 139 | } | ||
| 140 | |||
| 141 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputDelightIn()) { |
| 142 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputDelightIn, "Yes"); |
| 143 | } else { | ||
| 144 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputDelightIn, "No"); |
| 145 | } | ||
| 146 | |||
| 147 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputDelightELdmp()) { |
| 148 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputDelightELdmp, "Yes"); |
| 149 | } else { | ||
| 150 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputDelightELdmp, "No"); |
| 151 | } | ||
| 152 | |||
| 153 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputDelightDFdmp()) { |
| 154 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputDelightDFdmp, "Yes"); |
| 155 | } else { | ||
| 156 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputDelightDFdmp, "No"); |
| 157 | } | ||
| 158 | |||
| 159 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputEDD()) { |
| 160 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputEDD, "Yes"); |
| 161 | } else { | ||
| 162 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputEDD, "No"); |
| 163 | } | ||
| 164 | |||
| 165 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputDBG()) { |
| 166 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputDBG, "Yes"); |
| 167 | } else { | ||
| 168 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputDBG, "No"); |
| 169 | } | ||
| 170 | |||
| 171 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputPerfLog()) { |
| 172 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputPerfLog, "Yes"); |
| 173 | } else { | ||
| 174 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputPerfLog, "No"); |
| 175 | } | ||
| 176 | |||
| 177 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputSLN()) { |
| 178 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputSLN, "Yes"); |
| 179 | } else { | ||
| 180 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputSLN, "No"); |
| 181 | } | ||
| 182 | |||
| 183 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputSCI()) { |
| 184 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputSCI, "Yes"); |
| 185 | } else { | ||
| 186 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputSCI, "No"); |
| 187 | } | ||
| 188 | |||
| 189 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputWRL()) { |
| 190 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputWRL, "Yes"); |
| 191 | } else { | ||
| 192 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputWRL, "No"); |
| 193 | } | ||
| 194 | |||
| 195 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputScreen()) { |
| 196 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputScreen, "Yes"); |
| 197 | } else { | ||
| 198 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputScreen, "No"); |
| 199 | } | ||
| 200 | |||
| 201 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputExtShd()) { |
| 202 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputExtShd, "Yes"); |
| 203 | } else { | ||
| 204 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputExtShd, "No"); |
| 205 | } | ||
| 206 | |||
| 207 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputTarcog()) { |
| 208 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputTarcog, "Yes"); |
| 209 | } else { | ||
| 210 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputTarcog, "No"); |
| 211 | } | ||
| 212 | |||
| 213 |
3/3✓ Branch 1 taken 32 times.
✓ Branch 3 taken 1 time.
✓ Branch 4 taken 31 times.
|
32 | if (modelObject.outputPlantComponentSizing()) { |
| 214 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | idfObject.setString(OutputControl_FilesFields::OutputPlantComponentSizing, "Yes"); |
| 215 | } else { | ||
| 216 |
2/2✓ Branch 1 taken 31 times.
✓ Branch 4 taken 31 times.
|
62 | idfObject.setString(OutputControl_FilesFields::OutputPlantComponentSizing, "No"); |
| 217 | } | ||
| 218 | |||
| 219 |
1/1✓ Branch 1 taken 32 times.
|
64 | return idfObject; |
| 220 | 32 | } | |
| 221 | |||
| 222 | } // namespace energyplus | ||
| 223 | |||
| 224 | } // namespace openstudio | ||
| 225 |