1

Empty Measures Directory [closed]

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?

IanVG's avatar
271
IanVG
asked 2023-12-05 11:01:45 -0500
edit flag offensive 0 remove flag reopen merge delete

Closed for the following reason "the question is answered, right answer was accepted" by IanVG 2023-12-07 09:21:17 -0500

Comments

add a comment see more comments

1 Answer

3

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.

Julien Marrec's avatar
29.7k
Julien Marrec
answered 2023-12-06 17:41:28 -0500, updated 2023-12-06 17:48:27 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments