Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. More...
Classes | |
| class | MPConstraintProto |
| class | MPGeneralConstraintProto |
| class | MPIndicatorConstraint |
| struct | MPModelExportOptions |
| class | MPModelProto |
| class | MPModelRequest |
| class | MPSolutionResponse |
| class | MPSolverCommonParameters |
| class | MPVariableProto |
| class | OptionalDouble |
| class | PartialVariableAssignment |
Functions | |
| util::StatusOr< std::string > | ExportModelAsLpFormat (const MPModelProto &model, const MPModelExportOptions &options=MPModelExportOptions()) |
| Outputs the current model (variables, constraints, objective) as a std::string encoded in the so-called "CPLEX LP file format" as generated by SCIP. More... | |
| util::StatusOr< std::string > | ExportModelAsMpsFormat (const MPModelProto &model, const MPModelExportOptions &options=MPModelExportOptions()) |
| Outputs the current model (variables, constraints, objective) as a std::string encoded in MPS file format, using the "free" MPS format. More... | |
| std::string | ExportModelAsLpFormatReturnString (const MPModelProto &input_model, const MPModelExportOptions &options=MPModelExportOptions()) |
| std::string | ExportModelAsMpsFormatReturnString (const MPModelProto &input_model, const MPModelExportOptions &options=MPModelExportOptions()) |
| std::string | FindErrorInMPModelProto (const MPModelProto &model) |
| Returns an empty std::string iff the model is valid and not trivially infeasible. More... | |
| std::string | FindFeasibilityErrorInSolutionHint (const MPModelProto &model, double tolerance) |
| Returns an empty std::string if the solution hint given in the model is a feasible solution. More... | |
| bool | MPSolverCommonParameters_LPAlgorithmValues_IsValid (int value) |
| const ::google::protobuf::EnumDescriptor * | MPSolverCommonParameters_LPAlgorithmValues_descriptor () |
| const ::std::string & | MPSolverCommonParameters_LPAlgorithmValues_Name (MPSolverCommonParameters_LPAlgorithmValues value) |
| bool | MPSolverCommonParameters_LPAlgorithmValues_Parse (const ::std::string &name, MPSolverCommonParameters_LPAlgorithmValues *value) |
| bool | MPModelRequest_SolverType_IsValid (int value) |
| const ::google::protobuf::EnumDescriptor * | MPModelRequest_SolverType_descriptor () |
| const ::std::string & | MPModelRequest_SolverType_Name (MPModelRequest_SolverType value) |
| bool | MPModelRequest_SolverType_Parse (const ::std::string &name, MPModelRequest_SolverType *value) |
| bool | MPSolverResponseStatus_IsValid (int value) |
| const ::google::protobuf::EnumDescriptor * | MPSolverResponseStatus_descriptor () |
| const ::std::string & | MPSolverResponseStatus_Name (MPSolverResponseStatus value) |
| bool | MPSolverResponseStatus_Parse (const ::std::string &name, MPSolverResponseStatus *value) |
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.
Definition at line 122 of file linear_solver.pb.h.
Definition at line 101 of file linear_solver.pb.h.
Definition at line 152 of file linear_solver.pb.h.
| util::StatusOr<std::string> operations_research::ExportModelAsLpFormat | ( | const MPModelProto & | model, |
| const MPModelExportOptions & | options = MPModelExportOptions() |
||
| ) |
Outputs the current model (variables, constraints, objective) as a std::string encoded in the so-called "CPLEX LP file format" as generated by SCIP.
The LP file format is easily readable by a human.
Returns false if some error has occurred during execution. The validity of names is automatically checked. If a variable name or a constraint name is invalid or non-existent, a new valid name is automatically generated.
If 'obfuscated' is true, the variable and constraint names of proto_ are not used. Variable and constraint names of the form "V12345" and "C12345" are used instead.
For more information about the different LP file formats: http://lpsolve.sourceforge.net/5.5/lp-format.htm The following give a reasonable idea of the CPLEX LP file format: http://lpsolve.sourceforge.net/5.5/CPLEX-format.htm http://tinyurl.com/cplex-lp-format http://www.gurobi.com/documentation/5.1/reference-manual/node871
| std::string operations_research::ExportModelAsLpFormatReturnString | ( | const MPModelProto & | input_model, |
| const MPModelExportOptions & | options = MPModelExportOptions() |
||
| ) |
Definition at line 24 of file model_exporter_swig_helper.h.
| util::StatusOr<std::string> operations_research::ExportModelAsMpsFormat | ( | const MPModelProto & | model, |
| const MPModelExportOptions & | options = MPModelExportOptions() |
||
| ) |
Outputs the current model (variables, constraints, objective) as a std::string encoded in MPS file format, using the "free" MPS format.
Returns false if some error has occurred during execution. Models with maximization objectives trigger an error, because MPS can encode only minimization problems.
The validity of names is automatically checked. If a variable name or a constraint name is invalid or non-existent, a new valid name is automatically generated.
Name validity and obfuscation works exactly as in ExportModelAsLpFormat().
For more information about the MPS format: http://en.wikipedia.org/wiki/MPS_(format) A close-to-original description coming from OSL: http://tinyurl.com/mps-format-by-osl A recent description from CPLEX: http://tinyurl.com/mps-format-by-cplex CPLEX extensions: http://tinyurl.com/mps-extensions-by-cplex Gurobi's description: http://www.gurobi.com/documentation/5.1/reference-manual/node869
| std::string operations_research::ExportModelAsMpsFormatReturnString | ( | const MPModelProto & | input_model, |
| const MPModelExportOptions & | options = MPModelExportOptions() |
||
| ) |
Definition at line 31 of file model_exporter_swig_helper.h.
| std::string operations_research::FindErrorInMPModelProto | ( | const MPModelProto & | model | ) |
Returns an empty std::string iff the model is valid and not trivially infeasible.
Otherwise, returns a description of the first error or trivial infeasibility encountered.
NOTE(user): the code of this method (and the client code too!) is considerably simplified by this std::string-based, simple API. If clients require it, we could add a formal error status enum.
| std::string operations_research::FindFeasibilityErrorInSolutionHint | ( | const MPModelProto & | model, |
| double | tolerance | ||
| ) |
Returns an empty std::string if the solution hint given in the model is a feasible solution.
Otherwise, returns a description of the first reason for infeasibility.
This function can be useful for debugging/checking that the given solution hint is feasible when it is expected to be the case. The feasibility is checked up to the given tolerance using the ::operations_research::IsLowerWithinTolerance() function.
| const ::google::protobuf::EnumDescriptor* operations_research::MPModelRequest_SolverType_descriptor | ( | ) |
| bool operations_research::MPModelRequest_SolverType_IsValid | ( | int | value | ) |
|
inline |
Definition at line 143 of file linear_solver.pb.h.
|
inline |
Definition at line 147 of file linear_solver.pb.h.
| const ::google::protobuf::EnumDescriptor* operations_research::MPSolverCommonParameters_LPAlgorithmValues_descriptor | ( | ) |
| bool operations_research::MPSolverCommonParameters_LPAlgorithmValues_IsValid | ( | int | value | ) |
|
inline |
Definition at line 113 of file linear_solver.pb.h.
|
inline |
Definition at line 117 of file linear_solver.pb.h.
| const ::google::protobuf::EnumDescriptor* operations_research::MPSolverResponseStatus_descriptor | ( | ) |
| bool operations_research::MPSolverResponseStatus_IsValid | ( | int | value | ) |
|
inline |
Definition at line 172 of file linear_solver.pb.h.
|
inline |
Definition at line 176 of file linear_solver.pb.h.
| MPConstraintProtoDefaultTypeInternal operations_research::_MPConstraintProto_default_instance_ |
| MPGeneralConstraintProtoDefaultTypeInternal operations_research::_MPGeneralConstraintProto_default_instance_ |
| MPIndicatorConstraintDefaultTypeInternal operations_research::_MPIndicatorConstraint_default_instance_ |
| MPModelProtoDefaultTypeInternal operations_research::_MPModelProto_default_instance_ |
| MPModelRequestDefaultTypeInternal operations_research::_MPModelRequest_default_instance_ |
| MPSolutionResponseDefaultTypeInternal operations_research::_MPSolutionResponse_default_instance_ |
| MPSolverCommonParametersDefaultTypeInternal operations_research::_MPSolverCommonParameters_default_instance_ |
| MPVariableProtoDefaultTypeInternal operations_research::_MPVariableProto_default_instance_ |
| OptionalDoubleDefaultTypeInternal operations_research::_OptionalDouble_default_instance_ |
| PartialVariableAssignmentDefaultTypeInternal operations_research::_PartialVariableAssignment_default_instance_ |
| const int operations_research::MPModelRequest_SolverType_SolverType_ARRAYSIZE = MPModelRequest_SolverType_SolverType_MAX + 1 |
Definition at line 140 of file linear_solver.pb.h.
| const MPModelRequest_SolverType operations_research::MPModelRequest_SolverType_SolverType_MAX = MPModelRequest_SolverType_SAT_INTEGER_PROGRAMMING |
Definition at line 139 of file linear_solver.pb.h.
| const MPModelRequest_SolverType operations_research::MPModelRequest_SolverType_SolverType_MIN = MPModelRequest_SolverType_CLP_LINEAR_PROGRAMMING |
Definition at line 138 of file linear_solver.pb.h.
| const int operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_ARRAYSIZE = MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX + 1 |
Definition at line 110 of file linear_solver.pb.h.
| const MPSolverCommonParameters_LPAlgorithmValues operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MAX = MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_BARRIER |
Definition at line 109 of file linear_solver.pb.h.
| const MPSolverCommonParameters_LPAlgorithmValues operations_research::MPSolverCommonParameters_LPAlgorithmValues_LPAlgorithmValues_MIN = MPSolverCommonParameters_LPAlgorithmValues_LP_ALGO_UNSPECIFIED |
Definition at line 108 of file linear_solver.pb.h.
| const int operations_research::MPSolverResponseStatus_ARRAYSIZE = MPSolverResponseStatus_MAX + 1 |
Definition at line 169 of file linear_solver.pb.h.
| const MPSolverResponseStatus operations_research::MPSolverResponseStatus_MAX = MPSOLVER_UNKNOWN_STATUS |
Definition at line 168 of file linear_solver.pb.h.
| const MPSolverResponseStatus operations_research::MPSolverResponseStatus_MIN = MPSOLVER_OPTIMAL |
Definition at line 167 of file linear_solver.pb.h.