-
Notifications
You must be signed in to change notification settings - Fork 24
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
8.8 solver parameters [ANT-2280] #2466
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.
maybe use the same exhaustive example to show both scip & xpress usages : Set solver-specific parameters, for instance --solver-parameters="THREADS 1 PRESOLVE 1" for XPRESS or --solver-parameters="parallel/maxnthreads 1, lp/presolving TRUE" for SCIP. Syntax is solver-dependent, and only supported for SCIP & XPRESS.
@@ -11,7 +11,7 @@ | |||
#include <antares/version.h> | |||
#include <antares/writer/writer_factory.h> | |||
|
|||
#include "signal-handling/public.h" | |||
#include "../signal-handling/public.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.
why?
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.
Indeed, why do we have this new magic inclusion, though no change here seems to call for this inclusion ?
@@ -6,7 +6,7 @@ | |||
#include <boost/test/unit_test.hpp> | |||
|
|||
#include <timeseries-numbers.h> | |||
#include "ts-generator/generator.h" | |||
#include "../../../../solver/ts-generator/generator.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.
why?
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.
update antares batch launcher script
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.
would like to have someone else's opinion on batchrun. rest is OK for me
@@ -19,6 +18,9 @@ add_subdirectory(io) | |||
add_subdirectory(exception) | |||
|
|||
add_subdirectory(sys) | |||
add_subdirectory(writer) | |||
|
|||
add_subdirectory(optimization-options) |
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.
Why do we add a directory src/libs/antares/optimization-options ?
We could add a folder src/solver/optimization-options instead, it would seem more natural, wouldn't it ?
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.
Parameters are related to study
@@ -24,12 +24,17 @@ | |||
** | |||
** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions | |||
*/ | |||
#include "antares/optimization-options/options.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.
Current header checkLoadedInputData.h doesn't seem to use types defined in antares/optimization-options/options.h.
The latter header should not be included here.
src/libs/antares/optimization-options/include/antares/optimization-options/options.h
Show resolved
Hide resolved
@@ -246,19 +127,13 @@ int main(int argc, char* argv[]) | |||
if (not finder.list.empty()) |
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 :
if (not finder.list.empty())
is useless : the loop over the found studies won't start if there are no study in the finder.
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.
Yeah but there will be no clear error message without this condition
|
||
// argv[0] => executable name | ||
// argv[1] => directory name | ||
for (int ii = 2; ii < argc; ii++) |
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.
-i / --input is no longer available as a batchrun command line option.
Is this intended ?
We now imply that the search directory is necessarily the first argument the user will give, and without the -i introduction.
I'm not sure of that.
I'm tempted to suggest the following command line pattern :
./batchrun -i <search dir> <the other args>
, if it's doable.
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.
indeed it only works if the study is given as the first arg
same behavior as develop, maybe open a ticket about it ?
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Following comments left here #2466
This pull request introduces several significant changes to the Antares project, focusing on adding support for solver-specific parameters and restructuring the optimization options. The key changes include the creation of a new
optimization-options
module, refactoring of existing code to use this module, and enhancements to error handling related to solver parameters.New Module Addition:
optimization-options
module to encapsulate all options related to optimization (src/libs/antares/optimization-options/*
). [1] [2]Code Refactoring:
StudyLoadOptions
andParameters
classes to use the newOptimizationOptions
structure for managing solver-related options (src/libs/antares/study/load-options.h
,src/libs/antares/study/load-options.cpp
,src/libs/antares/study/parameters.h
,src/libs/antares/study/parameters.cpp
). [1] [2] [3] [4]Error Handling Enhancements:
InvalidSolverSpecificParameters
exception to handle invalid solver-specific parameters (src/libs/antares/exception/LoadingError.hpp
,src/libs/antares/exception/LoadingError.cpp
). [1] [2]Documentation Updates:
--solver-parameters
option (docs/reference-guide/10-command_line.md
).Miscellaneous:
add_subdirectory(writer)
command inCMakeLists.txt
to ensure proper build order (src/libs/antares/CMakeLists.txt
). [1] [2]