-
Notifications
You must be signed in to change notification settings - Fork 8
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
Change disconnected sensitivities management #236
Conversation
…cted component Signed-off-by: Gael Macherel <gael.macherel@artelys.com>
59b593d
to
393137d
Compare
enum Status { | ||
VALID, | ||
SKIP, | ||
NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this enum value, just use a null status
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, null and Status.NULL would represent two different things:
- If the status is Status.NULL, it means that the value for this sensitivity factor will be null (0), because it is a sensitivity on a disconnected branch
- if the status is null (meaning: the sensitivity factor has no value), then this is a bug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here NULL means zero. this make me think it is NULL as null in Java so an enum with a mix of business and technical values which is a bad practice
Signed-off-by: Gael Macherel <gael.macherel@artelys.com>
@Djazouli I just tested, it works very well, but it is quite verbose. When a transformer is disconnected and is the variable of many factors we end up with as many warn as functions for this variables. Maybe we can in this skip have just one warning saying: "skipping all factors with variable ..." ? |
Signed-off-by: Gael Macherel <gael.macherel@artelys.com>
Kudos, SonarCloud Quality Gate passed! |
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restDo not throw an error if we are asking a sensitivity on a component that is not in the network