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

Empty Measures Directory [closed]

asked 2023-12-05 11:01:45 -0600

IanVG's avatar

I found that even after I have downloaded and successfully run Measures on OpenStudio, that the measures directory remains empty. What is the function of the Measures Directory, if the location that the utilized measures is not the same as the Measures Directory? Secondly - how can I find where the measures are currently being run from?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by IanVG
close date 2023-12-07 09:21:17.363197

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-12-06 17:41:28 -0600

updated 2023-12-06 17:48:27 -0600

You seem to be confusing two different things (but that's totally understandable):

  • The BCL Measures. Locally they are typically at ~/BCL. When you download a measure from the online BCL, it goes in there
  • The "My Measures Directory". This is a convenience thing provided by the OpenStudio Application (and PAT). It's typically at ~/OpenStudio/Measures. That's where you put the measures you create yourself.

In the OpenStudio Application when you drag any measure (BCL or your own) to your model, the measure is copied to the measures subdirectory in your companion directory (= if your model is named "my_model.osm", there is a "my_model/" folder next to it). So they will run from there.

Generally speaking, the definitive source is to look at the WorkflowJSON file you used to run your workflow (workflow.osw file in your companion directory for OSApp). If you don't see any added paths there, the standard paths are used. (that'd be ./measures, ../../measuresand ., where . is the directory of the workflow.osw))


Too much information (?):

Behind the scenes, the SDK has three things of interest:

  • The RemoteBCL: used to lookup online measures
  • The LocalBCL, to interact with the downloaded BCL Measures
  • The MeasureManager, which is used to get information about a measure (the type of the measure, it's name, description, etc), compute arguments for your model, etc.

std::vector<BCLMeasure> BCLMeasure::getMeasuresInDir(path) is used on your "My Measures Dir" (it loops on all subdirectories and try to load BCLMeasure (meaning there's a measure.xml and a measure.rb/.py at least).

BCL Measures and your own measures are passed to the MeasureManager which will compute the info.

BCL Measures in your local ~/BCL measures are in a folder structure like this ~/BCL/<uid>/<version_id> (check the measure.xml and you'll see it matches). There's also a ~/BCL/components.sqlthat stores some relevant information about which BCL measures and components you have. BCL Measures can be updated: by matching the uid of the measures with the content of the (online) RemoteBCL, if the version_id does not match between your local copy and the online one, you know it's outdated.

edit flag offensive delete link more

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2023-12-05 11:01:45 -0600

Seen: 146 times

Last updated: Dec 07 '23