![]() |
OR-Tools
9.6
|
Definition at line 46 of file model_builder_helper.h.
Public Member Functions | |
| std::string | ExportToMpsString (const operations_research::MPModelExportOptions &options=MPModelExportOptions()) |
| std::string | ExportToLpString (const operations_research::MPModelExportOptions &options=MPModelExportOptions()) |
| bool | WriteModelToFile (const std::string &filename) |
| bool | ImportFromMpsString (const std::string &mps_string) |
| bool | ImportFromMpsFile (const std::string &mps_file) |
| const MPModelProto & | model () const |
| MPModelProto * | mutable_model () |
| int | AddVar () |
| void | SetVarLowerBound (int var_index, double lb) |
| void | SetVarUpperBound (int var_index, double ub) |
| void | SetVarIntegrality (int var_index, bool is_integer) |
| void | SetVarObjectiveCoefficient (int var_index, double coeff) |
| void | SetVarName (int var_index, const std::string &name) |
| int | AddLinearConstraint () |
| void | SetConstraintLowerBound (int ct_index, double lb) |
| void | SetConstraintUpperBound (int ct_index, double ub) |
| void | AddConstraintTerm (int ct_index, int var_index, double coeff) |
| void | SetConstraintName (int ct_index, const std::string &name) |
| int | num_variables () const |
| double | VarLowerBound (int var_index) const |
| double | VarUpperBound (int var_index) const |
| bool | VarIsIntegral (int var_index) const |
| double | VarObjectiveCoefficient (int var_index) const |
| std::string | VarName (int var_index) const |
| int | num_constraints () const |
| double | ConstraintLowerBound (int ct_index) const |
| double | ConstraintUpperBound (int ct_index) const |
| std::string | ConstraintName (int ct_index) const |
| std::vector< int > | ConstraintVarIndices (int ct_index) const |
| std::vector< double > | ConstraintCoefficients (int ct_index) const |
| std::string | name () const |
| void | SetName (const std::string &name) |
| void | ClearObjective () |
| bool | maximize () const |
| void | SetMaximize (bool maximize) |
| double | ObjectiveOffset () const |
| void | SetObjectiveOffset (double offset) |
| void AddConstraintTerm | ( | int | ct_index, |
| int | var_index, | ||
| double | coeff | ||
| ) |
Definition at line 141 of file model_builder_helper.cc.
| int AddLinearConstraint | ( | ) |
Definition at line 127 of file model_builder_helper.cc.
| int AddVar | ( | ) |
Definition at line 100 of file model_builder_helper.cc.
| void ClearObjective | ( | ) |
Definition at line 207 of file model_builder_helper.cc.
| std::vector< double > ConstraintCoefficients | ( | int | ct_index | ) | const |
Definition at line 196 of file model_builder_helper.cc.
| double ConstraintLowerBound | ( | int | ct_index | ) | const |
Definition at line 179 of file model_builder_helper.cc.
| std::string ConstraintName | ( | int | ct_index | ) | const |
Definition at line 187 of file model_builder_helper.cc.
| double ConstraintUpperBound | ( | int | ct_index | ) | const |
Definition at line 183 of file model_builder_helper.cc.
| std::vector< int > ConstraintVarIndices | ( | int | ct_index | ) | const |
Definition at line 191 of file model_builder_helper.cc.
| std::string ExportToLpString | ( | const operations_research::MPModelExportOptions & | options = MPModelExportOptions() | ) |
Definition at line 44 of file model_builder_helper.cc.
| std::string ExportToMpsString | ( | const operations_research::MPModelExportOptions & | options = MPModelExportOptions() | ) |
Definition at line 38 of file model_builder_helper.cc.
| bool ImportFromMpsFile | ( | const std::string & | mps_file | ) |
Definition at line 68 of file model_builder_helper.cc.
| bool ImportFromMpsString | ( | const std::string & | mps_string | ) |
Definition at line 60 of file model_builder_helper.cc.
| bool maximize | ( | ) | const |
Definition at line 213 of file model_builder_helper.cc.
| const MPModelProto & model | ( | ) | const |
Definition at line 96 of file model_builder_helper.cc.
| MPModelProto * mutable_model | ( | ) |
Definition at line 98 of file model_builder_helper.cc.
| std::string name | ( | ) | const |
Definition at line 202 of file model_builder_helper.cc.
| int num_constraints | ( | ) | const |
Definition at line 175 of file model_builder_helper.cc.
| int num_variables | ( | ) | const |
Definition at line 153 of file model_builder_helper.cc.
| double ObjectiveOffset | ( | ) | const |
Definition at line 219 of file model_builder_helper.cc.
| void SetConstraintLowerBound | ( | int | ct_index, |
| double | lb | ||
| ) |
Definition at line 133 of file model_builder_helper.cc.
| void SetConstraintName | ( | int | ct_index, |
| const std::string & | name | ||
| ) |
Definition at line 148 of file model_builder_helper.cc.
| void SetConstraintUpperBound | ( | int | ct_index, |
| double | ub | ||
| ) |
Definition at line 137 of file model_builder_helper.cc.
| void SetMaximize | ( | bool | maximize | ) |
Definition at line 215 of file model_builder_helper.cc.
| void SetName | ( | const std::string & | name | ) |
Definition at line 204 of file model_builder_helper.cc.
| void SetObjectiveOffset | ( | double | offset | ) |
Definition at line 223 of file model_builder_helper.cc.
| void SetVarIntegrality | ( | int | var_index, |
| bool | is_integer | ||
| ) |
Definition at line 114 of file model_builder_helper.cc.
| void SetVarLowerBound | ( | int | var_index, |
| double | lb | ||
| ) |
Definition at line 106 of file model_builder_helper.cc.
| void SetVarName | ( | int | var_index, |
| const std::string & | name | ||
| ) |
Definition at line 123 of file model_builder_helper.cc.
| void SetVarObjectiveCoefficient | ( | int | var_index, |
| double | coeff | ||
| ) |
Definition at line 118 of file model_builder_helper.cc.
| void SetVarUpperBound | ( | int | var_index, |
| double | ub | ||
| ) |
Definition at line 110 of file model_builder_helper.cc.
| bool VarIsIntegral | ( | int | var_index | ) | const |
Definition at line 163 of file model_builder_helper.cc.
| double VarLowerBound | ( | int | var_index | ) | const |
Definition at line 155 of file model_builder_helper.cc.
| std::string VarName | ( | int | var_index | ) | const |
Definition at line 171 of file model_builder_helper.cc.
| double VarObjectiveCoefficient | ( | int | var_index | ) | const |
Definition at line 167 of file model_builder_helper.cc.
| double VarUpperBound | ( | int | var_index | ) | const |
Definition at line 159 of file model_builder_helper.cc.
| bool WriteModelToFile | ( | const std::string & | filename | ) |
Definition at line 50 of file model_builder_helper.cc.