-
Notifications
You must be signed in to change notification settings - Fork 458
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
consistently return default drt constraints #3709
base: master
Are you sure you want to change the base?
Conversation
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.
Thank you for this hotfix!
public DrtOptimizationConstraintsSet addOrGetDefaultDrtOptimizationConstraintsSet() { | ||
Optional<DrtOptimizationConstraintsSet> drtOptParams = getDrtOptimizationConstraintsSets().stream() | ||
public DefaultDrtOptimizationConstraintsSet addOrGetDefaultDrtOptimizationConstraintsSet() { | ||
Optional<DefaultDrtOptimizationConstraintsSet> drtOptParams = getDrtOptimizationConstraintsSets().stream() | ||
.filter(params -> params.name.equals(defaultConstraintSet)) |
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.
If someone implements another type of DrtOptimizationConstraintSet
and assign "default" as name of this set, then this function would create another optimization constraint set with the name "default" and with the type DefaultDrtOptimizationConstraintSet
. Since we at VSP will probably never use other parameter sets than the Default...
one, this is okay I guess. But this can be confusing.
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.
Thanks for the update!
@nkuehnel I think you need to update the base branch for a merge |
@jfbischoff yes, plz dont merge yet, I am thinking of changing it a bit further :) |
@luchengqi7 @kainagel @paulheinr
Could you have a look at this PR?
This would remove the unnecessary cast to default constraints sets and still offer the flexibility to add additional constraints sets params.
see #3698 and #3311