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

Call to solver : trial for simplification #2452

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
54d88cb
Remove Sirius direct call : all developments in one
guilpier-code Oct 2, 2024
4fb3544
Remove Sirius direct call : more tests on CI
guilpier-code Oct 2, 2024
1bb4a6c
Remove Sirius direct call : clang format
guilpier-code Oct 2, 2024
8b5f1cc
Remove Sirius direct call : cucumber is adapted to current changes (C…
guilpier-code Oct 4, 2024
27fc92e
Trial to simplify solver call : solver ptr a bit more clear
guilpier-code Oct 4, 2024
a4f1d80
Trial to simplify solver call : crash correction
guilpier-code Oct 4, 2024
c8d5896
Trial to simplify solver call : omission in previous commit corrected
guilpier-code Oct 4, 2024
343f2d8
Trial to simplify solver call : correct a crash on infeasible problems
guilpier-code Oct 7, 2024
91de738
Trial to simplify solver call : try to improve solver liberation
guilpier-code Oct 7, 2024
ef66d4c
Trial to simplify solver call : towards more improvement on solver li…
guilpier-code Oct 7, 2024
59348c7
Trial to simplify solver call : improve solvers passing among all run…
guilpier-code Oct 7, 2024
e36b6dd
Trial to simplify solver call : avoid code duplication in resetting s…
guilpier-code Oct 7, 2024
c2ab575
Trial to simplify solver call : no need to import basic status into c…
guilpier-code Oct 7, 2024
1b4ebd0
Trial to simplify solver call : for solver, case SPX_ERREUR_INTERNE i…
guilpier-code Oct 7, 2024
15851b6
Trial to simplify solver call : trial to remove status transfers betw…
guilpier-code Oct 7, 2024
668ce02
[skip ci] Revert "Trial to simplify solver call : trial to remove sta…
guilpier-code Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trial to simplify solver call : for solver, case SPX_ERREUR_INTERNE i…
…s impossible
guilpier-code committed Oct 7, 2024
commit 1b4ebd08e68b1bb0416b9611b16bd38ccd503441
22 changes: 7 additions & 15 deletions src/solver/optimisation/opt_appel_solveur_lineaire.cpp
Original file line number Diff line number Diff line change
@@ -196,23 +196,15 @@ static SimplexResult OPT_TryToCallSimplex(const OptimizationOptions& options,
ProblemeAResoudre->ExistenceDUneSolution = Probleme.ExistenceDUneSolution;
if (ProblemeAResoudre->ExistenceDUneSolution != OUI_SPX && PremierPassage)
{
if (ProblemeAResoudre->ExistenceDUneSolution != SPX_ERREUR_INTERNE)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We used to test ExistenceDUneSolution != SPX_ERREUR_INTERNE.
But ExistenceDUneSolution == SPX_ERREUR_INTERNE is impossible : indeed, ExistenceDUneSolution is given by ortools now, which does not know value SPX_ERREUR_INTERNE.

{
solver = ORTOOLS_LibererProbleme(solver);
solver = ORTOOLS_LibererProbleme(solver);

logs.info() << " Solver: Standard resolution failed";
logs.info() << " Solver: Retry in safe mode"; // second trial w/o scaling
logs.debug() << " solver: resetting";

return {.success = false,
.timeMeasure = timeMeasure,
.mps_writer_factory = mps_writer_factory};
}
logs.info() << " Solver: Standard resolution failed";
logs.info() << " Solver: Retry in safe mode"; // second trial w/o scaling
logs.debug() << " solver: resetting";

else
{
throw FatalError("Internal error: insufficient memory");
}
return {.success = false,
.timeMeasure = timeMeasure,
.mps_writer_factory = mps_writer_factory};
}
return {.success = true, .timeMeasure = timeMeasure, .mps_writer_factory = mps_writer_factory};
}