Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <cp_model_search.h>
Public Member Functions | |
CpModelView (Model *model) | |
int | NumVariables () const |
The valid indices for the calls below are in [0, num_variables). | |
bool | IsFixed (int var) const |
Getters about the current domain of the given variable. | |
int64_t | Min (int var) const |
int64_t | Max (int var) const |
BooleanOrIntegerLiteral | GreaterOrEqual (int var, int64_t value) const |
Helpers to generate a decision. | |
BooleanOrIntegerLiteral | LowerOrEqual (int var, int64_t value) const |
BooleanOrIntegerLiteral | MedianValue (int var) const |
This class allows to query information about the current bounds of the loaded cp_model.proto variables during the search. It is a "view" of the current solver state using the indices of the proto.
Definition at line 43 of file cp_model_search.h.
|
explicit |
Definition at line 49 of file cp_model_search.cc.
BooleanOrIntegerLiteral operations_research::sat::CpModelView::GreaterOrEqual | ( | int | var, |
int64_t | value ) const |
Helpers to generate a decision.
Definition at line 87 of file cp_model_search.cc.
bool operations_research::sat::CpModelView::IsFixed | ( | int | var | ) | const |
Getters about the current domain of the given variable.
Definition at line 57 of file cp_model_search.cc.
BooleanOrIntegerLiteral operations_research::sat::CpModelView::LowerOrEqual | ( | int | var, |
int64_t | value ) const |
Definition at line 103 of file cp_model_search.cc.
int64_t operations_research::sat::CpModelView::Max | ( | int | var | ) | const |
Definition at line 77 of file cp_model_search.cc.
BooleanOrIntegerLiteral operations_research::sat::CpModelView::MedianValue | ( | int | var | ) | const |
5 values -> returns the second. 4 values -> returns the second too. Array is 0 based.
Definition at line 119 of file cp_model_search.cc.
int64_t operations_research::sat::CpModelView::Min | ( | int | var | ) | const |
Definition at line 67 of file cp_model_search.cc.
int operations_research::sat::CpModelView::NumVariables | ( | ) | const |
The valid indices for the calls below are in [0, num_variables).
Definition at line 55 of file cp_model_search.cc.