![]() |
OR-Tools
9.6
|
Definition at line 161 of file model_storage.h.
Public Member Functions | |
| ModelStorage (absl::string_view name="") | |
| ModelStorage (const ModelStorage &)=delete | |
| ModelStorage & | operator= (const ModelStorage &)=delete |
| std::unique_ptr< ModelStorage > | Clone (std::optional< absl::string_view > new_name=std::nullopt) const |
| const std::string & | name () const |
| VariableId | AddVariable (absl::string_view name="") |
| VariableId | AddVariable (double lower_bound, double upper_bound, bool is_integer, absl::string_view name="") |
| double | variable_lower_bound (VariableId id) const |
| double | variable_upper_bound (VariableId id) const |
| bool | is_variable_integer (VariableId id) const |
| const std::string & | variable_name (VariableId id) const |
| void | set_variable_lower_bound (VariableId id, double lower_bound) |
| void | set_variable_upper_bound (VariableId id, double upper_bound) |
| void | set_variable_is_integer (VariableId id, bool is_integer) |
| void | set_variable_as_integer (VariableId id) |
| void | set_variable_as_continuous (VariableId id) |
| void | DeleteVariable (VariableId id) |
| int | num_variables () const |
| VariableId | next_variable_id () const |
| void | ensure_next_variable_id_at_least (VariableId id) |
| bool | has_variable (VariableId id) const |
| std::vector< VariableId > | variables () const |
| std::vector< VariableId > | SortedVariables () const |
| LinearConstraintId | AddLinearConstraint (absl::string_view name="") |
| LinearConstraintId | AddLinearConstraint (double lower_bound, double upper_bound, absl::string_view name="") |
| double | linear_constraint_lower_bound (LinearConstraintId id) const |
| double | linear_constraint_upper_bound (LinearConstraintId id) const |
| const std::string & | linear_constraint_name (LinearConstraintId id) const |
| void | set_linear_constraint_lower_bound (LinearConstraintId id, double lower_bound) |
| void | set_linear_constraint_upper_bound (LinearConstraintId id, double upper_bound) |
| void | DeleteLinearConstraint (LinearConstraintId id) |
| int | num_linear_constraints () const |
| LinearConstraintId | next_linear_constraint_id () const |
| void | ensure_next_linear_constraint_id_at_least (LinearConstraintId id) |
| bool | has_linear_constraint (LinearConstraintId id) const |
| std::vector< LinearConstraintId > | LinearConstraints () const |
| std::vector< LinearConstraintId > | SortedLinearConstraints () const |
| double | linear_constraint_coefficient (LinearConstraintId constraint, VariableId variable) const |
| bool | is_linear_constraint_coefficient_nonzero (LinearConstraintId constraint, VariableId variable) const |
| void | set_linear_constraint_coefficient (LinearConstraintId constraint, VariableId variable, double value) |
| std::vector< std::tuple< LinearConstraintId, VariableId, double > > | linear_constraint_matrix () const |
| std::vector< VariableId > | variables_in_linear_constraint (LinearConstraintId constraint) const |
| std::vector< LinearConstraintId > | linear_constraints_with_variable (VariableId variable) const |
| bool | is_maximize () const |
| double | objective_offset () const |
| double | linear_objective_coefficient (VariableId variable) const |
| double | quadratic_objective_coefficient (VariableId first_variable, VariableId second_variable) const |
| bool | is_linear_objective_coefficient_nonzero (VariableId variable) const |
| bool | is_quadratic_objective_coefficient_nonzero (VariableId first_variable, VariableId second_variable) const |
| void | set_is_maximize (bool is_maximize) |
| void | set_maximize () |
| void | set_minimize () |
| void | set_objective_offset (double value) |
| void | set_linear_objective_coefficient (VariableId variable, double value) |
| void | set_quadratic_objective_coefficient (VariableId first_variable, VariableId second_variable, double value) |
| void | clear_objective () |
| const absl::flat_hash_map< VariableId, double > & | linear_objective () const |
| int64_t | num_quadratic_objective_terms () const |
| std::vector< std::tuple< VariableId, VariableId, double > > | quadratic_objective_terms () const |
| template<typename ConstraintData > | |
| ConstraintData::IdType | AddAtomicConstraint (ConstraintData data) |
| template<typename IdType > | |
| void | DeleteAtomicConstraint (IdType id) |
| template<typename IdType > | |
| const AtomicConstraintTraits< IdType >::ConstraintData & | constraint_data (IdType id) const |
| template<typename IdType > | |
| int64_t | num_constraints () const |
| template<typename IdType > | |
| IdType | next_constraint_id () const |
| template<typename IdType > | |
| void | ensure_next_constraint_id_at_least (IdType id) |
| template<typename IdType > | |
| bool | has_constraint (IdType id) const |
| template<typename IdType > | |
| std::vector< IdType > | Constraints () const |
| template<typename IdType > | |
| std::vector< IdType > | SortedConstraints () const |
| template<typename IdType > | |
| std::vector< IdType > | ConstraintsWithVariable (VariableId variable_id) const |
| template<typename IdType > | |
| std::vector< VariableId > | VariablesInConstraint (IdType id) const |
| ModelProto | ExportModel () const |
| UpdateTrackerId | NewUpdateTracker () |
| void | DeleteUpdateTracker (UpdateTrackerId update_tracker) |
| std::optional< ModelUpdateProto > | ExportModelUpdate (UpdateTrackerId update_tracker) const |
| void | AdvanceCheckpoint (UpdateTrackerId update_tracker) |
| absl::Status | ApplyUpdateProto (const ModelUpdateProto &update_proto) |
| template<> | |
| AtomicConstraintStorage< QuadraticConstraintData > & | constraint_storage () |
| template<> | |
| const AtomicConstraintStorage< QuadraticConstraintData > & | constraint_storage () const |
Static Public Member Functions | |
| static absl::StatusOr< std::unique_ptr< ModelStorage > > | FromModelProto (const ModelProto &model_proto) |
|
inlineexplicit |
Definition at line 174 of file model_storage.h.
|
delete |
|
inline |
Definition at line 922 of file model_storage.h.
|
inline |
Definition at line 761 of file model_storage.h.
| LinearConstraintId AddLinearConstraint | ( | double | lower_bound, |
| double | upper_bound, | ||
| absl::string_view | name = "" |
||
| ) |
Definition at line 199 of file model_storage.cc.
|
inline |
Definition at line 699 of file model_storage.h.
| VariableId AddVariable | ( | double | lower_bound, |
| double | upper_bound, | ||
| bool | is_integer, | ||
| absl::string_view | name = "" |
||
| ) |
Definition at line 149 of file model_storage.cc.
| void AdvanceCheckpoint | ( | UpdateTrackerId | update_tracker | ) |
Definition at line 349 of file model_storage.cc.
| absl::Status ApplyUpdateProto | ( | const ModelUpdateProto & | update_proto | ) |
Definition at line 353 of file model_storage.cc.
|
inline |
Definition at line 899 of file model_storage.h.
| std::unique_ptr< ModelStorage > Clone | ( | std::optional< absl::string_view > | new_name = std::nullopt | ) | const |
Definition at line 120 of file model_storage.cc.
|
inline |
Definition at line 942 of file model_storage.h.
|
inline |
Definition at line 1014 of file model_storage.h.
|
inline |
Definition at line 1020 of file model_storage.h.
| std::vector< IdType > Constraints |
Definition at line 977 of file model_storage.h.
|
inline |
Definition at line 991 of file model_storage.h.
|
inline |
Definition at line 928 of file model_storage.h.
| void DeleteLinearConstraint | ( | LinearConstraintId | id | ) |
Definition at line 222 of file model_storage.cc.
| void DeleteUpdateTracker | ( | UpdateTrackerId | update_tracker | ) |
Definition at line 340 of file model_storage.cc.
| void DeleteVariable | ( | VariableId | id | ) |
Definition at line 170 of file model_storage.cc.
|
inline |
Definition at line 963 of file model_storage.h.
|
inline |
Definition at line 801 of file model_storage.h.
|
inline |
Definition at line 749 of file model_storage.h.
| ModelProto ExportModel | ( | ) | const |
Definition at line 235 of file model_storage.cc.
| std::optional< ModelUpdateProto > ExportModelUpdate | ( | UpdateTrackerId | update_tracker | ) | const |
Definition at line 344 of file model_storage.cc.
|
static |
Definition at line 49 of file model_storage.cc.
|
inline |
Definition at line 970 of file model_storage.h.
|
inline |
Definition at line 806 of file model_storage.h.
|
inline |
Definition at line 753 of file model_storage.h.
|
inline |
Definition at line 819 of file model_storage.h.
|
inline |
Definition at line 864 of file model_storage.h.
|
inline |
Definition at line 850 of file model_storage.h.
|
inline |
Definition at line 869 of file model_storage.h.
|
inline |
Definition at line 712 of file model_storage.h.
|
inline |
Definition at line 814 of file model_storage.h.
|
inline |
Definition at line 766 of file model_storage.h.
|
inline |
Definition at line 832 of file model_storage.h.
|
inline |
Definition at line 776 of file model_storage.h.
|
inline |
Definition at line 771 of file model_storage.h.
|
inline |
Definition at line 841 of file model_storage.h.
|
inline |
Definition at line 903 of file model_storage.h.
|
inline |
Definition at line 854 of file model_storage.h.
| std::vector< LinearConstraintId > LinearConstraints | ( | ) | const |
Definition at line 227 of file model_storage.cc.
|
inline |
Definition at line 188 of file model_storage.h.
| UpdateTrackerId NewUpdateTracker | ( | ) |
Definition at line 334 of file model_storage.cc.
|
inline |
Definition at line 956 of file model_storage.h.
|
inline |
Definition at line 797 of file model_storage.h.
|
inline |
Definition at line 745 of file model_storage.h.
|
inline |
Definition at line 949 of file model_storage.h.
|
inline |
Definition at line 793 of file model_storage.h.
|
inline |
Definition at line 908 of file model_storage.h.
|
inline |
Definition at line 743 of file model_storage.h.
|
inline |
Definition at line 852 of file model_storage.h.
|
delete |
|
inline |
Definition at line 859 of file model_storage.h.
|
inline |
Definition at line 913 of file model_storage.h.
|
inline |
Definition at line 875 of file model_storage.h.
|
inline |
Definition at line 824 of file model_storage.h.
|
inline |
Definition at line 781 of file model_storage.h.
|
inline |
Definition at line 787 of file model_storage.h.
|
inline |
Definition at line 887 of file model_storage.h.
|
inline |
Definition at line 879 of file model_storage.h.
|
inline |
Definition at line 881 of file model_storage.h.
|
inline |
Definition at line 883 of file model_storage.h.
|
inline |
Definition at line 892 of file model_storage.h.
|
inline |
Definition at line 739 of file model_storage.h.
|
inline |
Definition at line 735 of file model_storage.h.
|
inline |
Definition at line 730 of file model_storage.h.
|
inline |
Definition at line 720 of file model_storage.h.
|
inline |
Definition at line 725 of file model_storage.h.
| std::vector< IdType > SortedConstraints |
Definition at line 984 of file model_storage.h.
| std::vector< LinearConstraintId > SortedLinearConstraints | ( | ) | const |
Definition at line 231 of file model_storage.cc.
| std::vector< VariableId > SortedVariables | ( | ) | const |
Definition at line 195 of file model_storage.cc.
|
inline |
Definition at line 704 of file model_storage.h.
|
inline |
Definition at line 716 of file model_storage.h.
|
inline |
Definition at line 708 of file model_storage.h.
| std::vector< VariableId > variables | ( | ) | const |
Definition at line 191 of file model_storage.cc.
|
inline |
Definition at line 836 of file model_storage.h.
|
inline |
Definition at line 1001 of file model_storage.h.