Skip to content

Conversation

@blegat
Copy link
Member

@blegat blegat commented Mar 5, 2021

This refactors the code of AbstractModel to make it more versatile.
Instead of having one field for each function type which contains a struct with one field for each set type, it now has a field constraints that contains one field for each function type, ...
As discussed in #1261, by changing the type of the constraints field, we can now target many more types of models.

The base is set to #1245 so that it shows the diff with that PR but this is going to be merged to master once #1245 is merged.

  • Add an option to hardcode the type of the fields in StructOfConstraints instead of adding them as type parameter as otherwise the type can be huge. This option will be used by @model.
  • If there is only one function or only one set, drop the corresponding layer of StructOfConstraint
  • Docs
  • Tests

@blegat blegat force-pushed the bl/vector_of_constraints branch from bb970bf to ddf9fe7 Compare March 7, 2021 10:29
@blegat blegat force-pushed the bl/struct_of_constraints branch 3 times, most recently from 86eabef to 72eeb41 Compare March 8, 2021 13:45
@blegat blegat force-pushed the bl/vector_of_constraints branch from ddf9fe7 to 3c29f6b Compare March 8, 2021 22:05
@blegat blegat force-pushed the bl/struct_of_constraints branch from 6ea998c to 50319cf Compare March 8, 2021 22:14
@blegat blegat mentioned this pull request Mar 9, 2021
7 tasks
@odow odow force-pushed the bl/vector_of_constraints branch from 3c29f6b to 8afdfe2 Compare March 10, 2021 21:31
Base automatically changed from bl/vector_of_constraints to master March 11, 2021 08:20
@blegat blegat force-pushed the bl/struct_of_constraints branch from 50319cf to 86138da Compare March 12, 2021 22:26
@blegat blegat requested a review from odow March 12, 2021 22:26
Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have some benchmarks for obvious performance regressions?

@blegat blegat mentioned this pull request Mar 14, 2021
Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the benchmarks. They're slightly slower, but I can tidy up after you've finished making large changes. It's probably just the precompile statements that need tweaking.

@blegat blegat merged commit 70b33f4 into master Mar 17, 2021
@blegat blegat deleted the bl/struct_of_constraints branch March 17, 2021 08:25
@blegat blegat added this to the v0.9.21 milestone May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants