Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend exceptions on standards error messages for curves used on multiple objects #95

Closed
DavidGoldwasser opened this issue Dec 11, 2020 · 2 comments
Assignees

Comments

@DavidGoldwasser
Copy link
Contributor

DavidGoldwasser commented Dec 11, 2020

I want to add one more exception here for curves that are used by multiple objects which are valid but show up as an error.
https://github.com/NREL/openstudio-extension-gem/blob/develop/lib/openstudio/extension/core/os_lib_helper_methods.rb#L236

New code would be added to the end and look something like this
(msg.logMessage.include?('[openstudio.model.Curve] This Curve, Object of type ') && msg.logMessage.include?(' has multiple parents. Returning the first.'))

Below is an example fo the error I want to exclude
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 31' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 38' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 32' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 39' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 40' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 31' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 38' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 32' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 39' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 40' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 31' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 38' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 32' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 39' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 40' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 31' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 38' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Biquadratic' and named 'Curve Biquadratic 32' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 39' has multiple parents. Returning the first.
[openstudio.model.Curve] This Curve, Object of type 'OS:Curve:Quadratic' and named 'Curve Quadratic 40' has multiple parents. Returning the first.

@DavidGoldwasser
Copy link
Contributor Author

@kbenne @asparke2 and @mdahlhausen are you fine with this fix unless we have different fix in standards or in core OpenStudio.

I have hit this on a number of models, including some internal projects I'm working on.

@DavidGoldwasser DavidGoldwasser self-assigned this Dec 11, 2020
@asparke2
Copy link
Member

yeah, suppressing these messages seems fine to me. I think the real solution would be to fix whatever in the C++ is causing them in the first place, so probably worth filing a bug in OS so that maybe one day it will be addressed properly.

DavidGoldwasser added a commit that referenced this issue Feb 24, 2021
In the API a curve is a resources so the warnings about multiple parents is invalid and should not prevent a measure from running.
DavidGoldwasser added a commit that referenced this issue Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants