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

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

asked 4 years ago

ep_user's avatar

updated 4 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

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.

Preview: (hide)
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  ( 4 years ago )

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  ( 4 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 203 times

Last updated: Feb 03 '21