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

What could cause a measure to run fine in Apply Now but fail in PAT?

asked 2015-08-14 09:59:00 -0600

updated 2017-08-20 15:04:28 -0600

I wrote a measure than runs perfectly on the model itself when I use "Apply Now".

But when I run it in PAT, I get an error.

I've been opening the model, and running each of the measures in the same exact order I have in the given package, and it works alright.

Here's the full error log

Interestingly enough, I used to run the same PAT in 1.7.0 no problem.

Also, in this package, I actually call the measure twice (I have a suffix modifier for the thermal zones to affect), the first one is ok, the second crashes.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2015-08-14 10:22:54 -0600

updated 2015-08-14 10:29:36 -0600

Looking at the error log, it seems like the coolingCapacityFunctionOfTemperature() curve on a ChillerElectricEIR object is deleted before the ChillerElectricEIR. What happens is that when ChillerElectricEIR is deleted it tries to delete it's children (curves) and the way the coolingCapacityFunctionOfTemperature() function is written, if it doesn't find its associated curve it will crash.

A common cause of this issue (and one i've had happen to me as well) is if you share curves between objects. You should never use a curve on more than one object or even for different fields in the same object. Curves do not behave like Schedules in OpenStudio. This will for sure cause the above error.

What happens is that an object will delete itself and all curves, regardless if that curve is used elsewhere. Then when you go to delete a different object that was using that same curve, it tries to delete that curve again but it is no longer valid and will crash OpenStudio.

If you are using the GUI only, this kind of error should never happen and is definitely a bug if it does. If you are using measures and the API then it is possible and likely for this crash to happen if you are not careful.

If you are not sharing curves between objects then something else in your measure is deleting the curve before the ChillerElectricEIR is deleted. Without seeing the measure it is hard to know for sure.

edit flag offensive delete link more

Comments

I am DEFINITELY sharing curves between my two chillers (I've set them through a measure I just uploaded to BCL...that I'll need to fix then :D). I didn't think it was a problem.

This is actually something I don't like with OpenStudio, the fact that it creates unique objects a lot of time that are purely identical. If I want to modify one coefficient I have to do for each of them.

I'll try to duplicate my objects and see if it solves the problem.

Thanks for your help @MarkAdams

Julien Marrec's avatar Julien Marrec  ( 2015-08-14 10:26:55 -0600 )edit
1

At the risk of exposing the fact that we have been sitting on the curve sharing problem for a while, here is the pertinent GitHub issue. The issue for me with sharing curves is that it doesn't really fit well in a future where we model real equipment and data comes out of TPEX or similar. To me curves are intrinsic to a unit of hardware and not something that really should be shared despite their bulk. I can see the issue if you have two of the exact same chillers not sharing presents some annoyance.

Kyle Benne's avatar Kyle Benne  ( 2015-08-14 10:41:00 -0600 )edit

This was it @MarkAdams, thanks for your help. I duplicated said curves and assigned a unique one to each chiller.

Julien Marrec's avatar Julien Marrec  ( 2015-08-14 11:01:40 -0600 )edit
5

answered 2015-08-14 16:15:01 -0600

I know this is not the answer to this specific case, but in general my answer would be "other measures". When you run a measure in Apply Measures now no other measures get applied. However, if you run as part of a workflow containing other measures then there may be interactions between measures that could cause failures.

edit flag offensive delete link more

Comments

I agree with this statement. You should always be careful to not try to modify an equipment in a measure that was actually removed by a previous one.

Julien Marrec's avatar Julien Marrec  ( 2015-08-15 04:49:29 -0600 )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

2 followers

Stats

Asked: 2015-08-14 09:59:00 -0600

Seen: 239 times

Last updated: Aug 14 '15