Definition at line 110 of file math_opt/cpp/model.h.
|
| | Model (absl::string_view name="") |
| |
| | Model (std::unique_ptr< ModelStorage > storage) |
| |
| | Model (const Model &)=delete |
| |
| Model & | operator= (const Model &)=delete |
| |
| std::unique_ptr< Model > | Clone (std::optional< absl::string_view > new_name=std::nullopt) const |
| |
| const std::string & | name () const |
| |
| Variable | AddVariable (double lower_bound, double upper_bound, bool is_integer, absl::string_view name="") |
| |
| Variable | AddVariable (absl::string_view name="") |
| |
| Variable | AddBinaryVariable (absl::string_view name="") |
| |
| Variable | AddContinuousVariable (double lower_bound, double upper_bound, absl::string_view name="") |
| |
| Variable | AddIntegerVariable (double lower_bound, double upper_bound, absl::string_view name="") |
| |
| void | DeleteVariable (Variable variable) |
| |
| int | num_variables () const |
| |
| int64_t | next_variable_id () const |
| |
| bool | has_variable (int64_t id) const |
| |
| bool | has_variable (VariableId id) const |
| |
| Variable | variable (int64_t id) const |
| |
| Variable | variable (VariableId id) const |
| |
| const std::string & | name (Variable variable) const |
| |
| void | set_lower_bound (Variable variable, double lower_bound) |
| |
| double | lower_bound (Variable variable) const |
| |
| void | set_upper_bound (Variable variable, double upper_bound) |
| |
| double | upper_bound (Variable variable) const |
| |
| void | set_is_integer (Variable variable, bool is_integer) |
| |
| void | set_integer (Variable variable) |
| |
| void | set_continuous (Variable variable) |
| |
| bool | is_integer (Variable variable) const |
| |
| std::vector< Variable > | Variables () const |
| |
| std::vector< Variable > | SortedVariables () const |
| |
| absl::Status | ValidateExistingVariableOfThisModel (Variable variable) const |
| |
| std::vector< LinearConstraint > | ColumnNonzeros (Variable variable) const |
| |
| LinearConstraint | AddLinearConstraint (absl::string_view name="") |
| |
| LinearConstraint | AddLinearConstraint (double lower_bound, double upper_bound, absl::string_view name="") |
| |
| LinearConstraint | AddLinearConstraint (const BoundedLinearExpression &bounded_expr, absl::string_view name="") |
| |
| void | DeleteLinearConstraint (LinearConstraint constraint) |
| |
| int | num_linear_constraints () const |
| |
| int64_t | next_linear_constraint_id () const |
| |
| bool | has_linear_constraint (int64_t id) const |
| |
| bool | has_linear_constraint (LinearConstraintId id) const |
| |
| LinearConstraint | linear_constraint (int64_t id) const |
| |
| LinearConstraint | linear_constraint (LinearConstraintId id) const |
| |
| const std::string & | name (LinearConstraint constraint) const |
| |
| void | set_lower_bound (LinearConstraint constraint, double lower_bound) |
| |
| double | lower_bound (LinearConstraint constraint) const |
| |
| void | set_upper_bound (LinearConstraint constraint, double upper_bound) |
| |
| double | upper_bound (LinearConstraint constraint) const |
| |
| void | set_coefficient (LinearConstraint constraint, Variable variable, double value) |
| |
| double | coefficient (LinearConstraint constraint, Variable variable) const |
| |
| bool | is_coefficient_nonzero (LinearConstraint constraint, Variable variable) const |
| |
| std::vector< Variable > | RowNonzeros (LinearConstraint constraint) const |
| |
| std::vector< LinearConstraint > | LinearConstraints () const |
| |
| std::vector< LinearConstraint > | SortedLinearConstraints () const |
| |
| absl::Status | ValidateExistingLinearConstraintOfThisModel (LinearConstraint linear_constraint) const |
| |
| QuadraticConstraint | AddQuadraticConstraint (const BoundedQuadraticExpression &bounded_expr, absl::string_view name="") |
| |
| void | DeleteQuadraticConstraint (QuadraticConstraint constraint) |
| |
| int64_t | num_quadratic_constraints () const |
| |
| int64_t | next_quadratic_constraint_id () const |
| |
| bool | has_quadratic_constraint (int64_t id) const |
| |
| bool | has_quadratic_constraint (QuadraticConstraintId id) const |
| |
| QuadraticConstraint | quadratic_constraint (int64_t id) const |
| |
| QuadraticConstraint | quadratic_constraint (QuadraticConstraintId id) const |
| |
| std::vector< QuadraticConstraint > | QuadraticConstraints () const |
| |
| std::vector< QuadraticConstraint > | SortedQuadraticConstraints () const |
| |
| Sos1Constraint | AddSos1Constraint (const std::vector< LinearExpression > &expressions, std::vector< double > weights={}, absl::string_view name="") |
| |
| void | DeleteSos1Constraint (Sos1Constraint constraint) |
| |
| int64_t | num_sos1_constraints () const |
| |
| int64_t | next_sos1_constraint_id () const |
| |
| bool | has_sos1_constraint (int64_t id) const |
| |
| bool | has_sos1_constraint (Sos1ConstraintId id) const |
| |
| Sos1Constraint | sos1_constraint (int64_t id) const |
| |
| Sos1Constraint | sos1_constraint (Sos1ConstraintId id) const |
| |
| std::vector< Sos1Constraint > | Sos1Constraints () const |
| |
| std::vector< Sos1Constraint > | SortedSos1Constraints () const |
| |
| Sos2Constraint | AddSos2Constraint (const std::vector< LinearExpression > &expressions, std::vector< double > weights={}, absl::string_view name="") |
| |
| void | DeleteSos2Constraint (Sos2Constraint constraint) |
| |
| int64_t | num_sos2_constraints () const |
| |
| int64_t | next_sos2_constraint_id () const |
| |
| bool | has_sos2_constraint (int64_t id) const |
| |
| bool | has_sos2_constraint (Sos2ConstraintId id) const |
| |
| Sos2Constraint | sos2_constraint (int64_t id) const |
| |
| Sos2Constraint | sos2_constraint (Sos2ConstraintId id) const |
| |
| std::vector< Sos2Constraint > | Sos2Constraints () const |
| |
| std::vector< Sos2Constraint > | SortedSos2Constraints () const |
| |
| IndicatorConstraint | AddIndicatorConstraint (Variable indicator_variable, const BoundedLinearExpression &implied_constraint, bool activate_on_zero=false, absl::string_view name={}) |
| |
| void | DeleteIndicatorConstraint (IndicatorConstraint constraint) |
| |
| int64_t | num_indicator_constraints () const |
| |
| int64_t | next_indicator_constraint_id () const |
| |
| bool | has_indicator_constraint (int64_t id) const |
| |
| bool | has_indicator_constraint (IndicatorConstraintId id) const |
| |
| IndicatorConstraint | indicator_constraint (int64_t id) const |
| |
| IndicatorConstraint | indicator_constraint (IndicatorConstraintId id) const |
| |
| std::vector< IndicatorConstraint > | IndicatorConstraints () const |
| |
| std::vector< IndicatorConstraint > | SortedIndicatorConstraints () const |
| |
| void | Maximize (double objective) |
| |
| void | Maximize (Variable objective) |
| |
| void | Maximize (LinearTerm objective) |
| |
| void | Maximize (const LinearExpression &objective) |
| |
| void | Maximize (const QuadraticExpression &objective) |
| |
| void | Minimize (double objective) |
| |
| void | Minimize (Variable objective) |
| |
| void | Minimize (LinearTerm objective) |
| |
| void | Minimize (const LinearExpression &objective) |
| |
| void | Minimize (const QuadraticExpression &objective) |
| |
| void | SetObjective (double objective, bool is_maximize) |
| |
| void | SetObjective (Variable objective, bool is_maximize) |
| |
| void | SetObjective (LinearTerm objective, bool is_maximize) |
| |
| void | SetObjective (const LinearExpression &objective, bool is_maximize) |
| |
| void | SetObjective (const QuadraticExpression &objective, bool is_maximize) |
| |
| void | AddToObjective (double objective) |
| |
| void | AddToObjective (Variable objective) |
| |
| void | AddToObjective (LinearTerm objective) |
| |
| void | AddToObjective (const LinearExpression &objective) |
| |
| void | AddToObjective (const QuadraticExpression &objective) |
| |
| LinearExpression | ObjectiveAsLinearExpression () const |
| |
| QuadraticExpression | ObjectiveAsQuadraticExpression () const |
| |
| double | objective_coefficient (Variable variable) const |
| |
| double | objective_coefficient (Variable first_variable, Variable second_variable) const |
| |
| void | set_objective_coefficient (Variable variable, double value) |
| |
| void | set_objective_coefficient (Variable first_variable, Variable second_variable, double value) |
| |
| void | clear_objective () |
| |
| bool | is_objective_coefficient_nonzero (Variable variable) const |
| |
| bool | is_objective_coefficient_nonzero (Variable first_variable, Variable second_variable) const |
| |
| double | objective_offset () const |
| |
| void | set_objective_offset (double value) |
| |
| bool | is_maximize () const |
| |
| void | set_maximize () |
| |
| void | set_minimize () |
| |
| void | set_is_maximize (bool is_maximize) |
| |
| ModelProto | ExportModel () const |
| |
| std::unique_ptr< UpdateTracker > | NewUpdateTracker () |
| |
| absl::Status | ApplyUpdateProto (const ModelUpdateProto &update_proto) |
| |
| const ModelStorage * | storage () const |
| |
| ModelStorage * | storage () |
| |