Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::ComputeInfeasibleSubsystemArguments Struct Reference

Arguments passed to ComputeInfeasibleSubsystem() to control the solver. More...

#include <compute_infeasible_subsystem_arguments.h>

Public Attributes

SolveParameters parameters
 Model independent parameters, e.g. time limit.
 
MessageCallback message_callback = nullptr
 
const SolveInterrupterinterrupter = nullptr
 

Detailed Description

Arguments passed to ComputeInfeasibleSubsystem() to control the solver.

Definition at line 24 of file compute_infeasible_subsystem_arguments.h.

Member Data Documentation

◆ interrupter

const SolveInterrupter* operations_research::math_opt::ComputeInfeasibleSubsystemArguments::interrupter = nullptr

An optional interrupter that the solver can use to interrupt the solve early.

Usage: auto interrupter = std::make_shared<SolveInterrupter>();

///< Use another thread to trigger the interrupter. RunInOtherThread([interrupter](){ ... wait for something that should interrupt the solve ... interrupter->Interrupt(); });

ASSIGN_OR_RETURN(const ComputeInfeasibleSubsystemResult result, ComputeInfeasibleSubsystem(model, SolverType::kGurobi, { .interrupter = interrupter.get() });

Definition at line 62 of file compute_infeasible_subsystem_arguments.h.

◆ message_callback

MessageCallback operations_research::math_opt::ComputeInfeasibleSubsystemArguments::message_callback = nullptr

An optional callback for messages emitted by the solver.

When set it enables the solver messages and ignores the enable_output in solve parameters; messages are redirected to the callback and not printed on stdout/stderr/logs anymore.

See PrinterMessageCallback() for logging to stdout/stderr.

Usage:

///< To print messages to stdout with a prefix. ASSIGN_OR_RETURN( const ComputeInfeasibleSubsystemResult result, ComputeInfeasibleSubsystem(model, SolverType::kGurobi, { .message_callback = PrinterMessageCallback(std::cout, "logs| "); });

Definition at line 44 of file compute_infeasible_subsystem_arguments.h.

◆ parameters

SolveParameters operations_research::math_opt::ComputeInfeasibleSubsystemArguments::parameters

Model independent parameters, e.g. time limit.

Definition at line 26 of file compute_infeasible_subsystem_arguments.h.


The documentation for this struct was generated from the following file: