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

[ANT-2299] Enable save/restore with xpress and enable by default #959

Draft
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

JasonMarechal25
Copy link
Contributor

Expend solver API with save_prob and restore_prob. Mirror Xpress API to save and restore problems

Coin solvers lack save/restore options. Using those method default to writing mps files

Copy link
Contributor

@tbittar tbittar left a comment

Choose a reason for hiding this comment

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

Note that when writing the master problem at the end of each iteration, we still use write_prob_mps (which is further read in sensitivity analysis with read_prob_mps), should we keep it like this or use save/restore as well here ?

@@ -45,6 +45,13 @@ std::function<int(XPRSprob prob, const char* filename, const char* flags)>
XPRSwritebasis = nullptr;
std::function<int(XPRSprob prob, const char* filename, const char* flags)>
XPRSreadprob = nullptr;
std::function<int(XPRSprob prob, int nr, int nc, const int mrow[],
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to this PR, but needed later for presolve

@@ -10,3 +10,9 @@ void Problem::read_prob_mps(const std::filesystem::path& filename) {
std::tie(mc_year, week) = McYearAndWeek(filename);
solver_abstract_->read_prob_mps(filename);
}
void Problem::save_prob(const std::filesystem::path& filename) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to do std::tie(mc_year, week) = McYearAndWeek(filename); similarly as in the previous function ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe, will need to check

@pull-request-size pull-request-size bot added size/XL and removed size/L labels Nov 6, 2024
@JasonMarechal25 JasonMarechal25 marked this pull request as draft November 12, 2024 09:21
@@ -0,0 +1,5 @@
#include "gtest/gtest.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to remove

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