| 192 | } |
| 193 | |
| 194 | bool updateModelTempDir(openstudio::model::Model& /*model*/, const openstudio::path& modelTempDir) { |
| 195 | bool modified = false; |
| 196 | |
| 197 | // Create folder layout |
| 198 | openstudio::path runpath = modelTempDir / openstudio::toPath("resources/run"); |
| 199 | openstudio::path scriptspath = modelTempDir / openstudio::toPath("resources/measures"); |
| 200 | openstudio::path filespath = modelTempDir / openstudio::toPath("resources/files"); |
| 201 | |
| 202 | if (!openstudio::filesystem::exists(runpath)) { |
| 203 | openstudio::filesystem::create_directories(runpath); |
| 204 | modified = true; |
| 205 | } |
| 206 | |
| 207 | if (!openstudio::filesystem::exists(scriptspath)) { |
| 208 | openstudio::filesystem::create_directories(scriptspath); |
| 209 | modified = true; |
| 210 | } |
| 211 | |
| 212 | if (!openstudio::filesystem::exists(filespath)) { |
| 213 | openstudio::filesystem::create_directories(filespath); |
| 214 | modified = true; |
| 215 | } |
| 216 | |
| 217 | // weather file is fixed in OSDocument::fixWeatherFileOnOpen |
| 218 | |
| 219 | return modified; |
| 220 | } |
| 221 | |
| 222 | bool attachWorkflow(openstudio::model::Model& model, const openstudio::path& modelTempDir) { |
| 223 | boost::optional<WorkflowJSON> workflowJSON; |
no test coverage detected