OR-Tools  9.3
mathopt_solve_main.cc File Reference

Go to the source code of this file.

Namespaces

namespace  operations_research
 Collection of objects used to extend the Constraint Solver library.
 
namespace  operations_research::math_opt
 

Functions

 ABSL_FLAG (std::string, input_file, "", "the file containing the model to solve; use --format to specify the " "file format")
 
 ABSL_FLAG (std::string, format, "auto", absl::StrCat("the format of the --input_file; possible values:\n", "* ", kMathOptBinaryFormat, ": for a MathOpt ModelProto in binary\n", "* ", kMathOptTextFormat, ": when the proto is in text\n", "* ", kMPSFormat, ": for MPS file (which can be GZiped)\n", "* ", kAutoFormat, ": to guess the format from the file extension:\n", " - '", kPbExt, "', '", kProtoExt, "': ", kMathOptBinaryFormat, "\n", " - '", kPbTxtExt, "', '", kTextProtoExt, "': ", kMathOptTextFormat, "\n", " - '", kMPSExt, "', '", kMPSGzipExt, "': ", kMPSFormat))
 
 ABSL_FLAG (std::vector< std::string >, update_files, {}, absl::StrCat("the file containing ModelUpdateProto to apply to the --input_file; " "when this flag is used, the --format must be either ", kMathOptBinaryFormat, " or ", kMathOptTextFormat))
 
 ABSL_FLAG (operations_research::math_opt::SolverType, solver_type, operations_research::math_opt::SolverType::kGscip, absl::StrCat("the solver to use, possible values: ", absl::StrJoin(operations_research::math_opt::AllSolversRegistry::Instance() ->RegisteredSolvers(), ", ", SolverTypeProtoFormatter())))
 
 ABSL_FLAG (bool, solver_logs, false, "use a message callback to print the solver convergence logs")
 
 ABSL_FLAG (absl::Duration, time_limit, absl::InfiniteDuration(), "the time limit to use for the solve")
 
int main (int argc, char *argv[])
 

Variables

constexpr absl::string_view kMathOptBinaryFormat = "mathopt"
 
constexpr absl::string_view kMathOptTextFormat = "mathopt_txt"
 
constexpr absl::string_view kMPSFormat = "mps"
 
constexpr absl::string_view kAutoFormat = "auto"
 
constexpr absl::string_view kPbExt = ".pb"
 
constexpr absl::string_view kProtoExt = ".proto"
 
constexpr absl::string_view kPbTxtExt = ".pb.txt"
 
constexpr absl::string_view kTextProtoExt = ".textproto"
 
constexpr absl::string_view kMPSExt = ".mps"
 
constexpr absl::string_view kMPSGzipExt = ".mps.gz"
 

Function Documentation

◆ ABSL_FLAG() [1/6]

ABSL_FLAG ( absl::Duration  ,
time_limit  ,
absl::InfiniteDuration()  ,
"the time limit to use for the solve"   
)

◆ ABSL_FLAG() [2/6]

ABSL_FLAG ( bool  ,
solver_logs  ,
false  ,
"use a message callback to print the solver convergence logs"   
)

◆ ABSL_FLAG() [3/6]

ABSL_FLAG ( operations_research::math_opt::SolverType  ,
solver_type  ,
operations_research::math_opt::SolverType::kGscip  ,
absl::StrCat("the solver to use, possible values: ", absl::StrJoin(operations_research::math_opt::AllSolversRegistry::Instance() ->RegisteredSolvers(), ", ", SolverTypeProtoFormatter()))   
)

◆ ABSL_FLAG() [4/6]

ABSL_FLAG ( std::string  ,
format  ,
"auto"  ,
absl::StrCat("the format of the --input_file; possible values:\n", "* ", kMathOptBinaryFormat, ": for a MathOpt ModelProto in binary\n", "* ", kMathOptTextFormat, ": when the proto is in text\n", "* ", kMPSFormat, ": for MPS file (which can be GZiped)\n", "* ", kAutoFormat, ": to guess the format from the file extension:\n", " - '", kPbExt, "', '", kProtoExt, "': ", kMathOptBinaryFormat, "\n", " - '", kPbTxtExt, "', '", kTextProtoExt, "': ", kMathOptTextFormat, "\n", " - '", kMPSExt, "', '", kMPSGzipExt, "': ", kMPSFormat  
)

◆ ABSL_FLAG() [5/6]

ABSL_FLAG ( std::string  ,
input_file  ,
""  ,
"the file containing the model to solve; use --format to specify the " "file format"   
)

◆ ABSL_FLAG() [6/6]

ABSL_FLAG ( std::vector< std::string >  ,
update_files  ,
{}  ,
absl::StrCat("the file containing ModelUpdateProto to apply to the --input_file; " "when this flag is used, the --format must be either ", kMathOptBinaryFormat, " or ", kMathOptTextFormat)   
)

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 255 of file mathopt_solve_main.cc.

Variable Documentation

◆ kAutoFormat

constexpr absl::string_view kAutoFormat = "auto"
inlineconstexpr

Definition at line 52 of file mathopt_solve_main.cc.

◆ kMathOptBinaryFormat

constexpr absl::string_view kMathOptBinaryFormat = "mathopt"
inlineconstexpr

Definition at line 49 of file mathopt_solve_main.cc.

◆ kMathOptTextFormat

constexpr absl::string_view kMathOptTextFormat = "mathopt_txt"
inlineconstexpr

Definition at line 50 of file mathopt_solve_main.cc.

◆ kMPSExt

constexpr absl::string_view kMPSExt = ".mps"
inlineconstexpr

Definition at line 58 of file mathopt_solve_main.cc.

◆ kMPSFormat

constexpr absl::string_view kMPSFormat = "mps"
inlineconstexpr

Definition at line 51 of file mathopt_solve_main.cc.

◆ kMPSGzipExt

constexpr absl::string_view kMPSGzipExt = ".mps.gz"
inlineconstexpr

Definition at line 59 of file mathopt_solve_main.cc.

◆ kPbExt

constexpr absl::string_view kPbExt = ".pb"
inlineconstexpr

Definition at line 54 of file mathopt_solve_main.cc.

◆ kPbTxtExt

constexpr absl::string_view kPbTxtExt = ".pb.txt"
inlineconstexpr

Definition at line 56 of file mathopt_solve_main.cc.

◆ kProtoExt

constexpr absl::string_view kProtoExt = ".proto"
inlineconstexpr

Definition at line 55 of file mathopt_solve_main.cc.

◆ kTextProtoExt

constexpr absl::string_view kTextProtoExt = ".textproto"
inlineconstexpr

Definition at line 57 of file mathopt_solve_main.cc.