Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Classes | |
class | ArrowOperatorProxy |
class | IncrementalSolverImpl |
Incremental solve of a model. More... | |
class | SosConstraintData |
struct | VariablesEquality |
Typedefs | |
using | BaseSolverFactory |
Functions | |
template<typename SosConstraint > | |
std::string | SosConstraintToString (SosConstraint constraint, absl::string_view sos_type_name) |
absl::Status | CheckIdsRangeAndStrictlyIncreasing2 (absl::Span< const int64_t > ids) |
template<typename DataProto > | |
absl::Status | UpdateBiMapFromMappedData (const absl::Span< const int64_t > deleted_ids, const google::protobuf::Map< int64_t, DataProto > &proto_map, IdNameBiMap &bimap) |
absl::Status | ValidateInitArgs (const Solver::InitArgs &init_args, const SolverTypeProto solver_type) |
absl::Status | CheckModelStorage (const ModelStorage *const storage, const ModelStorage *const expected_storage) |
absl::StatusOr< SolveResult > | SolveImpl (const BaseSolverFactory solver_factory, const Model &model, const SolverType solver_type, const SolveArguments &solve_args, const SolveInterrupter *const user_canceller, const bool remove_names) |
absl::StatusOr< ComputeInfeasibleSubsystemResult > | ComputeInfeasibleSubsystemImpl (const BaseSolverFactory solver_factory, const Model &model, const SolverType solver_type, const ComputeInfeasibleSubsystemArguments &compute_args, const SolveInterrupter *const user_canceller, const bool remove_names) |
template<typename LeftIterable , typename RightIterable , typename Expression > | |
void | AddInnerProduct (const LeftIterable &left, const RightIterable &right, Expression &expr) |
template<typename RowId , typename ColumnId > | |
SparseDoubleMatrixProto | EntriesToMatrixProto (std::vector< std::tuple< RowId, ColumnId, double > > entries) |
entries must have unique (row, column) values but can be in any order. | |
Variables | |
std::atomic< int64_t > | debug_num_solver = 0 |
constexpr absl::string_view | kKeyHasNullModelStorage |
The CHECK message to use when a KeyType::storage() is nullptr. | |
constexpr absl::string_view | kObjectsFromOtherModelStorage |
constexpr absl::string_view | kInputFromInvalidModelStorage |
constexpr absl::string_view | kModelIsDestroyed |
constexpr double | kZerosCleanup = 1.0 / 3.0 |
Inline implementations
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Inlined functions
A factory of solver.
The local_canceller is a local interrupter that exists in the scope of SolveImpl(), ComputeInfeasibleSubsystemImpl() or IncrementalSolverImpl. It is triggered:
terminate
set to true is also returned instead.Solvers that don't support cancellation (i.e. in-process solving) should ignore the local_canceller: this use case won't have a user_canceller and the CallbackResultProto.terminate will terminate the solve as soon as possible if the CallbackResultProto is invalid.
Definition at line 50 of file solve_impl.h.
void operations_research::math_opt::internal::AddInnerProduct | ( | const LeftIterable & | left, |
const RightIterable & | right, | ||
Expression & | expr ) |
Definition at line 1683 of file variable_and_expressions.h.
absl::Status operations_research::math_opt::internal::CheckIdsRangeAndStrictlyIncreasing2 | ( | absl::Span< const int64_t > | ids | ) |
Definition at line 40 of file model_summary.cc.
|
inline |
Returns a failure when the input pointer is not nullptr and points to a different model storage than expected_storage (which must not be nullptr).
Failure message is kInputFromInvalidModelStorage.
Definition at line 168 of file key_types.h.
absl::StatusOr< ComputeInfeasibleSubsystemResult > operations_research::math_opt::internal::ComputeInfeasibleSubsystemImpl | ( | BaseSolverFactory | solver_factory, |
const Model & | model, | ||
SolverType | solver_type, | ||
const ComputeInfeasibleSubsystemArguments & | compute_args, | ||
const SolveInterrupter * | user_canceller, | ||
bool | remove_names ) |
ComputeInfeasibleSubsystems the input model in a subprocess.
The user_canceller
parameter is optional.
Definition at line 135 of file solve_impl.cc.
SparseDoubleMatrixProto operations_research::math_opt::internal::EntriesToMatrixProto | ( | std::vector< std::tuple< RowId, ColumnId, double > > | entries | ) |
entries must have unique (row, column) values but can be in any order.
Definition at line 279 of file sparse_matrix.h.
absl::StatusOr< SolveResult > operations_research::math_opt::internal::SolveImpl | ( | BaseSolverFactory | solver_factory, |
const Model & | model, | ||
SolverType | solver_type, | ||
const SolveArguments & | solve_args, | ||
const SolveInterrupter * | user_canceller, | ||
bool | remove_names ) |
Solves the input model.
The user_canceller
parameter is optional.
Definition at line 121 of file solve_impl.cc.
std::string operations_research::math_opt::internal::SosConstraintToString | ( | SosConstraint | constraint, |
absl::string_view | sos_type_name ) |
This method can only be called with a parameter of either Sos1Constraint
or Sos2Constraint
.
Tested in sos1_constraint_test and sos2_constraint_test, as the ToString() member functions are thin wrappers around this function.
Inline function implementations
absl::Status operations_research::math_opt::internal::UpdateBiMapFromMappedData | ( | const absl::Span< const int64_t > | deleted_ids, |
const google::protobuf::Map< int64_t, DataProto > & | proto_map, | ||
IdNameBiMap & | bimap ) |
Definition at line 245 of file model_summary.h.
absl::Status operations_research::math_opt::internal::ValidateInitArgs | ( | const Solver::InitArgs & | init_args, |
SolverTypeProto | solver_type ) |
std::atomic< int64_t > operations_research::math_opt::internal::debug_num_solver = 0 |
The number of Solver instances that currently exist.
This variable is intended to be used by MathOpt unit tests in other languages to test the proper garbage collection. It should never be used in any other context.
Definition at line 23 of file solver_debug.cc.
|
inlineconstexpr |
The Status message to use when an input KeyType is from an unexpected storage().
Definition at line 161 of file key_types.h.
|
inlineconstexpr |
The CHECK message to use when a KeyType::storage() is nullptr.
Definition at line 151 of file key_types.h.
|
constexpr |
The failure message used when a function of UpdateTracker is called after the destruction of the model..
Definition at line 110 of file update_tracker.h.
|
inlineconstexpr |
The CHECK message to use when two KeyType with different storage() are used in the same collection.
Definition at line 156 of file key_types.h.
|
constexpr |
When the fraction of entries in values_ with value 0.0 is larger than kZerosCleanup, we compact the data structure and remove all zero entries.
Definition at line 257 of file sparse_matrix.h.