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

What is the solution to the SWIG error in this simulation run? I tried adding two measures Add Meter and ExportMetertoCSV.

asked May 14

Mike117's avatar

updated May 14

I have tried fixing some of the inputs to the measures, but the error persists. Image of error below.

I am trying to report Electricity:HVAC or anything that resembles HVAC demand for both cooling and heating.

image description

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered May 14

updated May 14

The measure crashes here, as it's trying to access an uninitialized variable. The measure does however log 2 prior messages that are relevant here: one error (in dark red in the screenshot), one warning (pinkish). Both messages are reporting that the measure is unable to locate the meter "Electricity:HVAC". Double-check the OSM?

Should the measure crash this way? IMHO, no: it should have returned false (right after logging the first error message), forcing the measure to safely exit without crashing. I would label this as a minor frontend bug, but it doesn't change the fact that the measure remains unable to locate the requested meter. There are safer ways around this, such as offering users a drop-down list of available meters actually found in the OSM file, but that's another topic.

Preview: (hide)
link

Comments

How do I add a meter object in the openstudio application?

I fixed my issue by applying the Add Meter measure first running the simulation then adding the ExportMetertoCSV measure. It worked this way which is weird. I have the meters that I want reporting out.

Mike117's avatar Mike117  ( May 14 )

With the App, I think one needs the Add Meter Measure or similar (as you've tried out). Alternatives are SDK-based scripts, like here, which I prefer. Otherwise, one can always hack the .osm file directly with a text editor - meters are simple objects.

Denis Bourgeois's avatar Denis Bourgeois  ( May 14 )

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: May 14

Seen: 141 times

Last updated: May 14 '24