Skip to content

Alfalfa EnergyPlus Mixin Methods

Tobias Shapinsky edited this page Jun 21, 2023 · 2 revisions

create_enabled_input(name, variable_name, default="Null")

Create enabled input to actuate an EMS variable. This method creates an external variable with the specified name and an EMS program to copy the value to the specified variable if enabled or the default value otherwise

Arguments

  • name Name of input to create
  • variable_name EMS name of variable to control
  • default Value to have when not enabled. Default to null for actuator control

Return Returns an Input with an enable_variable property. The Input can then be registered with Alfalfa.

create_actuator(name, component, component_type, control_type, external=false)

Create an Actuator

Arguments

  • name Name of actuator to create
  • component Name of component to actuate
  • component_type Type of component
  • control_type Type of control
  • external When true an external interface variable with name will be created and returned

Return If external is true a tuple of (Input,Output) is returned Otherwise a WorkspaceObject

create_external_variable(name, initial_value = 0)

Create External Interface Variable.

Arguments

  • name Name of external variable to create
  • initial_value Initial value of external variable

Return Returns an Input corresponding to the external variable

create_ems_output_variable(name, variable, unit = 'C')

Create EMS Output Variable

Arguments

  • name Name of EMS Output Variable to create
  • variable EMS name of variable to connect to Output Variable
  • unit Unit of output

Return Returns an Output corresponding to the ems variable

create_output_variable(key, var)

Create EMS Output Variable

Arguments

  • key Key of Output Variable
  • var Variable of Output Variable

Return Return an Output corresponding to the Output Variable

get_node_from_nodelist(node)

Get first node from NodeList

Arguments

  • node Nodelist id

Return Return first node in list


Model Configuration

Openstudio

Tutorials

Guides

Reference

Modelica

Guides

Alfalfa Interaction

Tutorials

Guides

Reference

Explanation

Alfalfa Development

Guides

General

Reference

Explanation

Clone this wiki locally