#include <cstdlib>
#include <cstring>
#include <iostream>
#include <ostream>
#include <string>
#include <vector>
#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/flags/usage.h"
#include "absl/log/check.h"
#include "absl/log/flags.h"
#include "absl/log/initialize.h"
#include "absl/log/log.h"
#include "absl/strings/match.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "google/protobuf/text_format.h"
#include "ortools/base/logging.h"
#include "ortools/base/path.h"
#include "ortools/base/timer.h"
#include "ortools/flatzinc/cp_model_fz_solver.h"
#include "ortools/flatzinc/model.h"
#include "ortools/flatzinc/parser.h"
#include "ortools/sat/model.h"
#include "ortools/util/logging.h"
Go to the source code of this file.
|
| | ABSL_FLAG (double, time_limit, 0, "time limit in seconds.") |
| | ABSL_FLAG (bool, search_all_solutions, false, "Search for all solutions.") |
| | ABSL_FLAG (bool, display_all_solutions, false, "Display all improving solutions.") |
| | ABSL_FLAG (bool, free_search, !kOrToolsMode, "If false, the solver must follow the defined search." "If true, other search are allowed.") |
| | ABSL_FLAG (int, threads, 0, "Number of threads the solver will use.") |
| | ABSL_FLAG (bool, statistics, false, "Print solver statistics after search.") |
| | ABSL_FLAG (bool, read_from_stdin, false, "Read the FlatZinc from stdin, not from a file.") |
| | ABSL_FLAG (int, fz_seed, 0, "Random seed") |
| | ABSL_FLAG (std::string, fz_model_name, "stdin", "Define problem name when reading from stdin.") |
| | ABSL_FLAG (std::string, params, "", "SatParameters as a text proto.") |
| | ABSL_FLAG (bool, fz_logging, false, "Print logging information from the flatzinc interpreter.") |
| | ABSL_FLAG (bool, ortools_mode, kOrToolsMode, "Display solutions in the flatzinc format") |
| | ABSL_FLAG (bool, fz_check_all_solutions, DEBUG_MODE, "Checks all solutions returned by the solver.") |
| | ABSL_FLAG (bool, ignore_redundant_constraints, false, "Ignore redundant constraints.") |
| | ABSL_FLAG (bool, ignore_symmetry_breaking_constraints, false, "Ignore symmetry breaking constraints.") |
| std::vector< char * > | operations_research::fz::FixAndParseParameters (int *argc, char ***argv) |
| Model | operations_research::fz::ParseFlatzincModel (const std::string &input, bool input_is_filename, SolverLogger *logger, absl::Duration *parse_duration) |
| void | operations_research::fz::LogInFlatzincFormat (const std::string &multi_line_input) |
| int | main (int argc, char **argv) |
◆ ABSL_FLAG() [1/15]
| ABSL_FLAG |
( |
bool | , |
|
|
display_all_solutions | , |
|
|
false | , |
|
|
"Display all improving solutions." | ) |
◆ ABSL_FLAG() [2/15]
| ABSL_FLAG |
( |
bool | , |
|
|
free_search | , |
|
|
! | kOrToolsMode, |
|
|
"If | false, |
|
|
the solver must follow the defined search." "If | true, |
|
|
other search are allowed." | ) |
◆ ABSL_FLAG() [3/15]
| ABSL_FLAG |
( |
bool | , |
|
|
fz_check_all_solutions | , |
|
|
DEBUG_MODE | , |
|
|
"Checks all solutions returned by the solver." | ) |
◆ ABSL_FLAG() [4/15]
| ABSL_FLAG |
( |
bool | , |
|
|
fz_logging | , |
|
|
false | , |
|
|
"Print logging information from the flatzinc interpreter." | ) |
◆ ABSL_FLAG() [5/15]
| ABSL_FLAG |
( |
bool | , |
|
|
ignore_redundant_constraints | , |
|
|
false | , |
|
|
"Ignore redundant constraints." | ) |
◆ ABSL_FLAG() [6/15]
| ABSL_FLAG |
( |
bool | , |
|
|
ignore_symmetry_breaking_constraints | , |
|
|
false | , |
|
|
"Ignore symmetry breaking constraints." | ) |
◆ ABSL_FLAG() [7/15]
| ABSL_FLAG |
( |
bool | , |
|
|
ortools_mode | , |
|
|
kOrToolsMode | , |
|
|
"Display solutions in the flatzinc format" | ) |
◆ ABSL_FLAG() [8/15]
| ABSL_FLAG |
( |
bool | , |
|
|
read_from_stdin | , |
|
|
false | , |
|
|
"Read the FlatZinc from | stdin, |
|
|
not from a file." | ) |
◆ ABSL_FLAG() [9/15]
| ABSL_FLAG |
( |
bool | , |
|
|
search_all_solutions | , |
|
|
false | , |
|
|
"Search for all solutions." | ) |
◆ ABSL_FLAG() [10/15]
| ABSL_FLAG |
( |
bool | , |
|
|
statistics | , |
|
|
false | , |
|
|
"Print solver statistics after search." | ) |
◆ ABSL_FLAG() [11/15]
| ABSL_FLAG |
( |
double | , |
|
|
time_limit | , |
|
|
0 | , |
|
|
"time limit in seconds." | ) |
◆ ABSL_FLAG() [12/15]
| ABSL_FLAG |
( |
int | , |
|
|
fz_seed | , |
|
|
0 | , |
|
|
"Random seed" | ) |
◆ ABSL_FLAG() [13/15]
| ABSL_FLAG |
( |
int | , |
|
|
threads | , |
|
|
0 | , |
|
|
"Number of threads the solver will use." | ) |
◆ ABSL_FLAG() [14/15]
| ABSL_FLAG |
( |
std::string | , |
|
|
fz_model_name | , |
|
|
"stdin" | , |
|
|
"Define problem name when reading from stdin." | ) |
◆ ABSL_FLAG() [15/15]
| ABSL_FLAG |
( |
std::string | , |
|
|
params | , |
|
|
"" | , |
|
|
"SatParameters as a text proto." | ) |
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
- Examples
- tsp_circuit_board.cc, tsp_cities.cc, tsp_distance_matrix.cc, vrp.cc, vrp_capacity.cc, vrp_drop_nodes.cc, vrp_global_span.cc, vrp_initial_routes.cc, vrp_pickup_delivery.cc, vrp_pickup_delivery_fifo.cc, vrp_pickup_delivery_lifo.cc, vrp_resources.cc, vrp_starts_ends.cc, vrp_time_windows.cc, and vrp_with_time_limit.cc.
Definition at line 218 of file fz.cc.
◆ kOrToolsMode
Definition at line 50 of file fz.cc.