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

Uninitialized constant OpenStudio:Runmanager

asked 7 years ago

antonszilasi's avatar

updated 7 years ago

Dear all,

Either there is something very wrong here or I am missing something very basic and I apologize, I am trying to run the following line of code to test a measure.

# class level variable @@co = OpenStudio::Runmanager::ConfigOptions.new(true)

Unfortunately, I get the error back: in `<class:pushcustomresultstomongodb_test>': uninitialized constant OpenStudio::Runmanager (NameError) (see attached screenshot).

I have 'required openstudio' so ruby should be able to access the constructor for this class from the openstudio SDK. What am I doing wrong here?

Many thanks

image description

Preview: (hide)

Comments

Are you using OpenStudio 2.x?

ljbrackney's avatar ljbrackney  ( 7 years ago )

If you are using 2.x, and create a new reporting measure using the interface it will have a test that is capable of running simulations with the CLI instead of run-manager. I'll make a note to update our web-documentation for this which appears to still show 1.x test code.

David Goldwasser's avatar David Goldwasser  ( 7 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 7 years ago

updated 7 years ago

If you are using OpenStudio 2.x then RunManager has been deprecated in lieu of the OpenStudio CLI. That test code would need to be rewritten to call the CLI.

Preview: (hide)
link

Comments

@ljbrackney yes I am using openstudio 2.x can you please provide an example of rewriting the test code to call CLI?

antonszilasi's avatar antonszilasi  ( 7 years ago )

@antonszilasithis link is to the template reporting measure test you get when you make a new reporting measure in 2.x OpenStudio. It is setup to run both on 1x and 2x.

David Goldwasser's avatar David Goldwasser  ( 7 years ago )

The first 130 lines are boilerplate methods, just replace the test itself which is on these lines. Only a few lines even in this section need to be changed.

David Goldwasser's avatar David Goldwasser  ( 7 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: 7 years ago

Seen: 478 times

Last updated: May 18 '17