| 61 | } |
| 62 | |
| 63 | std::vector<openstudio::IdfObject> OutputVariable_Impl::remove() { |
| 64 | //Note: Cant do /object-list implementation for EMS Sensor since Auto Naming of Objects causes issues. |
| 65 | // Instead, doing an /alpha getString implementation so we need to manually remove any referring Sensors |
| 66 | const Model m = this->model(); |
| 67 | |
| 68 | std::vector<EnergyManagementSystemSensor> objects = m.getConcreteModelObjects<EnergyManagementSystemSensor>(); |
| 69 | for (auto& sensor : objects) { |
| 70 | if (sensor.outputVariable()) { |
| 71 | //if (sensor.outputVariable().get().variableName() == this->variableName()) { |
| 72 | // sensor.remove(); |
| 73 | //} |
| 74 | // check handle instead of name |
| 75 | if (sensor.outputVariable().get().handle() == this->handle()) { |
| 76 | sensor.remove(); |
| 77 | } |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | return ModelObject_Impl::remove(); |
| 82 | } |
| 83 | |
| 84 | std::vector<ScheduleTypeKey> OutputVariable_Impl::getScheduleTypeKeys(const Schedule& schedule) const { |
| 85 | std::vector<ScheduleTypeKey> result; |
nothing calls this directly
no test coverage detected