Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ examples/ cpp/

or-tools/examples/cpp/model_util.cc File Reference

#include "base/commandlineflags.h"
#include "base/integral_types.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/file.h"
#include "base/recordio.h"
#include "constraint_solver/constraint_solver.h"
#include "constraint_solver/model.pb.h"
#include "util/graph_export.h"
#include "util/string_array.h"

Go to the source code of this file.

Namespaces

namespace  operations_research

Functions

 DEFINE_string (input,"","Input file of the problem.")
 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 DEFINE_string (output,"","Output file when doing modifications.")
 DEFINE_string (dot_file,"","Exports model to dot file.")
 DEFINE_string (gml_file,"","Exports model to gml file.")
 DEFINE_bool (print_proto, false,"Prints the raw model protobuf.")
 DEFINE_bool (test_proto, false,"Performs various tests on the model protobuf.")
 DEFINE_bool (model_stats, false,"Prints model statistics.")
 DEFINE_bool (print_model, false,"Pretty print loaded model.")
 DEFINE_string (rename_model,"","Renames to the model.")
 DEFINE_bool (strip_limit, false,"Strips limits from the model.")
 DEFINE_bool (strip_groups, false,"Strips variable groups from the model.")
 DEFINE_bool (upgrade_proto, false,"Upgrade the model to the latest version.")
 DEFINE_string (insert_license,"","Insert content of the given file into the license file.")
 DEFINE_bool (collect_variables, false,"Shows effect of the variable collector.")
string operations_research::ExprLabel (int index)
 Creates node labels.
string operations_research::IntervalLabel (int index)
string operations_research::SequenceLabel (int index)
string operations_research::ConstraintLabel (int index)
template<class T>
void operations_research::ExportLinks (const CPModelProto &model, const string &source, const T &proto, GraphExporter *const exporter)
 Scans argument to add links in the graph.
bool operations_research::GetValueIfConstant (const CPModelProto &model, const CPIntegerExpressionProto &proto, int64 *const value)
 Scans the expression protobuf to see if it corresponds to an integer variable with min_value == max_value.
void operations_research::DeclareExpression (int index, const CPModelProto &proto, GraphExporter *const exporter)
 Declares a labelled expression in the graph file.
void operations_research::DeclareInterval (int index, const CPModelProto &proto, GraphExporter *const exporter)
void operations_research::DeclareSequence (int index, const CPModelProto &proto, GraphExporter *const exporter)
void operations_research::DeclareConstraint (int index, const CPModelProto &proto, GraphExporter *const exporter)
void operations_research::ExportToGraphFile (const CPModelProto &proto, File *const file, GraphExporter::GraphFormat format)
 Parses the proto and exports it to a graph file.
int operations_research::Run ()
 Main Method.
int main (int argc, char **argv)
 namespace operations_research

Variables

static const int operations_research::kProblem = -1
 Utilities.
static const int operations_research::kOk = 0
static const char operations_research::kGreen1 [] = "#A2CD5A"
 Colors.
static const char operations_research::kGreen2 [] = "#76EEC6"
static const char operations_research::kGreen3 [] = "#00CD00"
static const char operations_research::kWhite [] = "#FAFAFA"
static const char operations_research::kBlue [] = "#87CEFA"
static const char operations_research::kYellow [] = "#FFF68F"
static const char operations_research::kRed [] = "#A52A2A"


Function Documentation

DEFINE_bool ( collect_variables  ,
false  ,
"Shows effect of the variable collector."   
)

DEFINE_bool ( upgrade_proto  ,
false  ,
"Upgrade the model to the latest version."   
)

DEFINE_bool ( strip_groups  ,
false  ,
"Strips variable groups from the model."   
)

DEFINE_bool ( strip_limit  ,
false  ,
"Strips limits from the model."   
)

DEFINE_bool ( print_model  ,
false  ,
"Pretty print loaded model."   
)

DEFINE_bool ( model_stats  ,
false  ,
"Prints model statistics."   
)

DEFINE_bool ( test_proto  ,
false  ,
"Performs various tests on the model protobuf."   
)

DEFINE_bool ( print_proto  ,
false  ,
"Prints the raw model protobuf."   
)

DEFINE_string ( insert_license  ,
""  ,
"Insert content of the given file into the license file."   
)

DEFINE_string ( rename_model  ,
""  ,
"Renames to the model."   
)

DEFINE_string ( gml_file  ,
""  ,
"Exports model to gml file."   
)

DEFINE_string ( dot_file  ,
""  ,
"Exports model to dot file."   
)

DEFINE_string ( output  ,
""  ,
"Output file when doing modifications."   
)

DEFINE_string ( input  ,
""  ,
"Input file of the problem."   
)

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

http://www.apache.org/licenses/LICENSE-2.0

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.

int main ( int  argc,
char **  argv 
)

namespace operations_research

Definition at line 418 of file model_util.cc.