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 2024-05-14 01:12:30 -0500

Mike117's avatar

updated 2024-05-14 07:15:07 -0500

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2024-05-14 05:11:14 -0500

updated 2024-05-14 07:54:19 -0500

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.

edit flag offensive delete link more

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  ( 2024-05-14 10:35:39 -0500 )edit

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  ( 2024-05-14 11:37:27 -0500 )edit

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: 2024-05-14 01:12:30 -0500

Seen: 79 times

Last updated: May 14