OR-Tools  9.6
linear_solver/solve.cc File Reference

Go to the source code of this file.

Namespaces

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

Functions

 ABSL_FLAG (std::string, input, "", "REQUIRED: Input file name.")
 
 ABSL_FLAG (std::string, sol_hint, "", "Input file name with solution in .sol format.")
 
 ABSL_FLAG (std::string, solver, "glop", "The solver to use: bop, cbc, clp, glop, glpk_lp, glpk_mip, " "gurobi_lp, gurobi_mip, pdlp, scip, knapsack, sat.")
 
 ABSL_FLAG (int, num_threads, 1, "Number of threads to use by the underlying solver.")
 
 ABSL_FLAG (std::string, params_file, "", "Solver specific parameters file. " "If this flag is set, the --params flag is ignored.")
 
 ABSL_FLAG (std::string, params, "", "Solver specific parameters")
 
 ABSL_FLAG (absl::Duration, time_limit, absl::InfiniteDuration(), "It specifies a limit on the solving time. The duration must be must " "be positive. It default to an infinite duration meaning that no " "time limit will be imposed.")
 
 ABSL_FLAG (std::string, output_csv, "", "If non-empty, write the returned solution in csv format with " "each line formed by a variable name and its value.")
 
 ABSL_FLAG (std::string, dump_format, "text", "Format in which to dump protos (if flags --dump_model, " "--dump_request, or --dump_response are used). Possible values: " "'text', 'binary', 'json' which correspond to text proto format " "binary proto format, and json. If 'binary' or 'json' are used, " "we append '.bin' and '.json' to file names.")
 
 ABSL_FLAG (bool, dump_gzip, false, "Whether to gzip dumped protos. Appends .gz to their name.")
 
 ABSL_FLAG (std::string, dump_model, "", "If non-empty, dumps MPModelProto there.")
 
 ABSL_FLAG (std::string, dump_request, "", "If non-empty, dumps MPModelRequest there.")
 
 ABSL_FLAG (std::string, dump_response, "", "If non-empty, dumps MPSolutionResponse there.")
 
 ABSL_FLAG (std::string, sol_file, "", "If non-empty, output the best solution in Miplib .sol format.")
 
 ABSL_DECLARE_FLAG (bool, verify_solution)
 
 ABSL_DECLARE_FLAG (bool, linear_solver_enable_verbose_output)
 
int main (int argc, char **argv)
 

Variables

static const char kUsageStr []
 

Function Documentation

◆ ABSL_DECLARE_FLAG() [1/2]

ABSL_DECLARE_FLAG ( bool  ,
linear_solver_enable_verbose_output   
)

◆ ABSL_DECLARE_FLAG() [2/2]

ABSL_DECLARE_FLAG ( bool  ,
verify_solution   
)

◆ ABSL_FLAG() [1/14]

ABSL_FLAG ( absl::Duration  ,
time_limit  ,
absl::InfiniteDuration()  ,
"It specifies a limit on the solving time. The duration must be must " "be positive. It default to an infinite duration meaning that no " "time limit will be imposed."   
)

◆ ABSL_FLAG() [2/14]

ABSL_FLAG ( bool  ,
dump_gzip  ,
false  ,
"Whether to gzip dumped protos. Appends .gz to their name."   
)

◆ ABSL_FLAG() [3/14]

ABSL_FLAG ( int  ,
num_threads  ,
,
"Number of threads to use by the underlying solver."   
)

◆ ABSL_FLAG() [4/14]

ABSL_FLAG ( std::string  ,
dump_format  ,
"text"  ,
"Format in which to dump protos (if flags --dump_model, " "--dump_request, or --dump_response are used). Possible values: " "'text'  ,
'binary'  ,
'json' which correspond to text proto format " "binary proto  format,
and json. If 'binary' or 'json' are  used,
" "we append '.bin' and '.json' to file names."   
)

◆ ABSL_FLAG() [5/14]

ABSL_FLAG ( std::string  ,
dump_model  ,
""  ,
"If non-  empty,
dumps MPModelProto there."   
)

◆ ABSL_FLAG() [6/14]

ABSL_FLAG ( std::string  ,
dump_request  ,
""  ,
"If non-  empty,
dumps MPModelRequest there."   
)

◆ ABSL_FLAG() [7/14]

ABSL_FLAG ( std::string  ,
dump_response  ,
""  ,
"If non-  empty,
dumps MPSolutionResponse there."   
)

◆ ABSL_FLAG() [8/14]

ABSL_FLAG ( std::string  ,
input  ,
""  ,
"REQUIRED: Input file name."   
)

◆ ABSL_FLAG() [9/14]

ABSL_FLAG ( std::string  ,
output_csv  ,
""  ,
"If non-  empty,
write the returned solution in csv format with " "each line formed by a variable name and its value."   
)

◆ ABSL_FLAG() [10/14]

ABSL_FLAG ( std::string  ,
params  ,
""  ,
"Solver specific parameters  
)

◆ ABSL_FLAG() [11/14]

ABSL_FLAG ( std::string  ,
params_file  ,
""  ,
"Solver specific parameters file. " "If this flag is  set,
the --params flag is ignored."   
)

◆ ABSL_FLAG() [12/14]

ABSL_FLAG ( std::string  ,
sol_file  ,
""  ,
"If non-  empty,
output the best solution in Miplib .sol format."   
)

◆ ABSL_FLAG() [13/14]

ABSL_FLAG ( std::string  ,
sol_hint  ,
""  ,
"Input file name with solution in .sol format."   
)

◆ ABSL_FLAG() [14/14]

ABSL_FLAG ( std::string  ,
solver  ,
"glop"  ,
"The solver to use:  bop,
cbc  ,
clp  ,
glop  ,
glpk_lp  ,
glpk_mip  ,
" "  gurobi_lp,
gurobi_mip  ,
pdlp  ,
scip  ,
knapsack  ,
sat."   
)

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 393 of file linear_solver/solve.cc.

Variable Documentation

◆ kUsageStr

const char kUsageStr[]
static
Initial value:
=
"Run MPSolver on the given input file. Many formats are supported: \n"
" - a .mps or .mps.gz file,\n"
" - an MPModelProto (binary or text, possibly gzipped),\n"
" - an MPModelRequest (binary or text, possibly gzipped)."

Definition at line 123 of file linear_solver/solve.cc.