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

Add optimization options in OR-Tools / XPRESS, refactor #1837

Merged
merged 44 commits into from
May 16, 2024

Conversation

flomnes
Copy link
Member

@flomnes flomnes commented Dec 21, 2023

This PR allows the user to specify solver specific parameters from the command line. The work on basis manipulation is deferred to a subsequent PR.

This PR adds a command-line argument :

  • --solver-parameters="param1 value1 param2 value2" to specify solver specific parameters

The parameter syntax is solver specfic, and the user should refer to the specific solver documentation to know how to set the wanted parameters. PR #2042 will give some explicit examples.

Allow the user to change the following properties

  • Presolve (using solver specific parameters)
  • Scaling (using solver specific parameters)
  • Use basis for 1st resolution
  • Use basis for 2nd resolution
  • Primal tolerance
  • Dual tolerance
  • Any solver specific parameters (with subtle cases of ORTools generic parameters that will override them)
  • I/O for generaldata.ini
  • Add docs

Use a single structure for all these options.

Copy link

watermelon-copilot-for-code-review bot commented Dec 21, 2023

Watermelon AI Summary

AI Summary deactivated by flomnes

GitHub PRs

Antares_Simulator is an open repo and Watermelon will serve it for free.
🍉🫶
Why not invite more people to your team?

@@ -241,7 +241,14 @@ static SimplexResult OPT_TryToCallSimplex(
if (options.useOrtools)
{
const bool keepBasis = (optimizationNumber == PREMIERE_OPTIMISATION);
solver = ORTOOLS_Simplexe(&Probleme, solver, keepBasis);
solver = ORTOOLS_Simplexe(&Probleme,
Copy link
Contributor

Choose a reason for hiding this comment

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

this is getting long, we could create an appropriate struct for ortools/solver options

Copy link
Contributor

Choose a reason for hiding this comment

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

OptimizationOptions?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had the same idea, without reading your comment. See these 2 consecutive commits

@flomnes flomnes marked this pull request as ready for review April 9, 2024 13:06
@tbittar tbittar removed their request for review May 6, 2024 15:31
@tbittar tbittar requested review from a-zakir and a team and removed request for payetvin, guilpier-code and a-zakir May 6, 2024 15:51
@tbittar tbittar force-pushed the fix/xpress-perf branch from e7bd857 to b8a1128 Compare May 16, 2024 08:42
Copy link
Member Author

@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.

We're close ! A few additional comments

src/solver/utils/ortools_utils.cpp Outdated Show resolved Hide resolved
Copy link
Member Author

@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.

checkOrtoolsSolverSpecificParameters is declared twice, but never defined or used. Please remove it.

Copy link
Member Author

@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.

Also, failure occurs way too late. Solver specific parameters should be check at the start, not in ORTOOLS_Simplexe (during the simulation)

@tbittar
Copy link
Contributor

tbittar commented May 16, 2024

Yes, this was already discussed in #1837 (comment)

@flomnes flomnes merged commit 79c3903 into develop May 16, 2024
5 checks passed
@flomnes flomnes deleted the fix/xpress-perf branch May 16, 2024 16:07
Copy link

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.

4 participants