Skip to main content

with_solver_family

Function with_solver_family 

Source
pub fn with_solver_family<T>(
    solver_family: SolverFamily,
    f: impl FnOnce() -> T,
) -> T
Expand description

Runs f as a rewrite for solver_family, then restores the surrounding solver context.

Some rewrites build and solve a temporary model with a different backend from the outer model. Representation applicability must follow the backend that will actually consume that temporary model, not the user’s outer solver setting.