![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
#include <integer.h>
Public Member Functions | |
| IntegerTrail (Model *model) | |
| IntegerTrail (const IntegerTrail &)=delete | |
| IntegerTrail & | operator= (const IntegerTrail &)=delete |
| ~IntegerTrail () final | |
| bool | Propagate (Trail *trail) final |
| void | Untrail (const Trail &trail, int literal_trail_index) final |
| absl::Span< const Literal > | Reason (const Trail &trail, int trail_index, int64_t conflict_id) const final |
| const IntegerReason & | IntegerConflict () |
| const IntegerReason & | GetIntegerReason (GlobalTrailIndex index, std::optional< IntegerValue > needed_bound) |
| IntegerVariable | NumIntegerVariables () const |
| void | ReserveSpaceForNumVariables (int num_vars) |
| IntegerVariable | AddIntegerVariable (IntegerValue lower_bound, IntegerValue upper_bound) |
| IntegerVariable | AddIntegerVariable (const Domain &domain) |
| const Domain & | InitialVariableDomain (IntegerVariable var) const |
| bool | UpdateInitialDomain (IntegerVariable var, Domain domain) |
| IntegerVariable | GetOrCreateConstantIntegerVariable (IntegerValue value) |
| int | NumConstantVariables () const |
| IntegerVariable | AddIntegerVariable () |
| IntegerValue | LowerBound (IntegerVariable i) const |
| IntegerValue | UpperBound (IntegerVariable i) const |
| const IntegerValue * | LowerBoundsData () const |
| bool | IsFixed (IntegerVariable i) const |
| IntegerValue | FixedValue (IntegerVariable i) const |
| IntegerValue | LowerBound (AffineExpression expr) const |
| IntegerValue | UpperBound (AffineExpression expr) const |
| IntegerValue | UpperBound (LinearExpression2 expr) const |
| bool | IsFixed (AffineExpression expr) const |
| IntegerValue | FixedValue (AffineExpression expr) const |
| IntegerLiteral | LowerBoundAsLiteral (IntegerVariable i) const |
| IntegerLiteral | UpperBoundAsLiteral (IntegerVariable i) const |
| IntegerLiteral | LowerBoundAsLiteral (AffineExpression expr) const |
| IntegerLiteral | UpperBoundAsLiteral (AffineExpression expr) const |
| bool | IntegerLiteralIsTrue (IntegerLiteral l) const |
| bool | IntegerLiteralIsFalse (IntegerLiteral l) const |
| bool | IsTrueAtLevelZero (IntegerLiteral l) const |
| IntegerValue | LevelZeroLowerBound (IntegerVariable var) const |
| IntegerValue | LevelZeroUpperBound (IntegerVariable var) const |
| IntegerValue | LevelZeroLowerBound (AffineExpression exp) const |
| IntegerValue | LevelZeroUpperBound (AffineExpression exp) const |
| IntegerValue | LevelZeroLowerBound (LinearExpression2 expr) const |
| IntegerValue | LevelZeroUpperBound (LinearExpression2 expr) const |
| bool | IsFixedAtLevelZero (IntegerVariable var) const |
| bool | IsFixedAtLevelZero (AffineExpression expr) const |
| IntegerValue | ConditionalLowerBound (Literal l, IntegerVariable i) const |
| IntegerValue | ConditionalLowerBound (Literal l, AffineExpression expr) const |
| IntegerValue | ConditionalUpperBound (Literal l, IntegerVariable i) const |
| IntegerValue | ConditionalUpperBound (Literal l, AffineExpression expr) const |
| void | RelaxLinearReason (IntegerValue slack, absl::Span< const IntegerValue > coeffs, std::vector< IntegerLiteral > *reason) const |
| void | AppendRelaxedLinearReason (IntegerValue slack, absl::Span< const IntegerValue > coeffs, absl::Span< const IntegerVariable > vars, std::vector< IntegerLiteral > *reason) const |
| void | RelaxLinearReason (IntegerValue slack, absl::Span< const IntegerValue > coeffs, std::vector< int > *trail_indices) const |
| void | RemoveLevelZeroBounds (std::vector< IntegerLiteral > *reason) const |
| ABSL_MUST_USE_RESULT bool | Enqueue (IntegerLiteral i_lit) |
| ABSL_MUST_USE_RESULT bool | Enqueue (IntegerLiteral i_lit, absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason) |
| ABSL_MUST_USE_RESULT bool | SafeEnqueue (IntegerLiteral i_lit, absl::Span< const IntegerLiteral > integer_reason) |
| ABSL_MUST_USE_RESULT bool | SafeEnqueue (IntegerLiteral i_lit, absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason) |
| ABSL_MUST_USE_RESULT bool | ConditionalEnqueue (Literal lit, IntegerLiteral i_lit, std::vector< Literal > *literal_reason, std::vector< IntegerLiteral > *integer_reason) |
| ABSL_MUST_USE_RESULT bool | Enqueue (IntegerLiteral i_lit, absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason, int trail_index_with_same_reason) |
| ABSL_MUST_USE_RESULT bool | EnqueueWithLazyReason (IntegerLiteral i_lit, int id, IntegerValue propagation_slack, LazyReasonInterface *explainer) |
| std::vector< Literal > & | ClearedMutableTmpLiterals () |
| std::vector< IntegerLiteral > & | ClearedMutableTmpIntegerLiterals () |
| ABSL_MUST_USE_RESULT bool | RootLevelEnqueue (IntegerLiteral i_lit) |
| ABSL_MUST_USE_RESULT bool | EnqueueLiteral (Literal literal, absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason) |
| ABSL_MUST_USE_RESULT bool | SafeEnqueueLiteral (Literal literal, absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason) |
| std::vector< Literal > | ReasonFor (IntegerLiteral literal) const |
| void | MergeReasonInto (absl::Span< const IntegerLiteral > literals, std::vector< Literal > *output) const |
| int64_t | num_enqueues () const |
| int64_t | timestamp () const |
| int64_t | num_level_zero_enqueues () const |
| void | RegisterWatcher (SparseBitset< IntegerVariable > *p) |
| IntegerVariable | VarAtIndex (int integer_trail_index) const |
| IntegerLiteral | IntegerLiteralAtIndex (int integer_trail_index) const |
| int | GetFirstIndexBefore (IntegerVariable var, GlobalTrailIndex source_index, int starting_integer_index) |
| int | PreviousTrailIndex (int integer_trail_index) const |
| GlobalTrailIndex | GlobalIndexAt (int integer_index) const |
| bool | ReportConflict (absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason) |
| bool | ReportConflict (absl::Span< const IntegerLiteral > integer_reason) |
| bool | VariableLowerBoundIsFromLevelZero (IntegerVariable var) const |
| void | RegisterReversibleClass (ReversibleInterface *rev) |
| int | Index () const |
| void | AppendNewBounds (std::vector< IntegerLiteral > *output) const |
| void | AppendNewBoundsFrom (int base_index, std::vector< IntegerLiteral > *output) const |
| int | FindTrailIndexOfVarBefore (IntegerVariable var, int threshold) const |
| bool | InPropagationLoop () const |
| void | NotifyThatPropagationWasAborted () |
| IntegerVariable | NextVariableToBranchOnInPropagationLoop () const |
| bool | CurrentBranchHadAnIncompletePropagation () |
| IntegerVariable | FirstUnassignedVariable () const |
| bool | HasPendingRootLevelDeduction () const |
| void | RegisterDebugChecker (std::function< bool(absl::Span< const Literal > clause, absl::Span< const IntegerLiteral > integers)> checker) |
| void | UseNewConflictResolution () |
| ReasonIndex | AppendReasonToInternalBuffers (absl::Span< const Literal > literal_reason, absl::Span< const IntegerLiteral > integer_reason) |
| absl::Span< const IntegerLiteral > | IntegerReasonAsSpan (ReasonIndex index) const |
| absl::Span< const Literal > | LiteralReasonAsSpan (ReasonIndex index) const |
| Public Member Functions inherited from operations_research::sat::SatPropagator | |
| SatPropagator (const std::string &name) | |
| SatPropagator (const SatPropagator &)=delete | |
| SatPropagator & | operator= (const SatPropagator &)=delete |
| virtual | ~SatPropagator ()=default |
| void | SetPropagatorId (int id) |
| int | PropagatorId () const |
| virtual void | Reimply (Trail *, int) |
| bool | PropagatePreconditionsAreSatisfied (const Trail &trail) const |
| bool | PropagationIsDone (const Trail &trail) const |
| const std::string & | name () const |
| virtual bool | IsEmpty () const |
Additional Inherited Members | |
| Protected Attributes inherited from operations_research::sat::SatPropagator | |
| const std::string | name_ |
| int | propagator_id_ |
| int | propagation_trail_index_ |
|
inlineexplicit |
|
delete |
|
final |
Definition at line 716 of file integer.cc.
|
inline |
| IntegerVariable operations_research::sat::IntegerTrail::AddIntegerVariable | ( | const Domain & | domain | ) |
Definition at line 887 of file integer.cc.
| IntegerVariable operations_research::sat::IntegerTrail::AddIntegerVariable | ( | IntegerValue | lower_bound, |
| IntegerValue | upper_bound ) |
Definition at line 856 of file integer.cc.
| void operations_research::sat::IntegerTrail::AppendNewBounds | ( | std::vector< IntegerLiteral > * | output | ) | const |
Definition at line 2406 of file integer.cc.
| void operations_research::sat::IntegerTrail::AppendNewBoundsFrom | ( | int | base_index, |
| std::vector< IntegerLiteral > * | output ) const |
Definition at line 2412 of file integer.cc.
| ReasonIndex operations_research::sat::IntegerTrail::AppendReasonToInternalBuffers | ( | absl::Span< const Literal > | literal_reason, |
| absl::Span< const IntegerLiteral > | integer_reason ) |
Definition at line 1646 of file integer.cc.
| void operations_research::sat::IntegerTrail::AppendRelaxedLinearReason | ( | IntegerValue | slack, |
| absl::Span< const IntegerValue > | coeffs, | ||
| absl::Span< const IntegerVariable > | vars, | ||
| std::vector< IntegerLiteral > * | reason ) const |
Definition at line 1068 of file integer.cc.
|
inline |
|
inline |
| bool operations_research::sat::IntegerTrail::ConditionalEnqueue | ( | Literal | lit, |
| IntegerLiteral | i_lit, | ||
| std::vector< Literal > * | literal_reason, | ||
| std::vector< IntegerLiteral > * | integer_reason ) |
Definition at line 1361 of file integer.cc.
|
inline |
|
inline |
|
inline |
|
inline |
| bool operations_research::sat::IntegerTrail::CurrentBranchHadAnIncompletePropagation | ( | ) |
Definition at line 1624 of file integer.cc.
|
inline |
|
inline |
|
inline |
| bool operations_research::sat::IntegerTrail::EnqueueLiteral | ( | Literal | literal, |
| absl::Span< const Literal > | literal_reason, | ||
| absl::Span< const IntegerLiteral > | integer_reason ) |
Definition at line 1498 of file integer.cc.
|
inline |
| int operations_research::sat::IntegerTrail::FindTrailIndexOfVarBefore | ( | IntegerVariable | var, |
| int | threshold ) const |
Definition at line 965 of file integer.cc.
| IntegerVariable operations_research::sat::IntegerTrail::FirstUnassignedVariable | ( | ) | const |
Definition at line 1628 of file integer.cc.
|
inline |
|
inline |
|
inline |
| const IntegerReason & operations_research::sat::IntegerTrail::GetIntegerReason | ( | GlobalTrailIndex | index, |
| std::optional< IntegerValue > | needed_bound ) |
Definition at line 2367 of file integer.cc.
| IntegerVariable operations_research::sat::IntegerTrail::GetOrCreateConstantIntegerVariable | ( | IntegerValue | value | ) |
Definition at line 944 of file integer.cc.
|
inline |
|
inline |
|
inline |
| const Domain & operations_research::sat::IntegerTrail::InitialVariableDomain | ( | IntegerVariable | var | ) | const |
Definition at line 895 of file integer.cc.
| bool operations_research::sat::IntegerTrail::InPropagationLoop | ( | ) | const |
Definition at line 1577 of file integer.cc.
|
inline |
|
inline |
|
inline |
|
inline |
| absl::Span< const IntegerLiteral > operations_research::sat::IntegerTrail::IntegerReasonAsSpan | ( | ReasonIndex | index | ) | const |
Definition at line 2028 of file integer.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| absl::Span< const Literal > operations_research::sat::IntegerTrail::LiteralReasonAsSpan | ( | ReasonIndex | index | ) | const |
Definition at line 2073 of file integer.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void operations_research::sat::IntegerTrail::MergeReasonInto | ( | absl::Span< const IntegerLiteral > | literals, |
| std::vector< Literal > * | output ) const |
Definition at line 2102 of file integer.cc.
| IntegerVariable operations_research::sat::IntegerTrail::NextVariableToBranchOnInPropagationLoop | ( | ) | const |
Definition at line 1595 of file integer.cc.
| void operations_research::sat::IntegerTrail::NotifyThatPropagationWasAborted | ( | ) |
Definition at line 1587 of file integer.cc.
|
inline |
|
inline |
| int operations_research::sat::IntegerTrail::NumConstantVariables | ( | ) | const |
Definition at line 959 of file integer.cc.
|
inline |
|
delete |
|
inline |
|
finalvirtual |
Implements operations_research::sat::SatPropagator.
Definition at line 723 of file integer.cc.
|
finalvirtual |
Reimplemented from operations_research::sat::SatPropagator.
Definition at line 2328 of file integer.cc.
| std::vector< Literal > operations_research::sat::IntegerTrail::ReasonFor | ( | IntegerLiteral | literal | ) | const |
Definition at line 2096 of file integer.cc.
|
inline |
|
inline |
|
inline |
| void operations_research::sat::IntegerTrail::RelaxLinearReason | ( | IntegerValue | slack, |
| absl::Span< const IntegerValue > | coeffs, | ||
| std::vector< int > * | trail_indices ) const |
Definition at line 1083 of file integer.cc.
| void operations_research::sat::IntegerTrail::RelaxLinearReason | ( | IntegerValue | slack, |
| absl::Span< const IntegerValue > | coeffs, | ||
| std::vector< IntegerLiteral > * | reason ) const |
Definition at line 1046 of file integer.cc.
| void operations_research::sat::IntegerTrail::RemoveLevelZeroBounds | ( | std::vector< IntegerLiteral > * | reason | ) | const |
Definition at line 1180 of file integer.cc.
|
inline |
|
inline |
| void operations_research::sat::IntegerTrail::ReserveSpaceForNumVariables | ( | int | num_vars | ) |
Definition at line 840 of file integer.cc.
| bool operations_research::sat::IntegerTrail::RootLevelEnqueue | ( | IntegerLiteral | i_lit | ) |
Definition at line 1285 of file integer.cc.
| bool operations_research::sat::IntegerTrail::SafeEnqueue | ( | IntegerLiteral | i_lit, |
| absl::Span< const IntegerLiteral > | integer_reason ) |
Definition at line 1336 of file integer.cc.
| bool operations_research::sat::IntegerTrail::SafeEnqueue | ( | IntegerLiteral | i_lit, |
| absl::Span< const Literal > | literal_reason, | ||
| absl::Span< const IntegerLiteral > | integer_reason ) |
Definition at line 1341 of file integer.cc.
| bool operations_research::sat::IntegerTrail::SafeEnqueueLiteral | ( | Literal | literal, |
| absl::Span< const Literal > | literal_reason, | ||
| absl::Span< const IntegerLiteral > | integer_reason ) |
Definition at line 1504 of file integer.cc.
|
inline |
|
finalvirtual |
Reimplemented from operations_research::sat::SatPropagator.
Definition at line 787 of file integer.cc.
| bool operations_research::sat::IntegerTrail::UpdateInitialDomain | ( | IntegerVariable | var, |
| Domain | domain ) |
Definition at line 905 of file integer.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |