Skip to content

Refactor Osi solver creation and enable MibSModel extensions#163

Open
hlefebvr wants to merge 1 commit into
coin-or:stable/1.2from
hlefebvr:idol
Open

Refactor Osi solver creation and enable MibSModel extensions#163
hlefebvr wants to merge 1 commit into
coin-or:stable/1.2from
hlefebvr:idol

Conversation

@hlefebvr
Copy link
Copy Markdown

@hlefebvr hlefebvr commented May 4, 2026

Hi,

Description

This PR refactors all locations where an external Osi solver is created for bilevel feasibility checks or auxiliary problem solving. The solver creation logic is now centralized in a new method:

MibSModel::createFeasCheckSolver()

which returns a pointer to an OsiSolverInterface.

Changes

  • Centralize Osi solver creation into MibSModel::createFeasCheckSolver()
  • Make MibSModel extensible:
    • Mark the constructor as virtual
    • Mark createFeasCheckSolver() as virtual

Motivation

This change allows users to override the solver creation mechanism and plug in any OsiSolverInterface implementation, beyond those currently supported by MibS.

Impact

  • No change to existing behavior
  • Improves code organization and reduces duplication
  • Enables user-defined extensions via inheritance

Notes

This PR is purely a refactor with added extensibility and does not alter the current solving workflow.

Thanks,

Henri

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants