Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

I would suggest you look at PythonPluginCustomSchedule.py / PythonPluginCustomSchedule.idf as a starting point.

From a cursory look, I think you're just using the wrong method: it should be api.exchange.get_actuator_handle not self.api.exchange.get_variable_handle

You're doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_variable_handle(
        state,
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

And you should be doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_actuator_handle(
        state,
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

I would suggest you look at PythonPluginCustomSchedule.py / PythonPluginCustomSchedule.idf as a starting point.

From a cursory look, I think you're just using the wrong method: it should be api.exchange.get_actuator_handle not self.api.exchange.get_variable_handle

You're doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_variable_handle(
        state,
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

And you should be doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_actuator_handle(
        state,
        "Schedule:Compact", 
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

I would suggest you look at PythonPluginCustomSchedule.py / PythonPluginCustomSchedule.idf as a starting point.

From a cursory look, I think you're just using the wrong method: it should be api.exchange.get_actuator_handle not self.api.exchange.get_variable_handle

.

For reference, your schedule in the IDF is a Schedule:Compact.

Schedule:Compact,
    COOLINGCOILAVAILSCHED,   !- Name
    [...];

You're doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_variable_handle(
        state,
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

And you and getting this error

 ** Severe  ** Handle not found for 'COOLINGCOILAVAILSCHED'
 **  Fatal  ** Python Plugin "PythonPluginUserDefinedWindACAuto.Zone1WinACModel" returned 1 to indicate EnergyPlus should abort

You should be doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_actuator_handle(
        state,
        "Schedule:Compact", 
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

And then your file will run to completion.

I would suggest you look at PythonPluginCustomSchedule.py / PythonPluginCustomSchedule.idf as a starting point.

From a cursory look, I think you're just using the wrong method: it should be api.exchange.get_actuator_handle not self.api.exchange.get_variable_handle.

Current problem

For reference, your schedule in the IDF is a Schedule:Compact.

Schedule:Compact,
    COOLINGCOILAVAILSCHED,   !- Name
    [...];

You're doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_variable_handle(
        state,
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

and getting this error

 ** Severe  ** Handle not found for 'COOLINGCOILAVAILSCHED'
 **  Fatal  ** Python Plugin "PythonPluginUserDefinedWindACAuto.Zone1WinACModel" returned 1 to indicate EnergyPlus should abort

Solution

You should be doing

    self.handles["COOLINGCOILAVAILSCHED"] = self.api.exchange.get_actuator_handle(
        state,
        "Schedule:Compact", 
        "Schedule Value",
        "COOLINGCOILAVAILSCHED"
    )

And then your file will run to completion.