2

what is the key value for built-in variable: ActualDateAndTime, CurrentTime, ActualTime?

I am trying to get the handle of build-in variables for: ActualDateAndTime, CurrentTime, ActualTime.

I am using:

handle =  self.api.exchange.get_internal_variable_handle(state, CurrentTime, key_value).

Where i can find those key-values? Thanks.

ep_user's avatar
151
ep_user
asked 2021-02-02 21:48:23 -0500
shorowit's avatar
11.8k
shorowit
updated 2021-02-03 07:57:45 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

You seem to be confusing built-in variables with internal variables.

Internal variables are specific to an EnergyPlus object and therefore require a variable_type and a variable_key using self.api.exchange.get_internal_variable_handle(state, variable_type, variable_key).

Built-in variables like ActualDateAndTime are unrelated to EnergyPlus objects. The Data Transfer API provides specific methods for each. For example, you'd use self.api.exchange.actual_date_time(state) to get ActualDateAndTime.

You can read more about built-in variables and internal variables in the EMS Application Guide.

shorowit's avatar
11.8k
shorowit
answered 2021-02-03 07:21:15 -0500
edit flag offensive 0 remove flag delete link

Comments

1

thanks! I appreciate that. It looks like the outputs for ActualDateAndTime, CurrentTime, ActualTime are integers. I am looking for some outputs like: 2/1/2020 3:00:00. Is it doable?

ep_user's avatar ep_user (2021-02-03 10:54:14 -0500) edit

It looks like the outputs for ActualDateAndTime, CurrentTime, ActualTime are all integer values. I am expecting something to be like: 5/1/2020 9:05:00. Is it doable?

ep_user's avatar ep_user (2021-02-03 12:27:57 -0500) edit
add a comment see more comments