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

consistently return default drt constraints #3709

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nkuehnel
Copy link
Member

@nkuehnel nkuehnel commented Feb 4, 2025

@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

Copy link
Contributor

@paulheinr paulheinr left a 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))
Copy link
Contributor

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.

Copy link
Collaborator

@luchengqi7 luchengqi7 left a 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!

@jfbischoff jfbischoff enabled auto-merge February 18, 2025 09:17
@jfbischoff
Copy link
Collaborator

@nkuehnel I think you need to update the base branch for a merge

@nkuehnel
Copy link
Member Author

@jfbischoff yes, plz dont merge yet, I am thinking of changing it a bit further :)

@nkuehnel nkuehnel disabled auto-merge February 18, 2025 09:34
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

Successfully merging this pull request may close these issues.

4 participants