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

#include <integer_search.h>

Public Attributes

std::vector< std::function< BooleanOrIntegerLiteral()> > decision_policies
 
std::vector< std::function< bool()> > restart_policies
 
int policy_index
 Index in the vectors above that indicate the current configuration.
 
std::function< BooleanOrIntegerLiteral()> user_search = nullptr
 Contains the search specified by the user in CpModelProto.
 
std::function< BooleanOrIntegerLiteral()> heuristic_search = nullptr
 
std::function< BooleanOrIntegerLiteral()> integer_completion_search = nullptr
 Default integer heuristic that will fix all integer variables.
 
std::function< BooleanOrIntegerLiteral()> fixed_search = nullptr
 Fixed search, built from above building blocks.
 
std::function< BooleanOrIntegerLiteral()> hint_search = nullptr
 
std::function< BooleanOrIntegerLiteral()> next_decision_override = nullptr
 

Detailed Description

Model struct that contains the search heuristics used to find a feasible solution to an integer problem.

This is reset by ConfigureSearchHeuristics() and used by SolveIntegerProblem(), see below.

Definition at line 77 of file integer_search.h.

Member Data Documentation

◆ decision_policies

std::vector<std::function<BooleanOrIntegerLiteral()> > operations_research::sat::SearchHeuristics::decision_policies

Decision and restart heuristics. The two vectors must be of the same size and restart_policies[i] will always be used in conjunction with decision_policies[i].

Definition at line 81 of file integer_search.h.

◆ fixed_search

std::function<BooleanOrIntegerLiteral()> operations_research::sat::SearchHeuristics::fixed_search = nullptr

Fixed search, built from above building blocks.

Definition at line 102 of file integer_search.h.

◆ heuristic_search

std::function<BooleanOrIntegerLiteral()> operations_research::sat::SearchHeuristics::heuristic_search = nullptr

Heuristic search build after introspecting the model. It can be used as a replacement of the user search. This can include dedicated scheduling or routing heuristics.

Definition at line 96 of file integer_search.h.

◆ hint_search

std::function<BooleanOrIntegerLiteral()> operations_research::sat::SearchHeuristics::hint_search = nullptr

The search heuristic aims at following the given hint with minimum deviation.

Definition at line 106 of file integer_search.h.

◆ integer_completion_search

std::function<BooleanOrIntegerLiteral()> operations_research::sat::SearchHeuristics::integer_completion_search = nullptr

Default integer heuristic that will fix all integer variables.

Definition at line 99 of file integer_search.h.

◆ next_decision_override

std::function<BooleanOrIntegerLiteral()> operations_research::sat::SearchHeuristics::next_decision_override = nullptr

Some search strategy need to take more than one decision at once. They can set this function that will be called on the next decision. It will be automatically deleted the first time it returns an empty decision.

Definition at line 111 of file integer_search.h.

◆ policy_index

int operations_research::sat::SearchHeuristics::policy_index

Index in the vectors above that indicate the current configuration.

Definition at line 85 of file integer_search.h.

◆ restart_policies

std::vector<std::function<bool()> > operations_research::sat::SearchHeuristics::restart_policies

Definition at line 82 of file integer_search.h.

◆ user_search

std::function<BooleanOrIntegerLiteral()> operations_research::sat::SearchHeuristics::user_search = nullptr

Contains the search specified by the user in CpModelProto.

Special decision functions that are constructed at loading time. These are used by ConfigureSearchHeuristics() to fill the policies above.

Definition at line 91 of file integer_search.h.


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