Skip to content

MIP Worker Refactor#2886

Open
Opt-Mucca wants to merge 214 commits intolatestfrom
hmw-mt
Open

MIP Worker Refactor#2886
Opt-Mucca wants to merge 214 commits intolatestfrom
hmw-mt

Conversation

@Opt-Mucca
Copy link
Copy Markdown
Collaborator

No description provided.

galabovaa and others added 30 commits February 13, 2025 06:11
void undo(const HighsOptions& options, HighsSolution& solution,
HighsBasis& basis, const HighsInt report_col = -1) {
reductionValues.resetPosition();
HighsBasis& basis, const HighsInt report_col = -1,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is this needed? Don't the workers have separate postsolve stacks?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The workers don't have separate postsolve stacks. The current undo function is changing some global data structures, so you can't call undo on two different threads simultaneously.
This change is adding an argument so it does everything on copied data.

mipsolver->mipdata_->implications.rebuild(model->num_col_, newColIndex,
newRowIndex);
mipsolver->mipdata_->cutpool =
// TODO: Find a sensible way to do this
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Are you deleting the cut pool?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yup! This was done before and I didn't see a need to change the workflow.

I had to get creative here because the std::atomic in HighsCutPool. I didn't want to change cutpool to a ptr in HighsMipData either (wanted to keep it as a reference). I'm happy with any ideas here as I think the current thing looks ugly (even if it works).

@jajhall
Copy link
Copy Markdown
Member

jajhall commented Mar 15, 2026

@Opt-Mucca I've merged latest into this branch to see whether all the CI tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants