-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: develop
Are you sure you want to change the base?
Conversation
… instead of old concrete LinearProblemData
@@ -28,20 +28,33 @@ | |||
namespace Antares::Solver::Modeler::Api | |||
{ | |||
|
|||
class LinearProblemData | |||
class ILinearProblemData |
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.
Interface class ILinearProblemData was created here, but it should be eventually moved in a separate header file.
The current location (solver/modeler/api) seems the right place for this header file, because this interface belongs to and should be defined where the contract it represents is actually required : class LinearProblemBuilder and class LinearProblemFiller
unsigned int hour) = 0; | ||
}; | ||
|
||
class LinearProblemData : public ILinearProblemData |
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.
About where we should put class LinearProblemData (which is a implementation of interface ILinearProblemData) :
We should take this page (see part 3) into account.
Possible location candidates are :
- src/study/data-series
- src/data-series
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.
With legacy code?
I’d rather create a specific implementation in that place.
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.
We have a target of a new source file architecture here.
I guess handling new modeler data should go to one of sub directory suggested above, whether we mix legacy code or not.
To be decided.
It would be a good idea to write some tests that demonstrate the use cases of the new interface. |
… LinearProblemData We plan to have one unique instance this latter class
…ion from its abstract parent
include/antares/solver/modeler/api/linearProblemFiller.h | ||
include/antares/solver/modeler/api/linearProblemBuilder.h | ||
|
||
linearProblemData.cpp |
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.
class LinearProblemData was moved from here (src/solver/modeler/api) to src/solver/modeler/dataSeries
namespace Antares::Solver::Modeler::Api | ||
{ | ||
|
||
class ILinearProblemData |
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.
Concrete class LinearProblemData now inherits from abstract class ILinearProblemData
testModelerLinearProblemWithOrtools.cpp | ||
testModelerLPbuilder.cpp | ||
INCLUDE | ||
"${src_solver_optimisation}" |
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.
src_solver_optimisation does not seem to be useful, we remove it
test_readLinearExpressionVisitor.cpp | ||
test_readLinearConstraintVisitor.cpp | ||
INCLUDE | ||
"${src_solver_optimisation}" |
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.
src_solver_optimisation does not seem to be useful, we remove it
class DataSeriesRepository | ||
{ | ||
public: | ||
void addDataSeries(std::unique_ptr<IDataSeries> dataSeries); |
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.
About void addDataSeries(...)
: forces to std::move a unique pointer defined outside.
So the client IDataSeries gets empty after this call.
I thought it's suitable, as data series have to end up inside the data series repository and seem useless somewhere else.
|
||
namespace Antares::Solver::Modeler::DataSeries | ||
{ | ||
class TimeSeriesSet: public IDataSeries |
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.
Class TimeSeriesSet is supposed to be out of epic 4.1's scope.
But we needed a concrete child of IDataSeries in order to unit test other classes (for instance DataSeriesRepository).
This class can end up not required and removed at some point.
It comes with unit tests (see testTimeSeriesSet.cpp).
#include <antares/solver/modeler/loadFiles/loadFiles.h> | ||
#include <antares/solver/modeler/ortoolsImpl/linearProblem.h> | ||
#include <antares/solver/modeler/parameters/parseModelerParameters.h> | ||
#include <antares/solver/optim-model-filler/ComponentFiller.h> | ||
|
||
#include "../optimisation/include/antares/solver/optimisation/LegacyFiller.h" |
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.
We take advantage of resolving conflicts to remove unnecessary code
Quality Gate passedIssues Measures |
Associated to epic 4.1.
Associated to ticket ANT-2031