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 2017-05-18 09:45:18 -0500

antonszilasi's avatar

updated 2017-05-18 09:48:03 -0500

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

edit retag flag offensive close merge delete

Comments

Are you using OpenStudio 2.x?

ljbrackney's avatar ljbrackney  ( 2017-05-18 10:27:27 -0500 )edit

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  ( 2017-05-18 10:31:03 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-05-18 10:27:54 -0500

updated 2017-05-18 10:31:45 -0500

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.

edit flag offensive delete link more

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  ( 2017-05-18 10:42:05 -0500 )edit

@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  ( 2017-05-18 12:23:10 -0500 )edit

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  ( 2017-05-18 12:25:01 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2017-05-18 09:45:18 -0500

Seen: 411 times

Last updated: May 18 '17