![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Definition at line 53 of file solution_crush.h.
#include <solution_crush.h>
Classes | |
| struct | StateVar |
| struct | TransitionVar |
| struct | TableRowLiteral |
| struct | BoxInAreaLiteral |
Public Member Functions | |
| SolutionCrush ()=default | |
| SolutionCrush (const SolutionCrush &)=delete | |
| SolutionCrush (SolutionCrush &&)=delete | |
| SolutionCrush & | operator= (const SolutionCrush &)=delete |
| SolutionCrush & | operator= (SolutionCrush &&)=delete |
| bool | SolutionIsLoaded () const |
| absl::Span< const int64_t > | GetVarValues () const |
| void | LoadSolution (int num_vars, const absl::flat_hash_map< int, int64_t > &solution) |
| void | Resize (int new_size) |
| void | MaybeSetLiteralToValueEncoding (int literal, int var, int64_t value) |
| void | MaybeSetLiteralToOrderEncoding (int literal, int var, int64_t value, bool is_le) |
| void | SetVarToLinearExpression (int var, absl::Span< const std::pair< int, int64_t > > linear, int64_t offset=0) |
| void | SetVarToLinearExpression (int var, absl::Span< const int > vars, absl::Span< const int64_t > coeffs, int64_t offset=0) |
| void | SetVarToClause (int var, absl::Span< const int > clause) |
| void | SetVarToConjunction (int var, absl::Span< const int > conjunction) |
| void | SetVarToValueIfLinearConstraintViolated (int var, int64_t value, absl::Span< const std::pair< int, int64_t > > linear, const Domain &domain) |
| void | SetLiteralToValueIfLinearConstraintViolated (int literal, bool value, absl::Span< const std::pair< int, int64_t > > linear, const Domain &domain) |
| void | SetVarToValueIf (int var, int64_t value, int condition_lit) |
| void | SetVarToLinearExpressionIf (int var, const LinearExpressionProto &expr, int condition_lit) |
| void | SetLiteralToValueIf (int literal, bool value, int condition_lit) |
| void | SetVarToConditionalValue (int var, absl::Span< const int > condition_lits, int64_t value_if_true, int64_t value_if_false) |
| void | MakeLiteralsEqual (int lit1, int lit2) |
| void | SetOrUpdateVarToDomain (int var, const Domain &domain) |
| void | SetOrUpdateVarToDomainWithOptionalEscapeValue (int var, const Domain &reduced_var_domain, std::optional< int64_t > unique_escape_value, bool push_down_when_not_in_domain, const absl::btree_map< int64_t, int > &encoding) |
| void | UpdateLiteralsToFalseIfDifferent (int lit1, int lit2) |
| void | UpdateLiteralsWithDominance (int lit, int dominating_lit) |
| void | UpdateRefsWithDominance (int ref, int64_t min_value, int64_t max_value, absl::Span< const std::pair< int, Domain > > dominating_refs) |
| void | MaybeUpdateVarWithSymmetriesToValue (int var, bool value, absl::Span< const std::unique_ptr< SparsePermutation > > generators) |
| void | MaybeSwapOrbitopeColumns (absl::Span< const std::vector< int > > orbitope, int row, int pivot_col, bool value) |
| void | SetVarToLinearConstraintSolution (absl::Span< const int > enforcement_lits, std::optional< int > var_index, absl::Span< const int > vars, absl::Span< const int64_t > default_values, absl::Span< const int64_t > coeffs, int64_t rhs) |
| void | SetReservoirCircuitVars (const ReservoirConstraintProto &reservoir, int64_t min_level, int64_t max_level, absl::Span< const int > level_vars, const CircuitConstraintProto &circuit) |
| void | SetVarToReifiedPrecedenceLiteral (int var, const LinearExpressionProto &time_i, const LinearExpressionProto &time_j, int active_i, int active_j) |
| void | SetIntModExpandedVars (const ConstraintProto &ct, int div_var, int prod_var, int64_t default_div_value, int64_t default_prod_value) |
| void | SetIntProdExpandedVars (const LinearArgumentProto &int_prod, absl::Span< const int > prod_vars) |
| void | SetLinMaxExpandedVars (const LinearArgumentProto &lin_max, absl::Span< const int > enforcement_lits) |
| void | SetAutomatonExpandedVars (const AutomatonConstraintProto &automaton, absl::Span< const StateVar > state_vars, absl::Span< const TransitionVar > transition_vars) |
| void | SetTableExpandedVars (absl::Span< const int > column_vars, absl::Span< const int > existing_row_lits, absl::Span< const TableRowLiteral > new_row_lits) |
| void | SetLinearWithComplexDomainExpandedVars (const LinearConstraintProto &linear, absl::Span< const int > bucket_lits) |
| void | StoreSolutionAsHint (CpModelProto &model) const |
| void | AssignVariableToPackingArea (const CompactVectorVector< int, Rectangle > &areas, const CpModelProto &model, absl::Span< const int > x_intervals, absl::Span< const int > y_intervals, absl::Span< const BoxInAreaLiteral > box_in_area_lits) |
|
default |
|
delete |
|
delete |
| void operations_research::sat::SolutionCrush::AssignVariableToPackingArea | ( | const CompactVectorVector< int, Rectangle > & | areas, |
| const CpModelProto & | model, | ||
| absl::Span< const int > | x_intervals, | ||
| absl::Span< const int > | y_intervals, | ||
| absl::Span< const BoxInAreaLiteral > | box_in_area_lits ) |
Definition at line 721 of file solution_crush.cc.
|
inline |
Definition at line 66 of file solution_crush.h.
| void operations_research::sat::SolutionCrush::LoadSolution | ( | int | num_vars, |
| const absl::flat_hash_map< int, int64_t > & | solution ) |
Definition at line 46 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::MakeLiteralsEqual | ( | int | lit1, |
| int | lit2 ) |
Definition at line 221 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::MaybeSetLiteralToOrderEncoding | ( | int | literal, |
| int | var, | ||
| int64_t | value, | ||
| bool | is_le ) |
Definition at line 75 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::MaybeSetLiteralToValueEncoding | ( | int | literal, |
| int | var, | ||
| int64_t | value ) |
Definition at line 66 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::MaybeSwapOrbitopeColumns | ( | absl::Span< const std::vector< int > > | orbitope, |
| int | row, | ||
| int | pivot_col, | ||
| bool | value ) |
Definition at line 322 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::MaybeUpdateVarWithSymmetriesToValue | ( | int | var, |
| bool | value, | ||
| absl::Span< const std::unique_ptr< SparsePermutation > > | generators ) |
Definition at line 287 of file solution_crush.cc.
|
delete |
|
delete |
| void operations_research::sat::SolutionCrush::Resize | ( | int | new_size | ) |
Definition at line 60 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetAutomatonExpandedVars | ( | const AutomatonConstraintProto & | automaton, |
| absl::Span< const StateVar > | state_vars, | ||
| absl::Span< const TransitionVar > | transition_vars ) |
Definition at line 620 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetIntModExpandedVars | ( | const ConstraintProto & | ct, |
| int | div_var, | ||
| int | prod_var, | ||
| int64_t | default_div_value, | ||
| int64_t | default_prod_value ) |
Definition at line 549 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetIntProdExpandedVars | ( | const LinearArgumentProto & | int_prod, |
| absl::Span< const int > | prod_vars ) |
Definition at line 582 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetLinearWithComplexDomainExpandedVars | ( | const LinearConstraintProto & | linear, |
| absl::Span< const int > | bucket_lits ) |
Definition at line 687 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetLinMaxExpandedVars | ( | const LinearArgumentProto & | lin_max, |
| absl::Span< const int > | enforcement_lits ) |
Definition at line 597 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetLiteralToValueIf | ( | int | literal, |
| bool | value, | ||
| int | condition_lit ) |
Definition at line 199 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetLiteralToValueIfLinearConstraintViolated | ( | int | literal, |
| bool | value, | ||
| absl::Span< const std::pair< int, int64_t > > | linear, | ||
| const Domain & | domain ) |
Definition at line 174 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetOrUpdateVarToDomain | ( | int | var, |
| const Domain & | domain ) |
Definition at line 230 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetOrUpdateVarToDomainWithOptionalEscapeValue | ( | int | var, |
| const Domain & | reduced_var_domain, | ||
| std::optional< int64_t > | unique_escape_value, | ||
| bool | push_down_when_not_in_domain, | ||
| const absl::btree_map< int64_t, int > & | encoding ) |
Definition at line 239 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetReservoirCircuitVars | ( | const ReservoirConstraintProto & | reservoir, |
| int64_t | min_level, | ||
| int64_t | max_level, | ||
| absl::Span< const int > | level_vars, | ||
| const CircuitConstraintProto & | circuit ) |
Definition at line 436 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetTableExpandedVars | ( | absl::Span< const int > | column_vars, |
| absl::Span< const int > | existing_row_lits, | ||
| absl::Span< const TableRowLiteral > | new_row_lits ) |
Definition at line 657 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToClause | ( | int | var, |
| absl::Span< const int > | clause ) |
Definition at line 113 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToConditionalValue | ( | int | var, |
| absl::Span< const int > | condition_lits, | ||
| int64_t | value_if_true, | ||
| int64_t | value_if_false ) |
Definition at line 206 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToConjunction | ( | int | var, |
| absl::Span< const int > | conjunction ) |
Definition at line 134 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToLinearConstraintSolution | ( | absl::Span< const int > | enforcement_lits, |
| std::optional< int > | var_index, | ||
| absl::Span< const int > | vars, | ||
| absl::Span< const int64_t > | default_values, | ||
| absl::Span< const int64_t > | coeffs, | ||
| int64_t | rhs ) |
Definition at line 387 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToLinearExpression | ( | int | var, |
| absl::Span< const int > | vars, | ||
| absl::Span< const int64_t > | coeffs, | ||
| int64_t | offset = 0 ) |
Definition at line 97 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToLinearExpression | ( | int | var, |
| absl::Span< const std::pair< int, int64_t > > | linear, | ||
| int64_t | offset = 0 ) |
Definition at line 85 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToLinearExpressionIf | ( | int | var, |
| const LinearExpressionProto & | expr, | ||
| int | condition_lit ) |
Definition at line 188 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToReifiedPrecedenceLiteral | ( | int | var, |
| const LinearExpressionProto & | time_i, | ||
| const LinearExpressionProto & | time_j, | ||
| int | active_i, | ||
| int | active_j ) |
Definition at line 532 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToValueIf | ( | int | var, |
| int64_t | value, | ||
| int | condition_lit ) |
Definition at line 182 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::SetVarToValueIfLinearConstraintViolated | ( | int | var, |
| int64_t | value, | ||
| absl::Span< const std::pair< int, int64_t > > | linear, | ||
| const Domain & | domain ) |
Definition at line 156 of file solution_crush.cc.
|
inline |
Definition at line 63 of file solution_crush.h.
| void operations_research::sat::SolutionCrush::StoreSolutionAsHint | ( | CpModelProto & | model | ) | const |
Definition at line 704 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::UpdateLiteralsToFalseIfDifferent | ( | int | lit1, |
| int | lit2 ) |
Definition at line 265 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::UpdateLiteralsWithDominance | ( | int | lit, |
| int | dominating_lit ) |
Definition at line 276 of file solution_crush.cc.
| void operations_research::sat::SolutionCrush::UpdateRefsWithDominance | ( | int | ref, |
| int64_t | min_value, | ||
| int64_t | max_value, | ||
| absl::Span< const std::pair< int, Domain > > | dominating_refs ) |
Definition at line 356 of file solution_crush.cc.