clang-format
This commit is contained in:
@@ -14,12 +14,12 @@
|
||||
#ifndef OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_
|
||||
#define OR_TOOLS_LINEAR_SOLVER_MODEL_EXPORTER_H_
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "ortools/base/macros.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include "ortools/base/macros.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -34,9 +34,9 @@ class MPModelProtoExporter {
|
||||
// The argument must live as long as this class is active.
|
||||
explicit MPModelProtoExporter(const MPModelProto& proto);
|
||||
|
||||
// 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.
|
||||
// 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
|
||||
@@ -55,9 +55,9 @@ class MPModelProtoExporter {
|
||||
// http://www.gurobi.com/documentation/5.1/reference-manual/node871
|
||||
bool ExportModelAsLpFormat(bool obfuscated, std::string* model_str);
|
||||
|
||||
// Outputs the current model (variables, constraints, objective) as a std::string
|
||||
// encoded in MPS file format, using the "fixed" MPS format if possible,
|
||||
// and the "free" MPS format otherwise.
|
||||
// Outputs the current model (variables, constraints, objective) as a
|
||||
// std::string encoded in MPS file format, using the "fixed" MPS format if
|
||||
// possible, and the "free" MPS format otherwise.
|
||||
//
|
||||
// Returns false if some error has occurred during execution.
|
||||
//
|
||||
@@ -131,11 +131,13 @@ class MPModelProtoExporter {
|
||||
|
||||
// Clears "output" and writes a term to it, in "Lp" format. Returns false on
|
||||
// error (for example, var_index is out of range).
|
||||
bool WriteLpTerm(int var_index, double coefficient, std::string* output) const;
|
||||
bool WriteLpTerm(int var_index, double coefficient,
|
||||
std::string* output) const;
|
||||
|
||||
// Appends a pair name, value to "output", formatted to comply with the MPS
|
||||
// standard.
|
||||
void AppendMpsPair(const std::string& name, double value, std::string* output) const;
|
||||
void AppendMpsPair(const std::string& name, double value,
|
||||
std::string* output) const;
|
||||
|
||||
// Appends the head of a line, consisting of an id and a name to output.
|
||||
void AppendMpsLineHeader(const std::string& id, const std::string& name,
|
||||
@@ -143,15 +145,17 @@ class MPModelProtoExporter {
|
||||
|
||||
// Same as AppendMpsLineHeader. Appends an extra new-line at the end the
|
||||
// std::string pointed to by output.
|
||||
void AppendMpsLineHeaderWithNewLine(const std::string& id, const std::string& name,
|
||||
void AppendMpsLineHeaderWithNewLine(const std::string& id,
|
||||
const std::string& name,
|
||||
std::string* output) const;
|
||||
|
||||
// Appends an MPS term in various contexts. The term consists of a head name,
|
||||
// a name, and a value. If the line is not empty, then only the pair
|
||||
// (name, value) is appended. The number of columns, limited to 2 by the MPS
|
||||
// format is also taken care of.
|
||||
void AppendMpsTermWithContext(const std::string& head_name, const std::string& name,
|
||||
double value, std::string* output);
|
||||
void AppendMpsTermWithContext(const std::string& head_name,
|
||||
const std::string& name, double value,
|
||||
std::string* output);
|
||||
|
||||
// Appends a new-line if two columns are already present on the MPS line.
|
||||
// Used by and in complement to AppendMpsTermWithContext.
|
||||
|
||||
Reference in New Issue
Block a user