Backport trivial changes
This commit is contained in:
@@ -22,14 +22,10 @@
|
||||
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "absl/types/span.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/mathutil.h"
|
||||
#include "ortools/base/numbers.h"
|
||||
#include "ortools/base/status_macros.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/scheduling/course_scheduling.pb.h"
|
||||
|
||||
|
||||
@@ -14,13 +14,11 @@
|
||||
#ifndef OR_TOOLS_EXAMPLES_COURSE_SCHEDULING_H_
|
||||
#define OR_TOOLS_EXAMPLES_COURSE_SCHEDULING_H_
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/types/span.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/sat/cp_model.pb.h"
|
||||
|
||||
@@ -19,9 +19,11 @@
|
||||
// ./course_scheduling_run --input_file=testdata/my_input_proto.textproto
|
||||
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/log/log.h"
|
||||
#include "examples/cpp/course_scheduling.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/helpers.h"
|
||||
#include "ortools/base/init_google.h"
|
||||
#include "ortools/base/options.h"
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
|
||||
#include "examples/cpp/fap_model_printer.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -11,10 +11,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Prints a model of Frequency Assignment Problem.
|
||||
// Format: http://www.inra.fr/mia/T/schiex/Doc/CELAR.shtml#synt
|
||||
//
|
||||
|
||||
#ifndef OR_TOOLS_EXAMPLES_FAP_MODEL_PRINTER_H_
|
||||
#define OR_TOOLS_EXAMPLES_FAP_MODEL_PRINTER_H_
|
||||
|
||||
@@ -11,10 +11,8 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Reading and parsing the data of Frequency Assignment Problem
|
||||
// Format: http://www.inra.fr/mia/T/schiex/Doc/CELAR.shtml#synt
|
||||
//
|
||||
|
||||
#ifndef OR_TOOLS_EXAMPLES_FAP_PARSER_H_
|
||||
#define OR_TOOLS_EXAMPLES_FAP_PARSER_H_
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
|
||||
#include "examples/cpp/fap_utilities.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Utilities used by frequency_assignment_problem.cc.
|
||||
//
|
||||
|
||||
#ifndef OR_TOOLS_EXAMPLES_FAP_UTILITIES_H_
|
||||
#define OR_TOOLS_EXAMPLES_FAP_UTILITIES_H_
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Frequency Assignment Problem
|
||||
// The Radio Link Frequency Assignment Problem consists in assigning frequencies
|
||||
// to a set of radio links defined between pairs of sites in order to avoid
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Golomb ruler problem
|
||||
//
|
||||
// find minimal ruler so that the differences between ticks are unique.
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/log/globals.h"
|
||||
#include "absl/log/log.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "ortools/base/init_google.h"
|
||||
#include "ortools/sat/cp_model.h"
|
||||
|
||||
@@ -50,7 +51,7 @@ static const int kItemsVolumes[] = {281, 307, 206, 111, 275,
|
||||
79, 23, 65, 261, 40};
|
||||
static const int kNumItems = 10;
|
||||
|
||||
void MultiKnapsackSat(int scaling, const std::string& params) {
|
||||
void MultiKnapsackSat(int scaling, absl::string_view params) {
|
||||
CpModelBuilder builder;
|
||||
|
||||
const int num_items = scaling * kNumItems;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// N-queens problem
|
||||
//
|
||||
// unique solutions: http://www.research.att.com/~njas/sequences/A000170
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Function for reading and parsing a file in DIMACS format:
|
||||
// http://lpsolve.sourceforge.net/5.5/DIMACS_asn.htm
|
||||
//
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Pickup and Delivery Problem with Time Windows.
|
||||
// The overall objective is to minimize the length of the routes delivering
|
||||
// quantities of goods between pickup and delivery locations, taking into
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//
|
||||
// Function for outputting an assignment problem in DIMACS format:
|
||||
// http://lpsolve.sourceforge.net/5.5/DIMACS_asn.htm
|
||||
//
|
||||
|
||||
@@ -130,8 +130,8 @@ void Tsp() {
|
||||
|
||||
// Setting the cost function.
|
||||
// Put a permanent callback to the distance accessor here. The callback
|
||||
// has the following signature: ResultCallback2<int64_t, int64_t, int64_t>.
|
||||
// The two arguments are the from and to node indices.
|
||||
// is of type `std::function<int64_t(int64_t, int64_t)>` and the two
|
||||
// arguments are the from and to node indices.
|
||||
RandomMatrix matrix(absl::GetFlag(FLAGS_tsp_size));
|
||||
if (absl::GetFlag(FLAGS_tsp_use_random_matrix)) {
|
||||
matrix.Initialize();
|
||||
|
||||
Reference in New Issue
Block a user