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

Data for modeler (epic 4.1) #2577

Open
wants to merge 36 commits into
base: develop
Choose a base branch
from

Conversation

guilpier-code
Copy link
Contributor

@guilpier-code guilpier-code commented Jan 14, 2025

Associated to epic 4.1.
Associated to ticket ANT-2031

@guilpier-code guilpier-code marked this pull request as draft January 14, 2025 08:40
@a-zakir
Copy link
Contributor

a-zakir commented Jan 14, 2025

It would be a good idea to write some tests that demonstrate the use cases of the new interface.

@guilpier-code guilpier-code marked this pull request as ready for review January 21, 2025 15:40
Copy link
Member

@flomnes flomnes left a comment

Choose a reason for hiding this comment

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

  • Use custom exceptions
  • No need to pass std::unique_ptr ?

@guilpier-code
Copy link
Contributor Author

guilpier-code commented Jan 22, 2025

  • No need to pass std::unique_ptr ?

As said here, passing std::unique_ptr is a way to force a piece of data to be held in one place only.
Once passed to another container with an add() method, the passed data gets empty outside the container, and the life time of the data becomes the life time of the container.
For example the data series repository is the only place to hold a IDataSeries (which can be a set of TS) because these IDataSeries were passed as std::unique_ptr .
Instead of storing a std::unique_ptr to a IDataSeries in the data series repo, we could point it with a reference or a classic pointer, but what's the point of that ?
Are we supposed to reuse external TS independently once they are stored in the LinearProblemData ?

src/solver/modeler/dataSeries/linearProblemData.cpp Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Use custom exceptions in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants