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

Parameters for CallbackTest. More...

#include <callback_tests.h>

Public Member Functions

 CallbackTestParams (SolverType solver_type, bool integer_variables, bool add_lazy_constraints, bool add_cuts, absl::flat_hash_set< CallbackEvent > supported_events, std::optional< SolveParameters > all_solutions, std::optional< SolveParameters > reaches_cut_callback)
 

Public Attributes

SolverType solver_type
 The solver to test.
 
bool integer_variables
 True if the tests should be performed with integer variables.
 
bool add_lazy_constraints
 If the solver supports adding lazy constraints at the MIP_SOLUTION event.
 
bool add_cuts
 If the solver supports adding cuts at the event MIP_NODE.
 
absl::flat_hash_set< CallbackEventsupported_events
 The events that should be supported by the solver.
 
std::optional< SolveParametersall_solutions
 
std::optional< SolveParametersreaches_cut_callback
 

Friends

std::ostream & operator<< (std::ostream &out, const CallbackTestParams &params)
 

Detailed Description

Parameters for CallbackTest.

Definition at line 79 of file callback_tests.h.

Constructor & Destructor Documentation

◆ CallbackTestParams()

operations_research::math_opt::CallbackTestParams::CallbackTestParams ( SolverType solver_type,
bool integer_variables,
bool add_lazy_constraints,
bool add_cuts,
absl::flat_hash_set< CallbackEvent > supported_events,
std::optional< SolveParameters > all_solutions,
std::optional< SolveParameters > reaches_cut_callback )

Definition at line 74 of file callback_tests.cc.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const CallbackTestParams & params )
friend

Definition at line 108 of file callback_tests.cc.

Member Data Documentation

◆ add_cuts

bool operations_research::math_opt::CallbackTestParams::add_cuts

If the solver supports adding cuts at the event MIP_NODE.

Definition at line 96 of file callback_tests.h.

◆ add_lazy_constraints

bool operations_research::math_opt::CallbackTestParams::add_lazy_constraints

If the solver supports adding lazy constraints at the MIP_SOLUTION event.

Definition at line 93 of file callback_tests.h.

◆ all_solutions

std::optional<SolveParameters> operations_research::math_opt::CallbackTestParams::all_solutions

For a small feasibility problem (objective is zero) with <= 10 feasible solutions, ensure the solver finds all solutions.

Definition at line 103 of file callback_tests.h.

◆ integer_variables

bool operations_research::math_opt::CallbackTestParams::integer_variables

True if the tests should be performed with integer variables.

Definition at line 90 of file callback_tests.h.

◆ reaches_cut_callback

std::optional<SolveParameters> operations_research::math_opt::CallbackTestParams::reaches_cut_callback

Disable as much as possible of presolve, (solver) cuts, and heuristics, so that we can run a custom cut on this problem. Not setting this value will result in the test on adding cuts at event kMipNode not running.

Definition at line 108 of file callback_tests.h.

◆ solver_type

SolverType operations_research::math_opt::CallbackTestParams::solver_type

The solver to test.

Definition at line 87 of file callback_tests.h.

◆ supported_events

absl::flat_hash_set<CallbackEvent> operations_research::math_opt::CallbackTestParams::supported_events

The events that should be supported by the solver.

Definition at line 99 of file callback_tests.h.


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