![]() |
Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
|
#include <string>
#include <vector>
#include "absl/flags/flag.h"
#include "absl/log/check.h"
#include "absl/strings/match.h"
#include "absl/strings/str_join.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "ortools/algorithms/set_cover_heuristics.h"
#include "ortools/algorithms/set_cover_invariant.h"
#include "ortools/algorithms/set_cover_model.h"
#include "ortools/algorithms/set_cover_reader.h"
#include "ortools/base/init_google.h"
#include "ortools/base/logging.h"
#include "ortools/base/timer.h"
Go to the source code of this file.
Namespaces | |
namespace | operations_research |
In SWIG mode, we don't want anything besides these top-level includes. | |
Functions | |
ABSL_FLAG (std::string, input, "", "REQUIRED: Input file name.") | |
ABSL_FLAG (std::string, input_fmt, "", "REQUIRED: Input file format. Either proto, proto_bin, OrlibRail, " "OrlibScp or FimiDat.") | |
ABSL_FLAG (std::string, hint_sol, "", "Input file name for solution.") | |
ABSL_FLAG (std::string, hint_fmt, "", "Input file format for solution.") | |
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 (std::string, output_model, "", "If non-empty, write the set cover model to the given file. ") | |
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 (std::string, generation, "", "First-solution generation method.") | |
ABSL_FLAG (std::string, improvement, "", "Solution improvement method.") | |
ABSL_FLAG (int, num_threads, 1, "Number of threads to use by the underlying solver.") | |
ABSL_FLAG (bool, solve, false, "Solve the model.") | |
ABSL_FLAG (bool, stats, false, "Log stats about the model.") | |
void | operations_research::LogStats (std::string name, SetCoverModel *model) |
void | operations_research::LogCostAndTiming (std::string name, std::string algo, double cost, BaseInt solution_cardinality, const WallTimer &timer) |
void | operations_research::LogCostAndTiming (std::string name, std::string algo, const SetCoverInvariant &inv, const WallTimer &timer) |
FileFormat | operations_research::ParseFileFormat (const std::string &format_name) |
SetCoverModel | operations_research::ReadModel (absl::string_view input_file, FileFormat input_format) |
SubsetBoolVector | operations_research::ReadSolution (absl::string_view input_file, FileFormat input_format) |
void | operations_research::WriteModel (const SetCoverModel &model, const std::string &output_file, FileFormat output_format) |
void | operations_research::WriteSolution (const SetCoverModel &model, const SubsetBoolVector &solution, absl::string_view output_file, FileFormat output_format) |
SetCoverInvariant | operations_research::RunLazyElementDegree (std::string name, SetCoverModel *model) |
void | operations_research::Run () |
int | main (int argc, char **argv) |
ABSL_FLAG | ( | bool | , |
generate | , | ||
false | , | ||
"Generate a new model from the input model." | ) |
ABSL_FLAG | ( | bool | , |
solve | , | ||
false | , | ||
"Solve the model." | ) |
ABSL_FLAG | ( | bool | , |
stats | , | ||
false | , | ||
"Log stats about the 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 | ( | float | , |
row_scale | , | ||
1. | 0, | ||
"Row scale for the new generated 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 | ( | int | , |
num_threads | , | ||
1 | , | ||
"Number of threads to use by the underlying solver." | ) |
ABSL_FLAG | ( | std::string | , |
generation | , | ||
"" | , | ||
"First-solution generation method." | ) |
ABSL_FLAG | ( | std::string | , |
hint_fmt | , | ||
"" | , | ||
"Input file format for solution." | ) |
ABSL_FLAG | ( | std::string | , |
hint_sol | , | ||
"" | , | ||
"Input file name for solution." | ) |
ABSL_FLAG | ( | std::string | , |
improvement | , | ||
"" | , | ||
"Solution improvement method." | ) |
ABSL_FLAG | ( | std::string | , |
input | , | ||
"" | , | ||
"REQUIRED: Input file name." | ) |
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
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.
ABSL_FLAG | ( | std::string | , |
input_fmt | , | ||
"" | , | ||
"REQUIRED: Input file format. Either | proto, | ||
proto_bin | , | ||
OrlibRail | , | ||
" "OrlibScp or FimiDat." | ) |
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 | ( | std::string | , |
output_model | , | ||
"" | , | ||
"If non- | empty, | ||
write the set cover model to the given file. " | ) |
int main | ( | int | argc, |
char ** | argv ) |
Definition at line 272 of file set_cover_solve.cc.