![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
#include <algorithm>#include <cmath>#include <cstdint>#include <iostream>#include <string>#include <tuple>#include <vector>#include "absl/base/macros.h"#include "absl/flags/flag.h"#include "absl/log/check.h"#include "absl/log/log.h"#include "absl/strings/match.h"#include "absl/strings/str_cat.h"#include "absl/strings/str_format.h"#include "absl/strings/str_join.h"#include "absl/strings/string_view.h"#include "absl/time/time.h"#include "ortools/base/init_google.h"#include "ortools/base/timer.h"#include "ortools/set_cover/base_types.h"#include "ortools/set_cover/set_cover_heuristics.h"#include "ortools/set_cover/set_cover_invariant.h"#include "ortools/set_cover/set_cover_model.h"#include "ortools/set_cover/set_cover_reader.h"Go to the source code of this file.
Namespaces | |
| namespace | operations_research |
| OR-Tools root namespace. | |
Macros | |
| #define | BUILD_VECTOR(files) |
Typedefs | |
| using | operations_research::BenchmarksTableRow |
Functions | |
| ABSL_FLAG (std::string, input, "", "REQUIRED: Input file name.") | |
| ABSL_FLAG (std::string, input_fmt, "", "REQUIRED: Input file format. Either proto, proto_bin, rail, " "orlib or fimi.") | |
| ABSL_FLAG (std::string, output, "", "If non-empty, write the returned solution to the given file.") | |
| ABSL_FLAG (std::string, output_fmt, "", "If out is non-empty, use the given format for the output.") | |
| ABSL_FLAG (bool, generate, false, "Generate a new model from the input model.") | |
| ABSL_FLAG (int, num_elements_wanted, 0, "Number of elements wanted in the new generated model.") | |
| ABSL_FLAG (int, num_subsets_wanted, 0, "Number of subsets wanted in the new generated model.") | |
| ABSL_FLAG (float, row_scale, 1.0, "Row scale for the new generated model.") | |
| ABSL_FLAG (float, column_scale, 1.0, "Column scale for the new generated model.") | |
| ABSL_FLAG (float, cost_scale, 1.0, "Cost scale for the new generated model.") | |
| ABSL_FLAG (bool, unicost, false, "Set all costs to 1.0.") | |
| ABSL_FLAG (bool, latex, false, "Output in LaTeX format. CSV otherwise.") | |
| ABSL_FLAG (bool, solve, false, "Solve the model.") | |
| ABSL_FLAG (bool, stats, false, "Log stats about the model.") | |
| ABSL_FLAG (bool, summarize, false, "Display the comparison of the solution generators.") | |
| ABSL_FLAG (bool, tlns, false, "Run thrifty LNS.") | |
| ABSL_FLAG (int, max_elements_for_classic, 5000, "Do not use classic on larger problems.") | |
| ABSL_FLAG (bool, benchmarks, false, "Run benchmarks.") | |
| ABSL_FLAG (std::string, benchmarks_dir, "", "Benchmarks directory.") | |
| ABSL_FLAG (bool, collate_scp, false, "Collate the SCP benchmarks.") | |
| int64_t | operations_research::RunTimeInMicroseconds (const SetCoverSolutionGenerator &gen) |
| int64_t | operations_research::RunTimeInNanoseconds (const SetCoverSolutionGenerator &gen) |
| void | operations_research::LogStats (const SetCoverModel &model) |
| void | operations_research::LogCostAndTiming (const absl::string_view problem_name, absl::string_view alg_name, const SetCoverInvariant &inv, int64_t run_time) |
| void | operations_research::LogCostAndTiming (const SetCoverSolutionGenerator &generator) |
| FileFormat | operations_research::ParseFileFormat (const std::string &format_name) |
| SetCoverModel | operations_research::ReadModel (absl::string_view filename, FileFormat format) |
| SubsetBoolVector | operations_research::ReadSolution (absl::string_view filename, FileFormat format) |
| void | operations_research::WriteModel (const SetCoverModel &model, const std::string &filename, FileFormat format) |
| void | operations_research::WriteSolution (const SetCoverModel &model, const SubsetBoolVector &solution, absl::string_view filename, FileFormat format) |
| SetCoverInvariant | operations_research::RunLazyElementDegree (SetCoverModel *model) |
| SetCoverInvariant | operations_research::RunGreedy (SetCoverModel *model) |
| std::vector< BenchmarksTableRow > | operations_research::BenchmarksTable () |
| void | operations_research::Benchmarks () |
| void | operations_research::Run () |
| int | main (int argc, char **argv) |
Variables | |
| static const char *const | operations_research::kRailFiles [] |
| static const char *const | operations_research::kScp4To6Files [] |
| static const char *const | operations_research::kScpAToEFiles [] |
| static const char *const | operations_research::kScpNrFiles [] |
| static const char *const | operations_research::kScpClrFiles [] |
| static const char *const | operations_research::kScpCycFiles [] |
| static const char *const | operations_research::kWedelinFiles [] |
| static const char *const | operations_research::kBalasFiles [] |
| static const char *const | operations_research::kFimiFiles [] |
| #define BUILD_VECTOR | ( | files | ) |
| ABSL_FLAG | ( | bool | , |
| benchmarks | , | ||
| false | , | ||
| "Run benchmarks." | ) |
| ABSL_FLAG | ( | bool | , |
| collate_scp | , | ||
| false | , | ||
| "Collate the SCP benchmarks." | ) |
| ABSL_FLAG | ( | bool | , |
| generate | , | ||
| false | , | ||
| "Generate a new model from the input model." | ) |
| ABSL_FLAG | ( | bool | , |
| latex | , | ||
| false | , | ||
| "Output in LaTeX format. CSV otherwise." | ) |
| ABSL_FLAG | ( | bool | , |
| solve | , | ||
| false | , | ||
| "Solve the model." | ) |
| ABSL_FLAG | ( | bool | , |
| stats | , | ||
| false | , | ||
| "Log stats about the model." | ) |
| ABSL_FLAG | ( | bool | , |
| summarize | , | ||
| false | , | ||
| "Display the comparison of the solution generators." | ) |
| ABSL_FLAG | ( | bool | , |
| tlns | , | ||
| false | , | ||
| "Run thrifty LNS." | ) |
| ABSL_FLAG | ( | bool | , |
| unicost | , | ||
| false | , | ||
| "Set all costs to 1.0." | ) |
| ABSL_FLAG | ( | float | , |
| column_scale | , | ||
| 1. | 0, | ||
| "Column scale for the new generated model." | ) |
| ABSL_FLAG | ( | float | , |
| cost_scale | , | ||
| 1. | 0, | ||
| "Cost scale for the new generated model." | ) |
| ABSL_FLAG | ( | float | , |
| row_scale | , | ||
| 1. | 0, | ||
| "Row scale for the new generated model." | ) |
| ABSL_FLAG | ( | int | , |
| max_elements_for_classic | , | ||
| 5000 | , | ||
| "Do not use classic on larger problems." | ) |
| ABSL_FLAG | ( | int | , |
| num_elements_wanted | , | ||
| 0 | , | ||
| "Number of elements wanted in the new generated model." | ) |
| ABSL_FLAG | ( | int | , |
| num_subsets_wanted | , | ||
| 0 | , | ||
| "Number of subsets wanted in the new generated model." | ) |
| ABSL_FLAG | ( | std::string | , |
| benchmarks_dir | , | ||
| "" | , | ||
| "Benchmarks directory." | ) |
| ABSL_FLAG | ( | std::string | , |
| input_fmt | , | ||
| "" | , | ||
| "REQUIRED: Input file format. Either | proto, | ||
| proto_bin | , | ||
| rail | , | ||
| " "orlib or fimi." | ) |
| ABSL_FLAG | ( | std::string | , |
| output | , | ||
| "" | , | ||
| "If non- | empty, | ||
| write the returned solution to the given file." | ) |
| ABSL_FLAG | ( | std::string | , |
| output_fmt | , | ||
| "" | , | ||
| "If out is non- | empty, | ||
| use the given format for the output." | ) |
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 716 of file set_cover_solve.cc.