move src to ortools; simplified python generation; remove some namespaces in the ortools/base helper files
This commit is contained in:
@@ -24,15 +24,15 @@
|
||||
#include <ctime>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
DEFINE_int32(minsize, 0, "Minimum degree of Costas matrix.");
|
||||
DEFINE_int32(maxsize, 0, "Maximum degree of Costas matrix.");
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
// Solution:
|
||||
// S=9; M=1; O=0; E=5; N=6; D=7; R=8; Y=2.
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -24,14 +24,15 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
|
||||
using operations_research::RoutingModel;
|
||||
using operations_research::RoutingSearchParameters;
|
||||
@@ -153,7 +154,7 @@ int main(int argc, char** argv) {
|
||||
// Solve, returns a solution if any (owned by RoutingModel).
|
||||
const operations_research::Assignment* solution =
|
||||
routing.SolveWithParameters(parameters);
|
||||
if (solution != NULL) {
|
||||
if (solution != nullptr) {
|
||||
DisplayPlan(routing, *solution, FLAGS_vrp_use_same_vehicle_costs,
|
||||
kMaxNodesPerGroup, kSameVehicleCost,
|
||||
routing.GetDimensionOrDie(kCapacity),
|
||||
|
||||
@@ -23,15 +23,16 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
using operations_research::RoutingModel;
|
||||
using operations_research::RoutingSearchParameters;
|
||||
@@ -140,7 +141,7 @@ int main(int argc, char** argv) {
|
||||
// Solve, returns a solution if any (owned by RoutingModel).
|
||||
const operations_research::Assignment* solution =
|
||||
routing.SolveWithParameters(parameters);
|
||||
if (solution != NULL) {
|
||||
if (solution != nullptr) {
|
||||
DisplayPlan(routing, *solution, FLAGS_vrp_use_same_vehicle_costs,
|
||||
kMaxNodesPerGroup, kSameVehicleCost,
|
||||
routing.GetDimensionOrDie(kCapacity),
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "base/random.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/base/random.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -27,17 +27,17 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/join.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_enums.pb.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
using operations_research::RoutingModel;
|
||||
using operations_research::RoutingSearchParameters;
|
||||
@@ -46,7 +46,6 @@ using operations_research::RandomDemand;
|
||||
using operations_research::ServiceTimePlusTransition;
|
||||
using operations_research::GetSeed;
|
||||
using operations_research::ACMRandom;
|
||||
using operations_research::StrCat;
|
||||
|
||||
|
||||
DEFINE_int32(vrp_orders, 100, "Nodes in the problem.");
|
||||
|
||||
@@ -21,15 +21,16 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
using operations_research::GetSeed;
|
||||
using operations_research::LocationContainer;
|
||||
@@ -147,7 +148,7 @@ int main(int argc, char** argv) {
|
||||
// Solve, returns a solution if any (owned by RoutingModel).
|
||||
const operations_research::Assignment* solution =
|
||||
routing.SolveWithParameters(parameters);
|
||||
if (solution != NULL) {
|
||||
if (solution != nullptr) {
|
||||
DisplayPlan(routing, *solution, /*use_same_vehicle_costs=*/false,
|
||||
/*max_nodes_per_group=*/0, /*same_vehicle_cost=*/0,
|
||||
routing.GetDimensionOrDie(kCapacity),
|
||||
|
||||
@@ -23,15 +23,16 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
using operations_research::RoutingModel;
|
||||
using operations_research::RoutingSearchParameters;
|
||||
@@ -142,7 +143,7 @@ int main(int argc, char** argv) {
|
||||
// Solve, returns a solution if any (owned by RoutingModel).
|
||||
const operations_research::Assignment* solution =
|
||||
routing.SolveWithParameters(parameters);
|
||||
if (solution != NULL) {
|
||||
if (solution != nullptr) {
|
||||
DisplayPlan(routing, *solution, /*use_same_vehicle_costs=*/false,
|
||||
/*max_nodes_per_group=*/0, /*same_vehicle_cost=*/0,
|
||||
routing.GetDimensionOrDie(kCapacity),
|
||||
|
||||
@@ -21,27 +21,26 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/join.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "cpp/cvrptw_lib.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "examples/cpp/cvrptw_lib.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
using operations_research::IntervalVar;
|
||||
using operations_research::RoutingModel;
|
||||
using operations_research::RoutingSearchParameters;
|
||||
using operations_research::LocationContainer;
|
||||
using operations_research::RandomDemand;
|
||||
using operations_research::ServiceTimePlusTransition;
|
||||
using operations_research::GetSeed;
|
||||
using operations_research::StopServiceTimePlusTransition;
|
||||
using operations_research::ACMRandom;
|
||||
using operations_research::StrCat;
|
||||
using operations_research::StringAppendF;
|
||||
using operations_research::StringPrintf;
|
||||
|
||||
@@ -172,7 +171,7 @@ int main(int argc, char** argv) {
|
||||
// Solve, returns a solution if any (owned by RoutingModel).
|
||||
const operations_research::Assignment* solution =
|
||||
routing.SolveWithParameters(parameters);
|
||||
if (solution != NULL) {
|
||||
if (solution != nullptr) {
|
||||
DisplayPlan(routing, *solution, /*use_same_vehicle_costs=*/false,
|
||||
/*max_nodes_per_group=*/0, /*same_vehicle_cost=*/0,
|
||||
routing.GetDimensionOrDie(kCapacity),
|
||||
|
||||
@@ -15,20 +15,20 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "base/hash.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/timer.h"
|
||||
#include "algorithms/hungarian.h"
|
||||
#include "cpp/parse_dimacs_assignment.h"
|
||||
#include "cpp/print_dimacs_assignment.h"
|
||||
#include "graph/ebert_graph.h"
|
||||
#include "graph/linear_assignment.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "ortools/algorithms/hungarian.h"
|
||||
#include "examples/cpp/parse_dimacs_assignment.h"
|
||||
#include "examples/cpp/print_dimacs_assignment.h"
|
||||
#include "ortools/graph/ebert_graph.h"
|
||||
#include "ortools/graph/linear_assignment.h"
|
||||
|
||||
DEFINE_bool(assignment_compare_hungarian, false,
|
||||
"Compare result and speed against Hungarian method.");
|
||||
@@ -125,11 +125,11 @@ int SolveDimacsAssignment(int argc, char* argv[]) {
|
||||
std::string error_message;
|
||||
// Handle on the graph we will need to delete because the
|
||||
// LinearSumAssignment object does not take ownership of it.
|
||||
GraphType* graph = NULL;
|
||||
GraphType* graph = nullptr;
|
||||
DimacsAssignmentParser<GraphType> parser(argv[1]);
|
||||
LinearSumAssignment<GraphType>* assignment =
|
||||
parser.Parse(&error_message, &graph);
|
||||
if (assignment == NULL) {
|
||||
if (assignment == nullptr) {
|
||||
LOG(FATAL) << error_message;
|
||||
}
|
||||
if (!FLAGS_assignment_problem_output_file.empty()) {
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/map_util.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "util/bitset.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/util/bitset.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
DEFINE_int32(symbols_per_card, 8, "Number of symbols per card.");
|
||||
DEFINE_int32(ls_seed, 1,
|
||||
@@ -724,10 +724,10 @@ void SolveDobble(int num_cards, int num_symbols, int num_symbols_per_card) {
|
||||
all_card_symbol_vars, build_db,
|
||||
solver.MakeLocalSearchPhaseParameters(
|
||||
solver.ConcatenateOperators(operators, true),
|
||||
NULL, // Sub decision builder, not needed here.
|
||||
NULL, // Limit the search for improving move, we will stop
|
||||
// the exploration of the local search at the first
|
||||
// improving solution (first accept).
|
||||
nullptr, // Sub decision builder, not needed here.
|
||||
nullptr, // Limit the search for improving move, we will stop
|
||||
// the exploration of the local search at the first
|
||||
// improving solution (first accept).
|
||||
filters));
|
||||
|
||||
std::vector<SearchMonitor*> monitors;
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
|
||||
//
|
||||
|
||||
#include "cpp/fap_model_printer.h"
|
||||
#include "examples/cpp/fap_model_printer.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/stringprintf.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -36,7 +36,7 @@ FapModelPrinter::~FapModelPrinter() {}
|
||||
void FapModelPrinter::PrintFapVariables() {
|
||||
LOG(INFO) << "Variable File:";
|
||||
for (const auto& it : variables_) {
|
||||
std::string domain = StringPrintf("{");
|
||||
std::string domain = "{";
|
||||
for (const int value : it.second.domain) {
|
||||
StringAppendF(&domain, "%d ", value);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "cpp/fap_parser.h"
|
||||
#include "examples/cpp/fap_parser.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -13,20 +13,20 @@
|
||||
|
||||
//
|
||||
|
||||
#include "cpp/fap_parser.h"
|
||||
#include "examples/cpp/fap_parser.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/file.h"
|
||||
#include "base/split.h"
|
||||
#include "base/map_util.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
void ParseFileByLines(const std::string& filename, std::vector<std::string>* lines) {
|
||||
CHECK_NOTNULL(lines);
|
||||
std::string result;
|
||||
CHECK(file::GetContents(filename, &result, file::Defaults()).ok());
|
||||
CHECK_OK(file::GetContents(filename, &result, file::Defaults()));
|
||||
*lines = strings::Split(result, '\n', strings::SkipEmpty());
|
||||
}
|
||||
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
#ifndef OR_TOOLS_EXAMPLES_FAP_PARSER_H_
|
||||
#define OR_TOOLS_EXAMPLES_FAP_PARSER_H_
|
||||
|
||||
#include "base/hash.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/logging.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/split.h"
|
||||
#include "base/map_util.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
|
||||
//
|
||||
|
||||
#include "cpp/fap_utilities.h"
|
||||
#include "examples/cpp/fap_utilities.h"
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/map_util.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "cpp/fap_parser.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "examples/cpp/fap_parser.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "cpp/flexible_jobshop.h"
|
||||
#include "util/string_array.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "examples/cpp/flexible_jobshop.h"
|
||||
#include "ortools/util/string_array.h"
|
||||
|
||||
DEFINE_string(
|
||||
data_file,
|
||||
|
||||
@@ -36,13 +36,13 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/split.h"
|
||||
#include "util/string_array.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/util/string_array.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
namespace operations_research {
|
||||
// A FlexibleJobShopData parses data files and stores all data internally for
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "graph/ebert_graph.h"
|
||||
#include "graph/max_flow.h"
|
||||
#include "graph/min_cost_flow.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/graph/ebert_graph.h"
|
||||
#include "ortools/graph/max_flow.h"
|
||||
#include "ortools/graph/min_cost_flow.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -51,14 +51,14 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/map_util.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "cpp/fap_model_printer.h"
|
||||
#include "cpp/fap_parser.h"
|
||||
#include "cpp/fap_utilities.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "examples/cpp/fap_model_printer.h"
|
||||
#include "examples/cpp/fap_parser.h"
|
||||
#include "examples/cpp/fap_utilities.h"
|
||||
|
||||
DEFINE_string(directory, "", "Specifies the directory of the data.");
|
||||
DEFINE_string(value_evaluator, "",
|
||||
@@ -232,11 +232,11 @@ class OrderingBuilder : public DecisionBuilder {
|
||||
return s->RevAlloc(ordering_decision);
|
||||
} else {
|
||||
// The constraint was dropped.
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
} else {
|
||||
// All the constraints were processed. No decision to take.
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ void CreateAdditionalMonitors(OptimizeVar* const objective, Solver* solver,
|
||||
FLAGS_restart != -1
|
||||
? (FLAGS_luby ? solver->MakeLubyRestart(FLAGS_restart)
|
||||
: solver->MakeConstantRestart(FLAGS_restart))
|
||||
: NULL;
|
||||
: nullptr;
|
||||
if (restart) {
|
||||
monitors->push_back(restart);
|
||||
}
|
||||
@@ -701,7 +701,7 @@ void PenalizeConstraintsViolation(
|
||||
->MakeAbs(
|
||||
solver->MakeDifference(variables[index1], variables[index2]))
|
||||
->Var();
|
||||
IntVar* violation = NULL;
|
||||
IntVar* violation = nullptr;
|
||||
if (ct.operation == ">") {
|
||||
violation = solver->MakeIsLessCstVar(absolute_difference, ct.value);
|
||||
} else if (ct.operation == "=") {
|
||||
@@ -755,7 +755,8 @@ int SoftFapSolver(const std::map<int, FapVariable>& data_variables,
|
||||
|
||||
// Penalize variable and constraint violations.
|
||||
std::vector<IntVar*> cost;
|
||||
std::vector<IntVar*> violated_constraints(ordered_constraints.size(), NULL);
|
||||
std::vector<IntVar*> violated_constraints(ordered_constraints.size(),
|
||||
nullptr);
|
||||
PenalizeVariablesViolation(soft_variables, index_from_key, variables, &cost,
|
||||
&solver);
|
||||
PenalizeConstraintsViolation(ordered_constraints, soft_constraints,
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "examples/global_arith.h"
|
||||
#include "ortools/base/stl_util.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "examples/cpp/global_arith.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
|
||||
DEFINE_bool(print, false, "If true, print the minimal solution.");
|
||||
DEFINE_int32(
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
//
|
||||
// Integer programming example that shows how to use the API.
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
|
||||
namespace operations_research {
|
||||
void RunIntegerProgrammingExample(
|
||||
|
||||
@@ -33,17 +33,17 @@
|
||||
//
|
||||
// Search will then be applied on the sequence constraints.
|
||||
|
||||
#include "cpp/jobshop.h"
|
||||
#include "examples/cpp/jobshop.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/join.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
|
||||
DEFINE_string(
|
||||
data_file, "",
|
||||
@@ -150,7 +150,7 @@ void Jobshop(const JobShopData& data) {
|
||||
SearchMonitor* const search_log =
|
||||
solver.MakeSearchLog(kLogFrequency, objective_monitor);
|
||||
|
||||
SearchLimit* limit = NULL;
|
||||
SearchLimit* limit = nullptr;
|
||||
if (FLAGS_time_limit_in_ms > 0) {
|
||||
limit = solver.MakeTimeLimit(FLAGS_time_limit_in_ms);
|
||||
}
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/split.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
namespace operations_research {
|
||||
// ----- JobShopData -----
|
||||
|
||||
@@ -36,16 +36,16 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "util/string_array.h"
|
||||
#include "cpp/jobshop_earlytardy.h"
|
||||
#include "cpp/jobshop_ls.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/util/string_array.h"
|
||||
#include "examples/cpp/jobshop_earlytardy.h"
|
||||
#include "examples/cpp/jobshop_ls.h"
|
||||
|
||||
DEFINE_string(
|
||||
jet_file,
|
||||
|
||||
@@ -39,13 +39,13 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/random.h"
|
||||
#include "base/split.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/random.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
namespace operations_research {
|
||||
struct Task {
|
||||
|
||||
@@ -33,19 +33,19 @@
|
||||
//
|
||||
// Search will be implemented as local search on the sequence variables.
|
||||
|
||||
#include "cpp/jobshop_ls.h"
|
||||
#include "examples/cpp/jobshop_ls.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/bitmap.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "cpp/jobshop.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/bitmap.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "examples/cpp/jobshop.h"
|
||||
|
||||
DEFINE_string(
|
||||
data_file, "",
|
||||
@@ -203,7 +203,7 @@ void JobshopLs(const JobShopData& data) {
|
||||
|
||||
SearchLimit* const limit = FLAGS_time_limit_in_ms > 0
|
||||
? solver.MakeTimeLimit(FLAGS_time_limit_in_ms)
|
||||
: NULL;
|
||||
: nullptr;
|
||||
|
||||
// Search.
|
||||
solver.Solve(final_db, search_log, objective_monitor, limit);
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/split.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
namespace operations_research {
|
||||
// ----- Exchange 2 intervals on a sequence variable -----
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
#include <math.h>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/timer.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "google/protobuf/text_format.h"
|
||||
#include "base/join.h"
|
||||
#include "base/stringpiece_utils.h"
|
||||
#include "base/strutil.h"
|
||||
#include "cpp/flexible_jobshop.h"
|
||||
#include "cpp/jobshop.h"
|
||||
#include "sat/disjunctive.h"
|
||||
#include "sat/intervals.h"
|
||||
#include "sat/model.h"
|
||||
#include "sat/optimization.h"
|
||||
#include "sat/precedences.h"
|
||||
#include "sat/sat_solver.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/base/stringpiece_utils.h"
|
||||
#include "ortools/base/strutil.h"
|
||||
#include "examples/cpp/flexible_jobshop.h"
|
||||
#include "examples/cpp/jobshop.h"
|
||||
#include "ortools/sat/disjunctive.h"
|
||||
#include "ortools/sat/intervals.h"
|
||||
#include "ortools/sat/model.h"
|
||||
#include "ortools/sat/optimization.h"
|
||||
#include "ortools/sat/precedences.h"
|
||||
#include "ortools/sat/sat_solver.h"
|
||||
|
||||
DEFINE_string(input, "", "Jobshop data file name.");
|
||||
DEFINE_string(params, "", "Sat parameters in text proto format.");
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
#include "graph/linear_assignment.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "graph/ebert_graph.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/graph/ebert_graph.h"
|
||||
#include "ortools/graph/linear_assignment.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
//
|
||||
// Linear programming example that shows how to use the API.
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "linear_solver/linear_solver.pb.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/linear_solver/linear_solver.pb.h"
|
||||
|
||||
namespace operations_research {
|
||||
void RunLinearProgrammingExample(
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "linear_solver/linear_solver.pb.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/linear_solver/linear_solver.pb.h"
|
||||
|
||||
namespace operations_research {
|
||||
void BuildLinearProgrammingMaxExample(MPSolver::OptimizationProblemType type) {
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
// Neighborhood Search approach, a Local Search approach, and a Local
|
||||
// Search with Filter approach.
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/map_util.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/hash.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
#include "ortools/base/stl_util.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
namespace operations_research {
|
||||
class OneVarLns : public BaseLns {
|
||||
@@ -161,7 +161,7 @@ void SolveProblem(SolveType solve_type) {
|
||||
OptimizeVar* const obj = s.MakeMinimize(sum_var, 1);
|
||||
DecisionBuilder* const db =
|
||||
s.MakePhase(vars, Solver::CHOOSE_FIRST_UNBOUND, Solver::ASSIGN_MAX_VALUE);
|
||||
DecisionBuilder* ls = NULL;
|
||||
DecisionBuilder* ls = nullptr;
|
||||
switch (solve_type) {
|
||||
case LNS: {
|
||||
LOG(INFO) << "Large Neighborhood Search";
|
||||
@@ -186,7 +186,7 @@ void SolveProblem(SolveType solve_type) {
|
||||
filters.push_back(s.RevAlloc(new SumFilter(vars)));
|
||||
|
||||
LocalSearchPhaseParameters* const ls_params =
|
||||
s.MakeLocalSearchPhaseParameters(one_var_ls, db, NULL, filters);
|
||||
s.MakeLocalSearchPhaseParameters(one_var_ls, db, nullptr, filters);
|
||||
ls = s.MakeLocalSearchPhase(vars, db, ls_params);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
// The problem is trivial for odd orders, but not for even orders.
|
||||
// We do not handle odd orders with the trivial method here.
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
|
||||
DEFINE_int32(size, 0, "Size of the magic square.");
|
||||
DEFINE_bool(impact, false, "Use impact search.");
|
||||
@@ -125,7 +125,7 @@ void MagicSquare(int grid_size) {
|
||||
FLAGS_restart != -1
|
||||
? (FLAGS_luby ? solver.MakeLubyRestart(FLAGS_restart)
|
||||
: solver.MakeConstantRestart(FLAGS_restart))
|
||||
: NULL;
|
||||
: nullptr;
|
||||
if (restart) {
|
||||
monitors.push_back(restart);
|
||||
}
|
||||
|
||||
@@ -14,18 +14,20 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/file.h"
|
||||
#include "base/recordio.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/model.pb.h"
|
||||
#include "util/graph_export.h"
|
||||
#include "util/string_array.h"
|
||||
#include "base/status.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/macros.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "ortools/base/recordio.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/model.pb.h"
|
||||
#include "ortools/constraint_solver/search_limit.pb.h"
|
||||
#include "ortools/util/graph_export.h"
|
||||
#include "ortools/util/string_array.h"
|
||||
#include "ortools/base/status.h"
|
||||
|
||||
DEFINE_string(input, "", "Input file of the problem.");
|
||||
DEFINE_string(output, "", "Output file when doing modifications.");
|
||||
@@ -141,7 +143,7 @@ void DeclareExpression(int index, const CpModel& proto,
|
||||
if (!expr.name().empty()) {
|
||||
exporter->WriteNode(label, expr.name(), "oval", kGreen1);
|
||||
} else if (GetValueIfConstant(proto, expr, &value)) {
|
||||
exporter->WriteNode(label, StringPrintf("%lld", value), "oval", kYellow);
|
||||
exporter->WriteNode(label, StrCat(value), "oval", kYellow);
|
||||
} else {
|
||||
const std::string& type = proto.tags(expr.type_index());
|
||||
exporter->WriteNode(label, type, "oval", kWhite);
|
||||
@@ -260,7 +262,7 @@ int Run() {
|
||||
}
|
||||
|
||||
CpModel model_proto;
|
||||
RecordReader reader(file);
|
||||
recordio::RecordReader reader(file);
|
||||
if (!(reader.ReadProtocolMessage(&model_proto) && reader.Close())) {
|
||||
LOG(INFO) << "No model found in " << file->filename();
|
||||
return kProblem;
|
||||
@@ -360,7 +362,7 @@ int Run() {
|
||||
LOG(INFO) << "Cannot open " << FLAGS_output;
|
||||
return kProblem;
|
||||
}
|
||||
RecordWriter writer(output);
|
||||
recordio::RecordWriter writer(output);
|
||||
if (!(writer.WriteProtocolMessage(model_proto) && writer.Close())) {
|
||||
return kProblem;
|
||||
} else {
|
||||
|
||||
@@ -18,23 +18,23 @@
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/file.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "google/protobuf/descriptor.h"
|
||||
#include "google/protobuf/message.h"
|
||||
#include "google/protobuf/text_format.h"
|
||||
#include "base/stringpiece_utils.h"
|
||||
#include "base/strutil.h"
|
||||
#include "glop/lp_solver.h"
|
||||
#include "glop/parameters.pb.h"
|
||||
#include "lp_data/lp_print_utils.h"
|
||||
#include "lp_data/mps_reader.h"
|
||||
#include "lp_data/proto_utils.h"
|
||||
#include "util/proto_tools.h"
|
||||
#include "base/status.h"
|
||||
#include "ortools/base/stringpiece_utils.h"
|
||||
#include "ortools/base/strutil.h"
|
||||
#include "ortools/glop/lp_solver.h"
|
||||
#include "ortools/glop/parameters.pb.h"
|
||||
#include "ortools/lp_data/lp_print_utils.h"
|
||||
#include "ortools/lp_data/mps_reader.h"
|
||||
#include "ortools/lp_data/proto_utils.h"
|
||||
#include "ortools/util/proto_tools.h"
|
||||
#include "ortools/base/status.h"
|
||||
|
||||
DEFINE_bool(mps_dump_problem, false, "Dumps problem in readable form.");
|
||||
DEFINE_bool(mps_solve, true, "Solves problem.");
|
||||
@@ -60,13 +60,7 @@ using operations_research::glop::MPSReader;
|
||||
using operations_research::glop::MPModelProtoToLinearProgram;
|
||||
using operations_research::glop::ProblemStatus;
|
||||
using operations_research::glop::ToDouble;
|
||||
using google::protobuf::Descriptor;
|
||||
using google::protobuf::FieldDescriptor;
|
||||
using google::protobuf::Message;
|
||||
using google::protobuf::Reflection;
|
||||
using google::protobuf::TextFormat;
|
||||
using operations_research::HasSuffixString;
|
||||
using operations_research::ScopedWallTime;
|
||||
|
||||
|
||||
// Parse glop parameters from the flags --params_file and --params.
|
||||
|
||||
@@ -17,16 +17,16 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/split.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/hybrid.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/hybrid.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
DEFINE_string(
|
||||
data_file, "",
|
||||
@@ -112,7 +112,7 @@ class MultiDimKnapsackData {
|
||||
// 6 = name passed
|
||||
switch (mode_) {
|
||||
case 0: {
|
||||
if (words.size() != 0) {
|
||||
if (!words.empty()) {
|
||||
CHECK_EQ(2, words.size());
|
||||
num_dims_ = atoi32(words[0]);
|
||||
num_items_ = atoi32(words[1]);
|
||||
@@ -157,7 +157,7 @@ class MultiDimKnapsackData {
|
||||
break;
|
||||
}
|
||||
case 4: {
|
||||
if (words.size() != 0) {
|
||||
if (!words.empty()) {
|
||||
CHECK_EQ(1, words.size());
|
||||
optimal_value_ = atoi32(words[0]);
|
||||
mode_ = 5;
|
||||
@@ -165,7 +165,7 @@ class MultiDimKnapsackData {
|
||||
break;
|
||||
}
|
||||
case 5: {
|
||||
if (words.size() != 0) {
|
||||
if (!words.empty()) {
|
||||
name_ = line;
|
||||
mode_ = 6;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ class MultiDimKnapsackData {
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
if (words.size() != 0) {
|
||||
if (!words.empty()) {
|
||||
CHECK_EQ(2, words.size());
|
||||
num_items_ = atoi32(words[0]);
|
||||
num_dims_ = atoi32(words[1]);
|
||||
|
||||
@@ -26,24 +26,24 @@
|
||||
|
||||
// A random problem generator is also included.
|
||||
|
||||
#include "base/hash.h"
|
||||
#include "base/hash.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/map_util.h"
|
||||
#include "base/hash.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "graph/shortestpaths.h"
|
||||
#include "util/tuple_set.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/graph/shortestpaths.h"
|
||||
#include "ortools/util/tuple_set.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
// ----- Data Generator -----
|
||||
DEFINE_int32(clients, 0,
|
||||
@@ -707,7 +707,7 @@ class NetworkRoutingSolver {
|
||||
|
||||
Decision* Next(Solver* const solver) override {
|
||||
solver->SetBranchSelector([solver]() { return MaxDiscrepancy1(solver); });
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string DebugString() const override { return "ApplyMaxDiscrepancy"; }
|
||||
@@ -726,7 +726,7 @@ class NetworkRoutingSolver {
|
||||
for (int i = 0; i < vars_.size(); ++i) {
|
||||
(*values_)[i] = vars_[i]->Value();
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
#include <cstdio>
|
||||
#include <map>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/map_util.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
|
||||
DEFINE_bool(print, false, "If true, print one of the solution.");
|
||||
DEFINE_bool(print_all, false, "If true, print all the solutions.");
|
||||
@@ -212,8 +212,9 @@ void NQueens(int size) {
|
||||
}
|
||||
s.AddConstraint(s.MakeAllDifferent(vars));
|
||||
|
||||
SolutionCollector* const solution_counter = s.MakeAllSolutionCollector(NULL);
|
||||
SolutionCollector* const collector = s.MakeFirstSolutionCollector();
|
||||
SolutionCollector* const solution_counter =
|
||||
s.MakeAllSolutionCollector(nullptr);
|
||||
SolutionCollector* const collector = s.MakeAllSolutionCollector();
|
||||
collector->Add(queens);
|
||||
std::vector<SearchMonitor*> monitors;
|
||||
monitors.push_back(solution_counter);
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
// distinct solutions: http://www.research.att.com/~njas/sequences/A002562
|
||||
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
|
||||
DEFINE_int32(
|
||||
size, 88,
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/file.h"
|
||||
#include "base/split.h"
|
||||
#include "sat/boolean_problem.pb.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/sat/boolean_problem.pb.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
namespace operations_research {
|
||||
namespace sat {
|
||||
@@ -66,7 +66,7 @@ class OpbReader {
|
||||
void ProcessNewLine(LinearBooleanProblem* problem, const std::string& line) {
|
||||
const std::vector<std::string> words =
|
||||
strings::Split(line, ' ', strings::SkipEmpty());
|
||||
if (words.size() == 0 || words[0].empty() || words[0][0] == '*') {
|
||||
if (words.empty() || words[0].empty() || words[0][0] == '*') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
#include "cpp/parse_dimacs_assignment.h"
|
||||
#include "examples/cpp/parse_dimacs_assignment.h"
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
|
||||
DEFINE_bool(assignment_maximize_cost, false,
|
||||
"Negate costs so a max-cost assignment is found.");
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "graph/ebert_graph.h"
|
||||
#include "graph/linear_assignment.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/graph/ebert_graph.h"
|
||||
#include "ortools/graph/linear_assignment.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
DECLARE_bool(assignment_maximize_cost);
|
||||
DECLARE_bool(assignment_optimize_layout);
|
||||
@@ -44,7 +44,7 @@ template <typename GraphType>
|
||||
class DimacsAssignmentParser {
|
||||
public:
|
||||
explicit DimacsAssignmentParser(const std::string& filename)
|
||||
: filename_(filename), graph_builder_(NULL), assignment_(NULL) {}
|
||||
: filename_(filename), graph_builder_(nullptr), assignment_(nullptr) {}
|
||||
|
||||
// Reads an assignment problem description from the given file in
|
||||
// DIMACS format and returns a LinearSumAssignment object representing
|
||||
@@ -77,7 +77,7 @@ class DimacsAssignmentParser {
|
||||
ErrorTrackingState()
|
||||
: bad(false),
|
||||
nodes_described(false),
|
||||
reason(NULL),
|
||||
reason(nullptr),
|
||||
num_left_nodes(0),
|
||||
num_arcs(0) {}
|
||||
|
||||
@@ -141,7 +141,7 @@ void DimacsAssignmentParser<GraphType>::ParseNodeLine(const std::string& line) {
|
||||
|
||||
template <typename GraphType>
|
||||
void DimacsAssignmentParser<GraphType>::ParseArcLine(const std::string& line) {
|
||||
if (graph_builder_ == NULL) {
|
||||
if (graph_builder_ == nullptr) {
|
||||
state_.bad = true;
|
||||
state_.reason =
|
||||
"Problem specification line must precede any arc specification.";
|
||||
@@ -150,7 +150,7 @@ void DimacsAssignmentParser<GraphType>::ParseArcLine(const std::string& line) {
|
||||
}
|
||||
if (!state_.nodes_described) {
|
||||
state_.nodes_described = true;
|
||||
DCHECK(assignment_ == NULL);
|
||||
DCHECK(assignment_ == nullptr);
|
||||
assignment_ = new LinearSumAssignment<GraphType>(state_.num_left_nodes,
|
||||
state_.num_arcs);
|
||||
}
|
||||
@@ -233,18 +233,18 @@ LinearSumAssignment<GraphType>* DimacsAssignmentParser<GraphType>::Parse(
|
||||
if (state_.bad) {
|
||||
*error_message = state_.reason;
|
||||
*error_message = *error_message + ": \"" + *state_.bad_line + "\"";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
if (graph_builder_ == NULL) {
|
||||
if (graph_builder_ == nullptr) {
|
||||
*error_message = "empty graph description";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
std::unique_ptr<PermutationCycleHandler<ArcIndex> > cycle_handler(
|
||||
assignment_->ArcAnnotationCycleHandler());
|
||||
GraphType* graph = graph_builder_->Graph(cycle_handler.get());
|
||||
if (graph == NULL) {
|
||||
if (graph == nullptr) {
|
||||
*error_message = "unable to create compact static graph";
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
assignment_->SetGraph(graph);
|
||||
*error_message = "";
|
||||
|
||||
@@ -38,15 +38,16 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/file.h"
|
||||
#include "base/split.h"
|
||||
#include "base/mathutil.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/base/mathutil.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
|
||||
DEFINE_string(pdp_file, "",
|
||||
"File containing the Pickup and Delivery Problem to solve.");
|
||||
@@ -68,7 +69,7 @@ typedef std::vector<std::pair<int, int> > Coordinates;
|
||||
// coordinates of the nodes.
|
||||
int64 Travel(const Coordinates* const coords, RoutingModel::NodeIndex from,
|
||||
RoutingModel::NodeIndex to) {
|
||||
DCHECK(coords != NULL);
|
||||
DCHECK(coords != nullptr);
|
||||
const int xd = coords->at(from.value()).first - coords->at(to.value()).first;
|
||||
const int yd =
|
||||
coords->at(from.value()).second - coords->at(to.value()).second;
|
||||
@@ -154,7 +155,7 @@ bool SafeParseInt64Array(const std::string& str, std::vector<int64>* parsed_int)
|
||||
parsed_int->assign(items.size(), 0);
|
||||
for (int i = 0; i < items.size(); ++i) {
|
||||
const char* item = items[i].c_str();
|
||||
char* endptr = NULL;
|
||||
char* endptr = nullptr;
|
||||
(*parsed_int)[i] = strto64(item, &endptr, 10);
|
||||
// The whole item should have been consumed.
|
||||
if (*endptr != '\0') return false;
|
||||
@@ -170,7 +171,7 @@ bool LoadAndSolve(const std::string& pdp_file) {
|
||||
std::vector<std::string> lines;
|
||||
{
|
||||
std::string contents;
|
||||
CHECK(file::GetContents(pdp_file, &contents, file::Defaults()).ok());
|
||||
CHECK_OK(file::GetContents(pdp_file, &contents, file::Defaults()));
|
||||
const int64 kMaxInputFileSize = 1 << 30; // 1GB
|
||||
if (contents.size() >= kMaxInputFileSize) {
|
||||
LOG(WARNING) << "Input file '" << pdp_file << "' is too large (>"
|
||||
@@ -290,7 +291,7 @@ bool LoadAndSolve(const std::string& pdp_file) {
|
||||
// Solve pickup and delivery problem.
|
||||
const Assignment* assignment = routing.SolveWithParameters(parameters);
|
||||
LOG(INFO) << routing.solver()->LocalSearchProfile();
|
||||
if (NULL != assignment) {
|
||||
if (nullptr != assignment) {
|
||||
LOG(INFO) << "Cost: " << assignment->ObjectiveValue();
|
||||
LOG(INFO) << VerboseOutput(routing, *assignment, coords, service_times);
|
||||
return true;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "cpp/print_dimacs_assignment.h"
|
||||
#include "examples/cpp/print_dimacs_assignment.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/file.h"
|
||||
#include "graph/ebert_graph.h"
|
||||
#include "graph/linear_assignment.h"
|
||||
#include "base/status.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "ortools/graph/ebert_graph.h"
|
||||
#include "ortools/graph/linear_assignment.h"
|
||||
#include "ortools/base/status.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -52,13 +52,13 @@ void PrintDimacsAssignmentProblem(
|
||||
const GraphType& graph(assignment.Graph());
|
||||
std::string output_line =
|
||||
StringPrintf("p asn %d %d\n", graph.num_nodes(), graph.num_arcs());
|
||||
CHECK(file::WriteString(output, output_line, file::Defaults()).ok());
|
||||
CHECK_OK(file::WriteString(output, output_line, file::Defaults()));
|
||||
|
||||
for (typename LinearSumAssignment<GraphType>::BipartiteLeftNodeIterator
|
||||
node_it(assignment);
|
||||
node_it.Ok(); node_it.Next()) {
|
||||
output_line = StringPrintf("n %d\n", node_it.Index() + 1);
|
||||
CHECK(file::WriteString(output, output_line, file::Defaults()).ok());
|
||||
CHECK_OK(file::WriteString(output, output_line, file::Defaults()));
|
||||
}
|
||||
|
||||
tail_array_manager.BuildTailArrayFromAdjacencyListsIfForwardGraph();
|
||||
@@ -68,7 +68,7 @@ void PrintDimacsAssignmentProblem(
|
||||
ArcIndex arc = arc_it.Index();
|
||||
output_line = StringPrintf("a %d %d %lld\n", graph.Tail(arc) + 1,
|
||||
graph.Head(arc) + 1, assignment.ArcCost(arc));
|
||||
CHECK(file::WriteString(output, output_line, file::Defaults()).ok());
|
||||
CHECK_OK(file::WriteString(output, output_line, file::Defaults()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/timer.h"
|
||||
#include "sat/cumulative.h"
|
||||
#include "sat/disjunctive.h"
|
||||
#include "sat/integer_expr.h"
|
||||
#include "sat/intervals.h"
|
||||
#include "sat/model.h"
|
||||
#include "sat/optimization.h"
|
||||
#include "sat/precedences.h"
|
||||
#include "util/rcpsp_parser.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "ortools/sat/cumulative.h"
|
||||
#include "ortools/sat/disjunctive.h"
|
||||
#include "ortools/sat/integer_expr.h"
|
||||
#include "ortools/sat/intervals.h"
|
||||
#include "ortools/sat/model.h"
|
||||
#include "ortools/sat/optimization.h"
|
||||
#include "ortools/sat/precedences.h"
|
||||
#include "ortools/util/rcpsp_parser.h"
|
||||
|
||||
DEFINE_string(input, "", "Input file.");
|
||||
DEFINE_string(params, "", "Sat parameters in text proto format.");
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/split.h"
|
||||
#include "sat/boolean_problem.pb.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "absl/ortools/base/string_view.h"
|
||||
#include "ortools/sat/boolean_problem.pb.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
DEFINE_bool(wcnf_use_strong_slack, true,
|
||||
"If true, when we add a slack variable to reify a soft clause, we "
|
||||
@@ -102,7 +103,7 @@ class SatCnfReader {
|
||||
return problem_name;
|
||||
}
|
||||
|
||||
int64 StringPieceAtoi(StringPiece input) {
|
||||
int64 StringPieceAtoi(string_view input) {
|
||||
// Hack: data() is not null terminated, but we do know that it points
|
||||
// inside a std::string where numbers are separated by " " and since atoi64 will
|
||||
// stop at the first invalid char, this works.
|
||||
@@ -114,7 +115,7 @@ class SatCnfReader {
|
||||
words_ = strings::Split(
|
||||
line, kWordDelimiters,
|
||||
static_cast<int64>(strings::SkipEmpty()));
|
||||
if (words_.size() == 0 || words_[0] == "c" || end_marker_seen_) return;
|
||||
if (words_.empty() || words_[0] == "c" || end_marker_seen_) return;
|
||||
if (words_[0] == "%") {
|
||||
end_marker_seen_ = true;
|
||||
return;
|
||||
@@ -130,7 +131,7 @@ class SatCnfReader {
|
||||
}
|
||||
} else {
|
||||
// TODO(user): The ToString() is only required for the open source. Fix.
|
||||
LOG(FATAL) << "Unknown file type: " << words_[1].ToString();
|
||||
LOG(FATAL) << "Unknown file type: " << words_[1];
|
||||
}
|
||||
} else {
|
||||
// In the cnf file format, the last words should always be 0.
|
||||
@@ -224,7 +225,7 @@ class SatCnfReader {
|
||||
int num_variables_;
|
||||
|
||||
// Temporary storage for ProcessNewLine().
|
||||
std::vector<StringPiece> words_;
|
||||
std::vector<string_view> words_;
|
||||
|
||||
// We stores the objective in a map because we want the variables to appear
|
||||
// only once in the LinearObjective proto.
|
||||
|
||||
@@ -15,31 +15,34 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/file.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "ortools/base/file.h"
|
||||
#include "google/protobuf/descriptor.h"
|
||||
#include "google/protobuf/message.h"
|
||||
#include "google/protobuf/text_format.h"
|
||||
#include "base/stringpiece_utils.h"
|
||||
#include "base/strutil.h"
|
||||
#include "base/threadpool.h"
|
||||
#include "algorithms/sparse_permutation.h"
|
||||
#include "sat/boolean_problem.h"
|
||||
#include "sat/drat.h"
|
||||
#include "ortools/base/stringpiece_utils.h"
|
||||
#include "ortools/base/strutil.h"
|
||||
#include "ortools/base/threadpool.h"
|
||||
#include "ortools/algorithms/sparse_permutation.h"
|
||||
#include "ortools/sat/boolean_problem.h"
|
||||
#include "ortools/sat/cp_model.pb.h"
|
||||
#include "ortools/sat/cp_model_solver.h"
|
||||
#include "ortools/sat/drat.h"
|
||||
#include "cpp/opb_reader.h"
|
||||
#include "sat/optimization.h"
|
||||
#include "ortools/sat/optimization.h"
|
||||
#include "cpp/sat_cnf_reader.h"
|
||||
#include "sat/sat_solver.h"
|
||||
#include "sat/simplification.h"
|
||||
#include "sat/symmetry.h"
|
||||
#include "util/time_limit.h"
|
||||
#include "base/random.h"
|
||||
#include "base/status.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/sat/sat_solver.h"
|
||||
#include "ortools/sat/simplification.h"
|
||||
#include "ortools/sat/symmetry.h"
|
||||
#include "ortools/util/time_limit.h"
|
||||
#include "ortools/base/random.h"
|
||||
#include "ortools/base/status.h"
|
||||
|
||||
DEFINE_string(
|
||||
input, "",
|
||||
@@ -52,7 +55,7 @@ DEFINE_string(
|
||||
"If non-empty, write the input problem as a LinearBooleanProblem proto to "
|
||||
"this file. By default it uses the binary format except if the file "
|
||||
"extension is '.txt'. If the problem is SAT, a satisfiable assignment is "
|
||||
"also writen to the file.");
|
||||
"also written to the file.");
|
||||
|
||||
DEFINE_bool(output_cnf_solution, false,
|
||||
"If true and the problem was solved to optimality, this output "
|
||||
@@ -155,8 +158,7 @@ std::string SolutionString(const LinearBooleanProblem& problem,
|
||||
BooleanVariable limit(problem.original_num_variables());
|
||||
for (BooleanVariable index(0); index < limit; ++index) {
|
||||
if (index > 0) output += " ";
|
||||
output += StringPrintf(
|
||||
"%d", Literal(index, assignment[index.value()]).SignedValue());
|
||||
StrAppend(&output, Literal(index, assignment[index.value()]).SignedValue());
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
@@ -32,18 +32,18 @@
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "base/split.h"
|
||||
#include "sat/cp_constraints.h"
|
||||
#include "sat/integer_expr.h"
|
||||
#include "sat/model.h"
|
||||
#include "sat/optimization.h"
|
||||
#include "sat/precedences.h"
|
||||
#include "sat/sat_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/sat/cp_constraints.h"
|
||||
#include "ortools/sat/integer_expr.h"
|
||||
#include "ortools/sat/model.h"
|
||||
#include "ortools/sat/optimization.h"
|
||||
#include "ortools/sat/precedences.h"
|
||||
#include "ortools/sat/sat_solver.h"
|
||||
|
||||
DEFINE_string(input, "", "Input file.");
|
||||
DEFINE_string(params, "", "Sat parameters in text proto format.");
|
||||
@@ -90,6 +90,12 @@ class ShiftMinimizationParser {
|
||||
return false;
|
||||
}
|
||||
|
||||
File* file = nullptr;
|
||||
if (!file::Open(file_name, "r", &file, file::Defaults()).ok()) {
|
||||
LOG(WARNING) << "Can't open " << file_name;
|
||||
return false;
|
||||
}
|
||||
|
||||
load_status_ = STARTED;
|
||||
|
||||
for (const std::string& line :
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "util/string_array.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/util/string_array.h"
|
||||
|
||||
const std::vector<std::vector<int>> small = {
|
||||
{ 3, 2, -1, 3 },
|
||||
|
||||
@@ -18,22 +18,22 @@
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/file.h"
|
||||
//#include "base/options.h"
|
||||
#include "base/stringpiece_utils.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "linear_solver/linear_solver.pb.h"
|
||||
//#include "linear_solver/model_anonymizer.h"
|
||||
#include "lp_data/lp_data.h"
|
||||
#include "lp_data/mps_reader.h"
|
||||
#include "lp_data/proto_utils.h"
|
||||
#include "util/proto_tools.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "ortools/base/file.h"
|
||||
//#include "ortools/base/options.h"
|
||||
#include "ortools/base/stringpiece_utils.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/linear_solver/linear_solver.pb.h"
|
||||
//#include "ortools/linear_solver/model_anonymizer.h"
|
||||
#include "ortools/lp_data/lp_data.h"
|
||||
#include "ortools/lp_data/mps_reader.h"
|
||||
#include "ortools/lp_data/proto_utils.h"
|
||||
#include "ortools/util/proto_tools.h"
|
||||
|
||||
DEFINE_string(input, "", "REQUIRED: Input file name.");
|
||||
DEFINE_string(solver, "glop",
|
||||
|
||||
@@ -56,12 +56,12 @@
|
||||
//
|
||||
// Usage: run this with --helpshort for a short usage manual.
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "constraint_solver/constraint_solver.h"
|
||||
#include "constraint_solver/constraint_solveri.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/constraint_solver/constraint_solver.h"
|
||||
#include "ortools/constraint_solver/constraint_solveri.h"
|
||||
|
||||
// Problem main flags.
|
||||
DEFINE_int32(num_teams, 10, "Number of teams in the problem.");
|
||||
|
||||
@@ -60,12 +60,12 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/macros.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
|
||||
DEFINE_bool(colgen_verbose, false, "print verbosely");
|
||||
DEFINE_bool(colgen_complete, false, "generate all columns initially");
|
||||
|
||||
@@ -27,15 +27,16 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/join.h"
|
||||
#include "base/join.h"
|
||||
#include "constraint_solver/routing.h"
|
||||
#include "constraint_solver/routing_flags.h"
|
||||
#include "base/random.h"
|
||||
#include "ortools/base/callback.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/constraint_solver/routing.h"
|
||||
#include "ortools/constraint_solver/routing_enums.pb.h"
|
||||
#include "ortools/constraint_solver/routing_flags.h"
|
||||
#include "ortools/base/random.h"
|
||||
|
||||
DEFINE_int32(tsp_size, 10, "Size of Traveling Salesman Problem instance.");
|
||||
DEFINE_bool(tsp_use_random_matrix, true, "Use random cost matrix.");
|
||||
@@ -136,7 +137,7 @@ void Tsp() {
|
||||
}
|
||||
// Solve, returns a solution if any (owned by RoutingModel).
|
||||
const Assignment* solution = routing.SolveWithParameters(parameters);
|
||||
if (solution != NULL) {
|
||||
if (solution != nullptr) {
|
||||
// Solution cost.
|
||||
LOG(INFO) << "Cost " << solution->ObjectiveValue();
|
||||
// Inspect solution.
|
||||
|
||||
@@ -14,22 +14,22 @@
|
||||
#include <math.h>
|
||||
#include <vector>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/timer.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strtoint.h"
|
||||
#include "ortools/base/timer.h"
|
||||
#include "google/protobuf/text_format.h"
|
||||
#include "base/join.h"
|
||||
#include "base/split.h"
|
||||
#include "base/strutil.h"
|
||||
#include "base/strtoint.h"
|
||||
#include "sat/disjunctive.h"
|
||||
#include "sat/integer_expr.h"
|
||||
#include "sat/intervals.h"
|
||||
#include "sat/model.h"
|
||||
#include "sat/optimization.h"
|
||||
#include "sat/precedences.h"
|
||||
#include "util/filelineiter.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/base/split.h"
|
||||
#include "ortools/base/strutil.h"
|
||||
#include "ortools/sat/disjunctive.h"
|
||||
#include "ortools/sat/integer_expr.h"
|
||||
#include "ortools/sat/intervals.h"
|
||||
#include "ortools/sat/model.h"
|
||||
#include "ortools/sat/optimization.h"
|
||||
#include "ortools/sat/precedences.h"
|
||||
#include "ortools/util/filelineiter.h"
|
||||
|
||||
DEFINE_string(input, "examples/data/weighted_tardiness/wt40.txt",
|
||||
"wt data file name.");
|
||||
|
||||
@@ -619,6 +619,128 @@ public class CsTestCpOperator
|
||||
copy.EndSearch();
|
||||
}
|
||||
|
||||
static void CpSimpleLoadModelTest() {
|
||||
|
||||
CpModel expected;
|
||||
|
||||
const string constraintName = "equation";
|
||||
const string constraintText = "((x(0..10) + y(0..10)) == 5)";
|
||||
|
||||
// Make sure that resources are isolated in the using block.
|
||||
using (var s = new Solver("TestConstraint"))
|
||||
{
|
||||
var x = s.MakeIntVar(0, 10, "x");
|
||||
var y = s.MakeIntVar(0, 10, "y");
|
||||
Check(x.Name() == "x", "x variable name incorrect.");
|
||||
Check(y.Name() == "y", "y variable name incorrect.");
|
||||
var c = x + y == 5;
|
||||
// c.Cst.SetName(constraintName);
|
||||
// Check(c.Cst.Name() == constraintName, "Constraint name incorrect.");
|
||||
Check(c.Cst.ToString() == constraintText, "Constraint is incorrect.");
|
||||
s.Add(c);
|
||||
expected = s.ExportModel();
|
||||
Console.WriteLine("Expected model string after export: {0}", expected);
|
||||
}
|
||||
|
||||
// While interesting, this is not very useful nor especially typical use case scenario.
|
||||
using (var s = new Solver("TestConstraint"))
|
||||
{
|
||||
s.LoadModel(expected);
|
||||
Check(s.Constraints() == 1, "Incorrect number of constraints.");
|
||||
var actual = s.ExportModel();
|
||||
Console.WriteLine("Actual model string after load: {0}", actual);
|
||||
// Even the simple example should PASS this I think, but it is not currently.
|
||||
Check(expected.ToString() == actual.ToString(), "Model string incorrect.");
|
||||
var loader = s.ModelLoader();
|
||||
var x = loader.IntegerExpression(0).Var();
|
||||
var y = loader.IntegerExpression(1).Var();
|
||||
Check(!ReferenceEquals(null, x), "x variable not found after loaded model.");
|
||||
Check(!ReferenceEquals(null, y), "y variable not found after loaded model.");
|
||||
{
|
||||
// Sanity check that what we loaded from the Proto is actually correct according to what we expected
|
||||
var c = x + y == 5;
|
||||
Check(c.Cst.ToString() == constraintText, "Constraint is incorrect.");
|
||||
}
|
||||
var db = s.MakePhase(x, y, Solver.CHOOSE_FIRST_UNBOUND, Solver.ASSIGN_MIN_VALUE);
|
||||
s.NewSearch(db);
|
||||
while (s.NextSolution()) {
|
||||
Console.WriteLine("x = {0}, y = {1}", x.Value(), y.Value());
|
||||
}
|
||||
s.EndSearch();
|
||||
}
|
||||
}
|
||||
|
||||
static void CpLoadModelAfterSearchTest() {
|
||||
|
||||
CpModel expected;
|
||||
|
||||
const string constraintName = "equation";
|
||||
const string constraintText = "((x(0..10) + y(0..10)) == 5)";
|
||||
|
||||
// Make sure that resources are isolated in the using block.
|
||||
using (var s = new Solver("TestConstraint"))
|
||||
{
|
||||
var x = s.MakeIntVar(0, 10, "x");
|
||||
var y = s.MakeIntVar(0, 10, "y");
|
||||
Check(x.Name() == "x", "x variable name incorrect.");
|
||||
Check(y.Name() == "y", "y variable name incorrect.");
|
||||
var c = x + y == 5;
|
||||
// c.Cst.SetName(constraintName);
|
||||
// Check(c.Cst.Name() == constraintName, "Constraint name incorrect.");
|
||||
Check(c.Cst.ToString() == constraintText, "Constraint is incorrect.");
|
||||
s.Add(c);
|
||||
// TODO: TBD: support solution collector?
|
||||
var db = s.MakePhase(x, y, Solver.CHOOSE_FIRST_UNBOUND, Solver.ASSIGN_MIN_VALUE);
|
||||
Check(!ReferenceEquals(null, db), "Expected a valid Decision Builder");
|
||||
s.NewSearch(db);
|
||||
var count = 0;
|
||||
while (s.NextSolution()) {
|
||||
Console.WriteLine("x = {0}, y = {1}", x.Value(), y.Value());
|
||||
++count;
|
||||
// Break after we found at least one solution.
|
||||
break;
|
||||
}
|
||||
s.EndSearch();
|
||||
Check(count > 0, "Must find at least one solution.");
|
||||
// TODO: TBD: export with monitors and/or decision builder?
|
||||
expected = s.ExportModel();
|
||||
Console.WriteLine("Expected model string after export: {0}", expected);
|
||||
}
|
||||
|
||||
// While interesting, this is not very useful nor especially typical use case scenario.
|
||||
using (var s = new Solver("TestConstraint"))
|
||||
{
|
||||
// TODO: TBD: load with monitors and/or decision builder?
|
||||
s.LoadModel(expected);
|
||||
// This is the first test that should PASS when loading; however, it FAILS because the Constraint is NOT loaded as it is a "TrueConstraint()"
|
||||
Check(s.Constraints() == 1, "Incorrect number of constraints.");
|
||||
var actual = s.ExportModel();
|
||||
Console.WriteLine("Actual model string after load: {0}", actual);
|
||||
// Should also be correct after re-load, but I suspect isn't even close, but I could be wrong.
|
||||
Check(expected.ToString() == actual.ToString(), "Model string incorrect.");
|
||||
var loader = s.ModelLoader();
|
||||
var x = loader.IntegerExpression(0).Var();
|
||||
var y = loader.IntegerExpression(1).Var();
|
||||
Check(!ReferenceEquals(null, x), "x variable not found after loaded model.");
|
||||
Check(!ReferenceEquals(null, y), "y variable not found after loaded model.");
|
||||
{
|
||||
// Do this sanity check that what we loaded is actually what we expected should load.
|
||||
var c = x + y == 5;
|
||||
// Further documented verification, provided we got this far, and/or with "proper" unit test Assertions...
|
||||
Check(c.Cst.ToString() == constraintText, "Constraint is incorrect.");
|
||||
Check(c.Cst.ToString() != "TrueConstraint()", "Constraint is incorrect.");
|
||||
}
|
||||
// TODO: TBD: support solution collector?
|
||||
// Should pick up where we left off.
|
||||
var db = s.MakePhase(x, y, Solver.CHOOSE_FIRST_UNBOUND, Solver.ASSIGN_MIN_VALUE);
|
||||
s.NewSearch(db);
|
||||
while (s.NextSolution()) {
|
||||
Console.WriteLine("x = {0}, y = {1}", x.Value(), y.Value());
|
||||
}
|
||||
s.EndSearch();
|
||||
}
|
||||
}
|
||||
|
||||
static void Main() {
|
||||
ConstructorsTest();
|
||||
ConstraintWithExprTest();
|
||||
@@ -632,6 +754,8 @@ public class CsTestCpOperator
|
||||
DomainIteratorTest();
|
||||
HoleIteratorTest();
|
||||
CpModelTest();
|
||||
CpSimpleLoadModelTest();
|
||||
CpLoadModelAfterSearchTest();
|
||||
if (error_count_ != 0) {
|
||||
Console.WriteLine("Found " + error_count_ + " errors.");
|
||||
Environment.Exit(1);
|
||||
|
||||
@@ -65,7 +65,7 @@ ortoolslibs: $(OR_TOOLS_LIBS)
|
||||
CVRPTW_LIBS = $(LIB_DIR)/$(LIB_PREFIX)cvrptw_lib.$(LIB_SUFFIX)
|
||||
CVRPTW_DEPS = \
|
||||
$(EX_DIR)/cpp/cvrptw_lib.h \
|
||||
$(CP_DEPS) $(SRC_DIR)/constraint_solver/routing.h
|
||||
$(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
|
||||
CVRPTW_LNK = $(PRE_LIB)cvrptw_lib$(POST_LIB) $(OR_TOOLS_LNK)
|
||||
cvrptwlibs: $(CVRPTW_LIBS)
|
||||
|
||||
@@ -91,20 +91,20 @@ faplibs: $(FAP_LIBS)
|
||||
|
||||
FLATZINC_LIBS = $(LIB_DIR)/$(LIB_PREFIX)fz.$(LIB_SUFFIX)
|
||||
FLATZINC_DEPS = \
|
||||
$(SRC_DIR)/flatzinc/checker.h \
|
||||
$(SRC_DIR)/flatzinc/constraints.h \
|
||||
$(SRC_DIR)/flatzinc/flatzinc_constraints.h \
|
||||
$(SRC_DIR)/flatzinc/logging.h \
|
||||
$(SRC_DIR)/flatzinc/model.h \
|
||||
$(SRC_DIR)/flatzinc/parser.h \
|
||||
$(SRC_DIR)/flatzinc/parser.tab.hh \
|
||||
$(SRC_DIR)/flatzinc/presolve.h \
|
||||
$(SRC_DIR)/flatzinc/reporting.h \
|
||||
$(SRC_DIR)/flatzinc/sat_constraint.h \
|
||||
$(SRC_DIR)/flatzinc/sat_fz_solver.h \
|
||||
$(SRC_DIR)/flatzinc/solver_data.h \
|
||||
$(SRC_DIR)/flatzinc/solver.h \
|
||||
$(SRC_DIR)/flatzinc/solver_util.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/checker.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/constraints.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/flatzinc_constraints.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/logging.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/model.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/parser.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/parser.tab.hh \
|
||||
$(SRC_DIR)/ortools/flatzinc/presolve.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/reporting.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/sat_constraint.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/sat_fz_solver.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/solver_data.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/solver.h \
|
||||
$(SRC_DIR)/ortools/flatzinc/solver_util.h \
|
||||
$(CP_DEPS) \
|
||||
$(SAT_DEPS)
|
||||
FLATZINC_LNK = $(PRE_LIB)fz$(POST_LIB) $(OR_TOOLS_LNK)
|
||||
@@ -156,7 +156,7 @@ ccexe: $(CC_BINARIES)
|
||||
CVRPTW_OBJS=\
|
||||
$(OBJ_DIR)/cvrptw_lib.$O
|
||||
|
||||
$(OBJ_DIR)/cvrptw_lib.$O: $(EX_DIR)/cpp/cvrptw_lib.cc $(EX_DIR)/cpp/cvrptw_lib.h $(CP_DEPS) $(SRC_DIR)/constraint_solver/routing.h
|
||||
$(OBJ_DIR)/cvrptw_lib.$O: $(EX_DIR)/cpp/cvrptw_lib.cc $(EX_DIR)/cpp/cvrptw_lib.h $(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/cvrptw_lib.cc $(OBJ_OUT)$(OBJ_DIR)$Scvrptw_lib.$O
|
||||
|
||||
$(LIB_DIR)/$(LIB_PREFIX)cvrptw_lib.$(LIB_SUFFIX): $(CVRPTW_OBJS)
|
||||
@@ -209,63 +209,63 @@ FLATZINC_OBJS=\
|
||||
$(OBJ_DIR)/flatzinc/solver_data.$O \
|
||||
$(OBJ_DIR)/flatzinc/solver_util.$O
|
||||
|
||||
fz_parser: $(SRC_DIR)/flatzinc/parser.lex $(SRC_DIR)/flatzinc/parser.yy
|
||||
flex -o$(SRC_DIR)/flatzinc/parser.yy.cc $(SRC_DIR)/flatzinc/parser.lex
|
||||
bison -t -o $(SRC_DIR)/flatzinc/parser.tab.cc -d $<
|
||||
fz_parser: $(SRC_DIR)/ortools/flatzinc/parser.lex $(SRC_DIR)/ortools/flatzinc/parser.yy
|
||||
flex -o$(SRC_DIR)/ortools/flatzinc/parser.yy.cc $(SRC_DIR)/ortools/flatzinc/parser.lex
|
||||
bison -t -o $(SRC_DIR)/ortools/flatzinc/parser.tab.cc -d $<
|
||||
|
||||
$(OBJ_DIR)/flatzinc/checker.$O: $(SRC_DIR)/flatzinc/checker.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Schecker.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Schecker.$O
|
||||
$(OBJ_DIR)/flatzinc/checker.$O: $(SRC_DIR)/ortools/flatzinc/checker.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Schecker.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Schecker.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/constraints.$O: $(SRC_DIR)/flatzinc/constraints.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sconstraints.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sconstraints.$O
|
||||
$(OBJ_DIR)/flatzinc/constraints.$O: $(SRC_DIR)/ortools/flatzinc/constraints.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sconstraints.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sconstraints.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/flatzinc_constraints.$O: $(SRC_DIR)/flatzinc/flatzinc_constraints.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sflatzinc_constraints.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sflatzinc_constraints.$O
|
||||
$(OBJ_DIR)/flatzinc/flatzinc_constraints.$O: $(SRC_DIR)/ortools/flatzinc/flatzinc_constraints.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sflatzinc_constraints.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sflatzinc_constraints.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/logging.$O: $(SRC_DIR)/flatzinc/logging.cc $(SRC_DIR)/flatzinc/logging.h $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Slogging.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Slogging.$O
|
||||
$(OBJ_DIR)/flatzinc/logging.$O: $(SRC_DIR)/ortools/flatzinc/logging.cc $(SRC_DIR)/ortools/flatzinc/logging.h $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Slogging.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Slogging.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/model.$O: $(SRC_DIR)/flatzinc/model.cc $(SRC_DIR)/flatzinc/model.h $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Smodel.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Smodel.$O
|
||||
$(OBJ_DIR)/flatzinc/model.$O: $(SRC_DIR)/ortools/flatzinc/model.cc $(SRC_DIR)/ortools/flatzinc/model.h $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Smodel.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Smodel.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/parser.$O: $(SRC_DIR)/flatzinc/parser.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sparser.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser.$O
|
||||
$(OBJ_DIR)/flatzinc/parser.$O: $(SRC_DIR)/ortools/flatzinc/parser.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sparser.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/parser.tab.$O: $(SRC_DIR)/flatzinc/parser.tab.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sparser.tab.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser.tab.$O
|
||||
$(OBJ_DIR)/flatzinc/parser.tab.$O: $(SRC_DIR)/ortools/flatzinc/parser.tab.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sparser.tab.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser.tab.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/parser.yy.$O: $(SRC_DIR)/flatzinc/parser.yy.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sparser.yy.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser.yy.$O
|
||||
$(OBJ_DIR)/flatzinc/parser.yy.$O: $(SRC_DIR)/ortools/flatzinc/parser.yy.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sparser.yy.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser.yy.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/presolve.$O: $(SRC_DIR)/flatzinc/presolve.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Spresolve.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Spresolve.$O
|
||||
$(OBJ_DIR)/flatzinc/presolve.$O: $(SRC_DIR)/ortools/flatzinc/presolve.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Spresolve.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Spresolve.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/reporting.$O: $(SRC_DIR)/flatzinc/reporting.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sreporting.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sreporting.$O
|
||||
$(OBJ_DIR)/flatzinc/reporting.$O: $(SRC_DIR)/ortools/flatzinc/reporting.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sreporting.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sreporting.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/sat_constraint.$O: $(SRC_DIR)/flatzinc/sat_constraint.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Ssat_constraint.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssat_constraint.$O
|
||||
$(OBJ_DIR)/flatzinc/sat_constraint.$O: $(SRC_DIR)/ortools/flatzinc/sat_constraint.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Ssat_constraint.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssat_constraint.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/sat_fz_solver.$O: $(SRC_DIR)/flatzinc/sat_fz_solver.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Ssat_fz_solver.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssat_fz_solver.$O
|
||||
$(OBJ_DIR)/flatzinc/sat_fz_solver.$O: $(SRC_DIR)/ortools/flatzinc/sat_fz_solver.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Ssat_fz_solver.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssat_fz_solver.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/solver.$O: $(SRC_DIR)/flatzinc/solver.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Ssolver.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssolver.$O
|
||||
$(OBJ_DIR)/flatzinc/solver.$O: $(SRC_DIR)/ortools/flatzinc/solver.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Ssolver.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssolver.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/solver_data.$O: $(SRC_DIR)/flatzinc/solver_data.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Ssolver_data.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssolver_data.$O
|
||||
$(OBJ_DIR)/flatzinc/solver_data.$O: $(SRC_DIR)/ortools/flatzinc/solver_data.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Ssolver_data.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssolver_data.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/solver_util.$O: $(SRC_DIR)/flatzinc/solver_util.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Ssolver_util.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssolver_util.$O
|
||||
$(OBJ_DIR)/flatzinc/solver_util.$O: $(SRC_DIR)/ortools/flatzinc/solver_util.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Ssolver_util.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Ssolver_util.$O
|
||||
|
||||
$(LIB_DIR)/$(LIB_PREFIX)fz.$(LIB_SUFFIX): $(FLATZINC_OBJS)
|
||||
$(LINK_CMD) $(LINK_PREFIX)$(LIB_DIR)$S$(LIB_PREFIX)fz.$(LIB_SUFFIX) $(FLATZINC_OBJS)
|
||||
|
||||
$(OBJ_DIR)/flatzinc/fz.$O: $(SRC_DIR)/flatzinc/fz.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sfz.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sfz.$O
|
||||
$(OBJ_DIR)/flatzinc/fz.$O: $(SRC_DIR)/ortools/flatzinc/fz.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sfz.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sfz.$O
|
||||
|
||||
$(OBJ_DIR)/flatzinc/parser_main.$O: $(SRC_DIR)/flatzinc/parser_main.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sflatzinc$Sparser_main.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser_main.$O
|
||||
$(OBJ_DIR)/flatzinc/parser_main.$O: $(SRC_DIR)/ortools/flatzinc/parser_main.cc $(FLATZINC_DEPS)
|
||||
$(CCC) $(CFLAGS) -c $(SRC_DIR)$Sortools$Sflatzinc$Sparser_main.cc $(OBJ_OUT)$(OBJ_DIR)$Sflatzinc$Sparser_main.$O
|
||||
|
||||
fz : $(BIN_DIR)/fz$E $(BIN_DIR)/parser_main$E
|
||||
|
||||
@@ -297,25 +297,25 @@ $(BIN_DIR)/dimacs_assignment$E: $(DIMACS_LIBS) $(OR_TOOLS_LIBS) $(OBJ_DIR)/dimac
|
||||
|
||||
# Pure CP and Routing Examples
|
||||
|
||||
$(OBJ_DIR)/acp_challenge.$O: $(EX_DIR)/cpp/acp_challenge.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/acp_challenge.$O: $(EX_DIR)/cpp/acp_challenge.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/acp_challenge.cc $(OBJ_OUT)$(OBJ_DIR)$Sacp_challenge.$O
|
||||
|
||||
$(BIN_DIR)/acp_challenge$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/acp_challenge.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/acp_challenge.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sacp_challenge$E
|
||||
|
||||
$(OBJ_DIR)/acp_challenge_routing.$O: $(EX_DIR)/cpp/acp_challenge_routing.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/acp_challenge_routing.$O: $(EX_DIR)/cpp/acp_challenge_routing.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/acp_challenge_routing.cc $(OBJ_OUT)$(OBJ_DIR)$Sacp_challenge_routing.$O
|
||||
|
||||
$(BIN_DIR)/acp_challenge_routing$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/acp_challenge_routing.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/acp_challenge_routing.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sacp_challenge_routing$E
|
||||
|
||||
$(OBJ_DIR)/costas_array.$O: $(EX_DIR)/cpp/costas_array.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/costas_array.$O: $(EX_DIR)/cpp/costas_array.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/costas_array.cc $(OBJ_OUT)$(OBJ_DIR)$Scostas_array.$O
|
||||
|
||||
$(BIN_DIR)/costas_array$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/costas_array.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/costas_array.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Scostas_array$E
|
||||
|
||||
$(OBJ_DIR)/cryptarithm.$O: $(EX_DIR)/cpp/cryptarithm.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/cryptarithm.$O: $(EX_DIR)/cpp/cryptarithm.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/cryptarithm.cc $(OBJ_OUT)$(OBJ_DIR)$Scryptarithm.$O
|
||||
|
||||
$(BIN_DIR)/cryptarithm$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/cryptarithm.$O
|
||||
@@ -435,7 +435,7 @@ $(OBJ_DIR)/nqueens2.$O: $(EX_DIR)/cpp/nqueens2.cc $(CP_DEPS)
|
||||
$(BIN_DIR)/nqueens2$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/nqueens2.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/nqueens2.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Snqueens2$E
|
||||
|
||||
$(OBJ_DIR)/pdptw.$O: $(EX_DIR)/cpp/pdptw.cc $(CP_DEPS) $(SRC_DIR)/constraint_solver/routing.h
|
||||
$(OBJ_DIR)/pdptw.$O: $(EX_DIR)/cpp/pdptw.cc $(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/pdptw.cc $(OBJ_OUT)$(OBJ_DIR)$Spdptw.$O
|
||||
|
||||
$(BIN_DIR)/pdptw$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/pdptw.$O
|
||||
@@ -465,7 +465,7 @@ $(OBJ_DIR)/sports_scheduling.$O: $(EX_DIR)/cpp/sports_scheduling.cc $(CP_DEPS)
|
||||
$(BIN_DIR)/sports_scheduling$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/sports_scheduling.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/sports_scheduling.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Ssports_scheduling$E
|
||||
|
||||
$(OBJ_DIR)/tsp.$O: $(EX_DIR)/cpp/tsp.cc $(CP_DEPS) $(SRC_DIR)/constraint_solver/routing.h
|
||||
$(OBJ_DIR)/tsp.$O: $(EX_DIR)/cpp/tsp.cc $(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/tsp.cc $(OBJ_OUT)$(OBJ_DIR)$Stsp.$O
|
||||
|
||||
$(BIN_DIR)/tsp$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/tsp.$O
|
||||
@@ -491,55 +491,55 @@ $(OBJ_DIR)/bug_fz1.$O: $(EX_DIR)/tests/bug_fz1.cc $(CP_DEPS)
|
||||
$(BIN_DIR)/bug_fz1$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/bug_fz1.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/bug_fz1.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sbug_fz1$E
|
||||
|
||||
$(OBJ_DIR)/ac4r_table_test.$O: $(EX_DIR)/tests/ac4r_table_test.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/ac4r_table_test.$O: $(EX_DIR)/tests/ac4r_table_test.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/ac4r_table_test.cc $(OBJ_OUT)$(OBJ_DIR)$Sac4r_table_test.$O
|
||||
|
||||
$(BIN_DIR)/ac4r_table_test$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/ac4r_table_test.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/ac4r_table_test.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sac4r_table_test$E
|
||||
|
||||
$(OBJ_DIR)/forbidden_intervals_test.$O: $(EX_DIR)/tests/forbidden_intervals_test.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/forbidden_intervals_test.$O: $(EX_DIR)/tests/forbidden_intervals_test.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/forbidden_intervals_test.cc $(OBJ_OUT)$(OBJ_DIR)$Sforbidden_intervals_test.$O
|
||||
|
||||
$(BIN_DIR)/forbidden_intervals_test$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/forbidden_intervals_test.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/forbidden_intervals_test.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sforbidden_intervals_test$E
|
||||
|
||||
$(OBJ_DIR)/gcc_test.$O: $(EX_DIR)/tests/gcc_test.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/gcc_test.$O: $(EX_DIR)/tests/gcc_test.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/gcc_test.cc $(OBJ_OUT)$(OBJ_DIR)$Sgcc_test.$O
|
||||
|
||||
$(BIN_DIR)/gcc_test$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/gcc_test.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/gcc_test.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sgcc_test$E
|
||||
|
||||
$(OBJ_DIR)/min_max_test.$O: $(EX_DIR)/tests/min_max_test.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/min_max_test.$O: $(EX_DIR)/tests/min_max_test.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/min_max_test.cc $(OBJ_OUT)$(OBJ_DIR)$Smin_max_test.$O
|
||||
|
||||
$(BIN_DIR)/min_max_test$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/min_max_test.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/min_max_test.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Smin_max_test$E
|
||||
|
||||
$(OBJ_DIR)/issue57.$O: $(EX_DIR)/tests/issue57.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/issue57.$O: $(EX_DIR)/tests/issue57.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/issue57.cc $(OBJ_OUT)$(OBJ_DIR)$Sissue57.$O
|
||||
|
||||
$(BIN_DIR)/issue57$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/issue57.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/issue57.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sissue57$E
|
||||
|
||||
$(OBJ_DIR)/issue173.$O: $(EX_DIR)/tests/issue173.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/issue173.$O: $(EX_DIR)/tests/issue173.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/issue173.cc $(OBJ_OUT)$(OBJ_DIR)$Sissue173.$O
|
||||
|
||||
$(BIN_DIR)/issue173$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/issue173.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/issue173.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sissue173$E
|
||||
|
||||
$(OBJ_DIR)/visitor_test.$O: $(EX_DIR)/tests/visitor_test.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/visitor_test.$O: $(EX_DIR)/tests/visitor_test.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/visitor_test.cc $(OBJ_OUT)$(OBJ_DIR)$Svisitor_test.$O
|
||||
|
||||
$(BIN_DIR)/visitor_test$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/visitor_test.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/visitor_test.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Svisitor_test$E
|
||||
|
||||
$(OBJ_DIR)/boolean_test.$O: $(EX_DIR)/tests/boolean_test.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/boolean_test.$O: $(EX_DIR)/tests/boolean_test.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Stests/boolean_test.cc $(OBJ_OUT)$(OBJ_DIR)$Sboolean_test.$O
|
||||
|
||||
$(BIN_DIR)/boolean_test$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/boolean_test.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/boolean_test.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sboolean_test$E
|
||||
|
||||
$(OBJ_DIR)/ls_api.$O: $(EX_DIR)/cpp/ls_api.cc $(SRC_DIR)/constraint_solver/constraint_solver.h
|
||||
$(OBJ_DIR)/ls_api.$O: $(EX_DIR)/cpp/ls_api.cc $(SRC_DIR)/ortools/constraint_solver/constraint_solver.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp/ls_api.cc $(OBJ_OUT)$(OBJ_DIR)$Sls_api.$O
|
||||
|
||||
$(BIN_DIR)/ls_api$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/ls_api.$O
|
||||
@@ -585,13 +585,13 @@ $(OBJ_DIR)/integer_programming.$O: $(EX_DIR)/cpp/integer_programming.cc $(LP_DEP
|
||||
$(BIN_DIR)/integer_programming$E: $(OR_TOOLS_LIBS) $(OBJ_DIR)/integer_programming.$O
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)/integer_programming.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Sinteger_programming$E
|
||||
|
||||
$(OBJ_DIR)/glop/mps_driver.$O: $(EX_DIR)/cpp/mps_driver.cc $(GEN_DIR)/glop/parameters.pb.h
|
||||
$(OBJ_DIR)/glop/mps_driver.$O: $(EX_DIR)/cpp/mps_driver.cc $(GEN_DIR)/ortools/glop/parameters.pb.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp$Smps_driver.cc $(OBJ_OUT)$(OBJ_DIR)$Sglop$Smps_driver.$O
|
||||
|
||||
$(BIN_DIR)/mps_driver$E: $(OBJ_DIR)/glop/mps_driver.$O $(OR_TOOLS_LIBS)
|
||||
$(CCC) $(CFLAGS) $(OBJ_DIR)$Sglop$Smps_driver.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS) $(EXE_OUT)$(BIN_DIR)$Smps_driver$E
|
||||
|
||||
$(OBJ_DIR)/glop/solve.$O: $(EX_DIR)/cpp/solve.cc $(GEN_DIR)/glop/parameters.pb.h $(GEN_DIR)/linear_solver/linear_solver.pb.h
|
||||
$(OBJ_DIR)/glop/solve.$O: $(EX_DIR)/cpp/solve.cc $(GEN_DIR)/ortools/glop/parameters.pb.h $(GEN_DIR)/ortools/linear_solver/linear_solver.pb.h
|
||||
$(CCC) $(CFLAGS) -c $(EX_DIR)$Scpp$Ssolve.cc $(OBJ_OUT)$(OBJ_DIR)$Sglop$Ssolve.$O
|
||||
|
||||
$(BIN_DIR)/solve$E: $(OBJ_DIR)/glop/solve.$O $(OR_TOOLS_LIBS)
|
||||
|
||||
@@ -97,11 +97,11 @@ clean_csharp:
|
||||
-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)Google.OrTools.Flatzinc*.exp
|
||||
-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)Google.OrTools.Flatzinc*.netmodule
|
||||
-$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)Google.OrTools.Flatzinc.$(SWIG_LIB_SUFFIX)
|
||||
-$(DEL) $(GEN_DIR)$Slinear_solver$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sconstraint_solver$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Salgorithms$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sgraph$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sflatzinc$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Slinear_solver$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Sconstraint_solver$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Salgorithms$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Sgraph$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Sflatzinc$S*csharp_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms$S*.cs
|
||||
-$(DEL) $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver$S*.cs
|
||||
-$(DEL) $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.cs
|
||||
@@ -148,70 +148,70 @@ csharportools: $(BIN_DIR)/$(CLR_ORTOOLS_DLL_NAME)$(DLL) $(BIN_DIR)/$(CLR_PROTOBU
|
||||
$(BIN_DIR)/$(CLR_PROTOBUF_DLL_NAME)$(DLL): tools/$(CLR_PROTOBUF_DLL_NAME)$(DLL)
|
||||
$(COPY) tools$S$(CLR_PROTOBUF_DLL_NAME)$(DLL) $(BIN_DIR)
|
||||
|
||||
$(GEN_DIR)/linear_solver/linear_solver_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/linear_solver/csharp/linear_solver.swig \
|
||||
$(SRC_DIR)/base/base.swig $(SRC_DIR)/util/csharp/proto.swig \
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/ortools/linear_solver/csharp/linear_solver.i \
|
||||
$(SRC_DIR)/ortools/base/base.i $(SRC_DIR)/ortools/util/csharp/proto.i \
|
||||
$(LP_DEPS)
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Slinear_solver$Slinear_solver_csharp_wrap.cc -module operations_research_linear_solver -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).LinearSolver -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver $(SRC_DIR)/linear_solver$Scsharp$Slinear_solver.swig
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Sortools$Slinear_solver$Slinear_solver_csharp_wrap.cc -module operations_research_linear_solver -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).LinearSolver -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver $(SRC_DIR)/ortools/linear_solver$Scsharp$Slinear_solver.i
|
||||
|
||||
$(OBJ_DIR)/swig/linear_solver_csharp_wrap.$O: $(GEN_DIR)/linear_solver/linear_solver_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)/linear_solver/linear_solver_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Slinear_solver_csharp_wrap.$O
|
||||
$(OBJ_DIR)/swig/linear_solver_csharp_wrap.$O: $(GEN_DIR)/ortools/linear_solver/linear_solver_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)/ortools/linear_solver/linear_solver_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Slinear_solver_csharp_wrap.$O
|
||||
|
||||
$(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/constraint_solver/csharp/routing.swig \
|
||||
$(SRC_DIR)/constraint_solver/csharp/constraint_solver.swig \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/csharp/proto.swig \
|
||||
$(SRC_DIR)/util/csharp/functions.swig \
|
||||
$(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/ortools/constraint_solver/csharp/routing.i \
|
||||
$(SRC_DIR)/ortools/constraint_solver/csharp/constraint_solver.i \
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/csharp/proto.i \
|
||||
$(SRC_DIR)/ortools/util/csharp/functions.i \
|
||||
$(CP_DEPS)
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Sconstraint_solver$Sconstraint_solver_csharp_wrap.cc -module operations_research_constraint_solver -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).ConstraintSolver -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver $(SRC_DIR)$Sconstraint_solver$Scsharp$Srouting.swig
|
||||
$(SED) -i -e 's/CSharp_new_Solver/CSharp_new_CpSolver/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_delete_Solver/CSharp_delete_CpSolver/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_Solver/CSharp_CpSolver/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_new_Constraint/CSharp_new_CpConstraint/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_delete_Constraint/CSharp_delete_CpConstraint/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_Constraint/CSharp_CpConstraint/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Sortools$Sconstraint_solver$Sconstraint_solver_csharp_wrap.cc -module operations_research_constraint_solver -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).ConstraintSolver -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver $(SRC_DIR)$Sortools$Sconstraint_solver$Scsharp$Srouting.i
|
||||
$(SED) -i -e 's/CSharp_new_Solver/CSharp_new_CpSolver/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_delete_Solver/CSharp_delete_CpSolver/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_Solver/CSharp_CpSolver/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_new_Constraint/CSharp_new_CpConstraint/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_delete_Constraint/CSharp_delete_CpConstraint/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
$(SED) -i -e 's/CSharp_Constraint/CSharp_CpConstraint/g' $(GEN_DIR)/com/google/ortools/constraintsolver/*cs $(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.*
|
||||
|
||||
$(OBJ_DIR)/swig/constraint_solver_csharp_wrap.$O: \
|
||||
$(GEN_DIR)/constraint_solver/constraint_solver_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)$Sconstraint_solver$Sconstraint_solver_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sconstraint_solver_csharp_wrap.$O
|
||||
$(GEN_DIR)/ortools/constraint_solver/constraint_solver_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)$Sortools$Sconstraint_solver$Sconstraint_solver_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sconstraint_solver_csharp_wrap.$O
|
||||
|
||||
$(GEN_DIR)/algorithms/knapsack_solver_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/algorithms/csharp/knapsack_solver.swig \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/csharp/proto.swig \
|
||||
$(SRC_DIR)/algorithms/knapsack_solver.h
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Salgorithms$Sknapsack_solver_csharp_wrap.cc -module operations_research_algorithms -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).Algorithms -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms $(SRC_DIR)$Salgorithms$Scsharp$Sknapsack_solver.swig
|
||||
$(GEN_DIR)/ortools/algorithms/knapsack_solver_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/ortools/algorithms/csharp/knapsack_solver.i \
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/csharp/proto.i \
|
||||
$(SRC_DIR)/ortools/algorithms/knapsack_solver.h
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Sortools$Salgorithms$Sknapsack_solver_csharp_wrap.cc -module operations_research_algorithms -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).Algorithms -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms $(SRC_DIR)$Sortools$Salgorithms$Scsharp$Sknapsack_solver.i
|
||||
|
||||
$(OBJ_DIR)/swig/knapsack_solver_csharp_wrap.$O: $(GEN_DIR)/algorithms/knapsack_solver_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)/algorithms/knapsack_solver_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sknapsack_solver_csharp_wrap.$O
|
||||
$(OBJ_DIR)/swig/knapsack_solver_csharp_wrap.$O: $(GEN_DIR)/ortools/algorithms/knapsack_solver_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)/ortools/algorithms/knapsack_solver_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sknapsack_solver_csharp_wrap.$O
|
||||
|
||||
$(GEN_DIR)/graph/graph_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/graph/csharp/graph.swig \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/csharp/proto.swig \
|
||||
$(GEN_DIR)/ortools/graph/graph_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/ortools/graph/csharp/graph.i \
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/csharp/proto.i \
|
||||
$(GRAPH_DEPS)
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Sgraph$Sgraph_csharp_wrap.cc -module operations_research_graph -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).Graph -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph $(SRC_DIR)$Sgraph$Scsharp$Sgraph.swig
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -csharp -o $(GEN_DIR)$Sortools$Sgraph$Sgraph_csharp_wrap.cc -module operations_research_graph -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).Graph -dllimport "$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph $(SRC_DIR)$Sortools$Sgraph$Scsharp$Sgraph.i
|
||||
|
||||
$(OBJ_DIR)/swig/graph_csharp_wrap.$O: $(GEN_DIR)/graph/graph_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)$Sgraph$Sgraph_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sgraph_csharp_wrap.$O
|
||||
$(OBJ_DIR)/swig/graph_csharp_wrap.$O: $(GEN_DIR)/ortools/graph/graph_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)$Sortools$Sgraph$Sgraph_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sgraph_csharp_wrap.$O
|
||||
|
||||
# Protobufs
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimit.g.cs: $(SRC_DIR)/constraint_solver/search_limit.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sconstraint_solver$Ssearch_limit.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimit.g.cs: $(SRC_DIR)/ortools/constraint_solver/search_limit.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sortools$Sconstraint_solver$Ssearch_limit.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.g.cs: $(SRC_DIR)/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sconstraint_solver$Ssolver_parameters.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.g.cs: $(SRC_DIR)/ortools/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sortools$Sconstraint_solver$Ssolver_parameters.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/Model.g.cs: $(SRC_DIR)/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sconstraint_solver$Smodel.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/Model.g.cs: $(SRC_DIR)/ortools/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sortools$Sconstraint_solver$Smodel.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingParameters.g.cs: $(SRC_DIR)/constraint_solver/routing_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sconstraint_solver$Srouting_parameters.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingParameters.g.cs: $(SRC_DIR)/ortools/constraint_solver/routing_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sortools$Sconstraint_solver$Srouting_parameters.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingEnums.g.cs: $(SRC_DIR)/constraint_solver/routing_enums.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sconstraint_solver$Srouting_enums.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingEnums.g.cs: $(SRC_DIR)/ortools/constraint_solver/routing_enums.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --csharp_out=$(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver --csharp_opt=file_extension=.g.cs $(SRC_DIR)$Sortools$Sconstraint_solver$Srouting_enums.proto
|
||||
|
||||
# Main DLL
|
||||
|
||||
@@ -228,20 +228,20 @@ $(BIN_DIR)/$(CLR_ORTOOLS_DLL_NAME)$(DLL): \
|
||||
$(OBJ_DIR)/swig/constraint_solver_csharp_wrap.$O \
|
||||
$(OBJ_DIR)/swig/knapsack_solver_csharp_wrap.$O \
|
||||
$(OBJ_DIR)/swig/graph_csharp_wrap.$O \
|
||||
$(SRC_DIR)/com/google/ortools/algorithms/IntArrayHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/constraintsolver/IntVarArrayHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/constraintsolver/IntervalVarArrayHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/constraintsolver/IntArrayHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/constraintsolver/NetDecisionBuilder.cs \
|
||||
$(SRC_DIR)/com/google/ortools/constraintsolver/SolverHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/constraintsolver/ValCstPair.cs \
|
||||
$(SRC_DIR)/com/google/ortools/linearsolver/DoubleArrayHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/linearsolver/LinearExpr.cs \
|
||||
$(SRC_DIR)/com/google/ortools/linearsolver/LinearConstraint.cs \
|
||||
$(SRC_DIR)/com/google/ortools/linearsolver/SolverHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/linearsolver/VariableHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/util/NestedArrayHelper.cs \
|
||||
$(SRC_DIR)/com/google/ortools/util/ProtoHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/algorithms/IntArrayHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/constraintsolver/IntVarArrayHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/constraintsolver/IntervalVarArrayHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/constraintsolver/IntArrayHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/constraintsolver/NetDecisionBuilder.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/constraintsolver/SolverHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/constraintsolver/ValCstPair.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/linearsolver/DoubleArrayHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/linearsolver/LinearExpr.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/linearsolver/LinearConstraint.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/linearsolver/SolverHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/linearsolver/VariableHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/util/NestedArrayHelper.cs \
|
||||
$(SRC_DIR)/ortools/com/google/ortools/util/ProtoHelper.cs \
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/Model.g.cs\
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimit.g.cs\
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.g.cs\
|
||||
@@ -252,7 +252,7 @@ ifeq ($(SYSTEM),win)
|
||||
$(CSC) /target:module /out:$(LIB_DIR)$S$(LIB_PREFIX)$(CLR_ORTOOLS_DLL_NAME).netmodule /lib:$(BIN_DIR) /r:$(CLR_PROTOBUF_DLL_NAME)$(DLL) /warn:0 /nologo /debug $(GEN_DIR)\\com\\google\\ortools\\linearsolver\\*.cs $(SRC_DIR)\\com\\google\\ortools\\linearsolver\\*.cs $(GEN_DIR)\\com\\google\\ortools\\constraintsolver\\*.cs $(SRC_DIR)\\com\\google\\ortools\\constraintsolver\\*.cs $(GEN_DIR)\\com\\google\\ortools\\algorithms\\*.cs $(SRC_DIR)\\com\\google\\ortools\\algorithms\\*.cs $(GEN_DIR)\\com\\google\\ortools\\graph\\*.cs $(SRC_DIR)\\com\\google\\ortools\\util\\*.cs $(GEN_DIR)\\com\\google\\ortools\\properties\\*.cs
|
||||
$(DYNAMIC_LD) $(SIGNING_FLAGS) $(LDOUT)$(BIN_DIR)$S$(CLR_ORTOOLS_DLL_NAME)$(DLL) $(LIB_DIR)$S$(LIB_PREFIX)$(CLR_ORTOOLS_DLL_NAME).netmodule $(OBJ_DIR)$Sswig$Slinear_solver_csharp_wrap.$O $(OBJ_DIR)$Sswig$Sconstraint_solver_csharp_wrap.$O $(OBJ_DIR)$Sswig$Sknapsack_solver_csharp_wrap.$O $(OBJ_DIR)$Sswig$Sgraph_csharp_wrap.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS)
|
||||
else
|
||||
$(CSC) /target:library /out:$(BIN_DIR)/$(CLR_ORTOOLS_DLL_NAME)$(DLL) /lib:$(BIN_DIR) /r:$(CLR_PROTOBUF_DLL_NAME)$(DLL) /warn:0 /nologo /debug $(SRC_DIR)/com/google/ortools/util/*.cs $(GEN_DIR)/com/google/ortools/linearsolver/*.cs $(SRC_DIR)/com/google/ortools/linearsolver/*.cs $(GEN_DIR)/com/google/ortools/constraintsolver/*.cs $(SRC_DIR)/com/google/ortools/constraintsolver/*.cs $(SRC_DIR)/com/google/ortools/algorithms/*.cs $(GEN_DIR)/com/google/ortools/algorithms/*.cs $(GEN_DIR)/com/google/ortools/graph/*.cs $(GEN_DIR)/com/google/ortools/properties/*.cs
|
||||
$(CSC) /target:library /out:$(BIN_DIR)/$(CLR_ORTOOLS_DLL_NAME)$(DLL) /lib:$(BIN_DIR) /r:$(CLR_PROTOBUF_DLL_NAME)$(DLL) /warn:0 /nologo /debug $(SRC_DIR)/ortools/com/google/ortools/util/*.cs $(GEN_DIR)/com/google/ortools/linearsolver/*.cs $(SRC_DIR)/ortools/com/google/ortools/linearsolver/*.cs $(GEN_DIR)/com/google/ortools/constraintsolver/*.cs $(SRC_DIR)/ortools/com/google/ortools/constraintsolver/*.cs $(SRC_DIR)/ortools/com/google/ortools/algorithms/*.cs $(GEN_DIR)/com/google/ortools/algorithms/*.cs $(GEN_DIR)/com/google/ortools/graph/*.cs $(GEN_DIR)/com/google/ortools/properties/*.cs
|
||||
$(DYNAMIC_LD) $(LDOUT)$(LIB_DIR)$S$(LIB_PREFIX)$(CLR_ORTOOLS_DLL_NAME).$(SWIG_LIB_SUFFIX) $(OBJ_DIR)/swig/linear_solver_csharp_wrap.$O $(OBJ_DIR)/swig/constraint_solver_csharp_wrap.$O $(OBJ_DIR)/swig/knapsack_solver_csharp_wrap.$O $(OBJ_DIR)/swig/graph_csharp_wrap.$O $(OR_TOOLS_LNK) $(OR_TOOLS_LD_FLAGS)
|
||||
endif
|
||||
|
||||
@@ -366,14 +366,14 @@ csharpfz: \
|
||||
$(BIN_DIR)/Google.OrTools.Flatzinc$(DLL) \
|
||||
$(BIN_DIR)/csfz$(CLR_EXE_SUFFIX).exe
|
||||
|
||||
$(GEN_DIR)/flatzinc/flatzinc_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/flatzinc/csharp/flatzinc.swig \
|
||||
$(SRC_DIR)/base/base.swig $(SRC_DIR)/util/csharp/proto.swig \
|
||||
$(GEN_DIR)/ortools/flatzinc/flatzinc_csharp_wrap.cc: \
|
||||
$(SRC_DIR)/ortools/flatzinc/csharp/flatzinc.i \
|
||||
$(SRC_DIR)/ortools/base/base.i $(SRC_DIR)/ortools/util/csharp/proto.i \
|
||||
$(FLATZINC_DEPS)
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -nodefaultctor -csharp -o $(GEN_DIR)$Sflatzinc$Sflatzinc_csharp_wrap.cc -module operations_research_flatzinc -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).Flatzinc -dllimport "Google.OrTools.Flatzinc.$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sflatzinc $(SRC_DIR)/flatzinc$Scsharp$Sflatzinc.swig
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -nodefaultctor -csharp -o $(GEN_DIR)$Sortools$Sflatzinc$Sflatzinc_csharp_wrap.cc -module operations_research_flatzinc -namespace $(BASE_CLR_ORTOOLS_DLL_NAME).Flatzinc -dllimport "Google.OrTools.Flatzinc.$(SWIG_LIB_SUFFIX)" -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sflatzinc $(SRC_DIR)/ortools/flatzinc$Scsharp$Sflatzinc.i
|
||||
|
||||
$(OBJ_DIR)/swig/flatzinc_csharp_wrap.$O: $(GEN_DIR)/flatzinc/flatzinc_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)/flatzinc/flatzinc_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sflatzinc_csharp_wrap.$O
|
||||
$(OBJ_DIR)/swig/flatzinc_csharp_wrap.$O: $(GEN_DIR)/ortools/flatzinc/flatzinc_csharp_wrap.cc
|
||||
$(CCC) $(CFLAGS) -c $(GEN_DIR)/ortools/flatzinc/flatzinc_csharp_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sflatzinc_csharp_wrap.$O
|
||||
|
||||
$(BIN_DIR)/Google.OrTools.Flatzinc$(DLL): assembly_info \
|
||||
$(OBJ_DIR)/swig/flatzinc_csharp_wrap.$O \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,56 +4,56 @@
|
||||
|
||||
JAVA_ORTOOLS_LIBS= $(LIB_DIR)/com.google.ortools.jar $(LIB_DIR)/$(LIB_PREFIX)jniortools.$(JNI_LIB_EXT)
|
||||
|
||||
$(GEN_DIR)/constraint_solver/constraint_solver_java_wrap.cc: $(SRC_DIR)/constraint_solver/java/constraint_solver.swig $(SRC_DIR)/constraint_solver/java/routing.swig $(SRC_DIR)/base/base.swig $(SRC_DIR)/util/java/vector.swig $(SRC_DIR)/base/base.swig $(SRC_DIR)/util/java/proto.swig $(CP_DEPS) $(SRC_DIR)/constraint_solver/routing.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Sconstraint_solver$Sconstraint_solver_java_wrap.cc -package com.google.ortools.constraintsolver -module operations_research_constraint_solver -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver $(SRC_DIR)$Sconstraint_solver$Sjava$Srouting.swig
|
||||
$(GEN_DIR)/ortools/constraint_solver/constraint_solver_java_wrap.cc: $(SRC_DIR)/ortools/constraint_solver/java/constraint_solver.i $(SRC_DIR)/ortools/constraint_solver/java/routing.i $(SRC_DIR)/ortools/base/base.i $(SRC_DIR)/ortools/util/java/vector.i $(SRC_DIR)/ortools/base/base.i $(SRC_DIR)/ortools/util/java/proto.i $(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Sortools$Sconstraint_solver$Sconstraint_solver_java_wrap.cc -package com.google.ortools.constraintsolver -module operations_research_constraint_solver -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver $(SRC_DIR)$Sortools$Sconstraint_solver$Sjava$Srouting.i
|
||||
|
||||
$(OBJ_DIR)/swig/constraint_solver_java_wrap.$O: $(GEN_DIR)/constraint_solver/constraint_solver_java_wrap.cc $(CP_DEPS) $(SRC_DIR)/constraint_solver/routing.h
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Sconstraint_solver$Sconstraint_solver_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sconstraint_solver_java_wrap.$O
|
||||
$(OBJ_DIR)/swig/constraint_solver_java_wrap.$O: $(GEN_DIR)/ortools/constraint_solver/constraint_solver_java_wrap.cc $(CP_DEPS) $(SRC_DIR)/ortools/constraint_solver/routing.h
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Sortools$Sconstraint_solver$Sconstraint_solver_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sconstraint_solver_java_wrap.$O
|
||||
|
||||
$(GEN_DIR)/algorithms/knapsack_solver_java_wrap.cc: $(SRC_DIR)/algorithms/java/knapsack_solver.swig $(SRC_DIR)/base/base.swig $(SRC_DIR)/util/java/vector.swig $(SRC_DIR)/algorithms/knapsack_solver.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Salgorithms$Sknapsack_solver_java_wrap.cc -package com.google.ortools.algorithms -module operations_research_algorithms -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms $(SRC_DIR)$Salgorithms$Sjava$Sknapsack_solver.swig
|
||||
$(GEN_DIR)/ortools/algorithms/knapsack_solver_java_wrap.cc: $(SRC_DIR)/ortools/algorithms/java/knapsack_solver.i $(SRC_DIR)/ortools/base/base.i $(SRC_DIR)/ortools/util/java/vector.i $(SRC_DIR)/ortools/algorithms/knapsack_solver.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Sortools$Salgorithms$Sknapsack_solver_java_wrap.cc -package com.google.ortools.algorithms -module operations_research_algorithms -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms $(SRC_DIR)$Sortools$Salgorithms$Sjava$Sknapsack_solver.i
|
||||
|
||||
$(OBJ_DIR)/swig/knapsack_solver_java_wrap.$O: $(GEN_DIR)/algorithms/knapsack_solver_java_wrap.cc
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Salgorithms$Sknapsack_solver_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sknapsack_solver_java_wrap.$O
|
||||
$(OBJ_DIR)/swig/knapsack_solver_java_wrap.$O: $(GEN_DIR)/ortools/algorithms/knapsack_solver_java_wrap.cc
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Sortools$Salgorithms$Sknapsack_solver_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sknapsack_solver_java_wrap.$O
|
||||
|
||||
$(GEN_DIR)/graph/graph_java_wrap.cc: $(SRC_DIR)/graph/java/graph.swig $(SRC_DIR)/base/base.swig $(GRAPH_DEPS)
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Sgraph$Sgraph_java_wrap.cc -package com.google.ortools.graph -module operations_research_graph -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph $(SRC_DIR)$Sgraph$Sjava$Sgraph.swig
|
||||
$(GEN_DIR)/ortools/graph/graph_java_wrap.cc: $(SRC_DIR)/ortools/graph/java/graph.i $(SRC_DIR)/ortools/base/base.i $(GRAPH_DEPS)
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Sortools$Sgraph$Sgraph_java_wrap.cc -package com.google.ortools.graph -module operations_research_graph -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph $(SRC_DIR)$Sortools$Sgraph$Sjava$Sgraph.i
|
||||
|
||||
$(GEN_DIR)/linear_solver/linear_solver_java_wrap.cc: $(SRC_DIR)/linear_solver/java/linear_solver.swig $(SRC_DIR)/base/base.swig $(SRC_DIR)/util/java/vector.swig $(LP_DEPS)
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Slinear_solver$Slinear_solver_java_wrap.cc -package com.google.ortools.linearsolver -module operations_research_linear_solver -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver $(SRC_DIR)$Slinear_solver$Sjava$Slinear_solver.swig
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_java_wrap.cc: $(SRC_DIR)/ortools/linear_solver/java/linear_solver.i $(SRC_DIR)/ortools/base/base.i $(SRC_DIR)/ortools/util/java/vector.i $(LP_DEPS)
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -java -o $(GEN_DIR)$Sortools$Slinear_solver$Slinear_solver_java_wrap.cc -package com.google.ortools.linearsolver -module operations_research_linear_solver -outdir $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver $(SRC_DIR)$Sortools$Slinear_solver$Sjava$Slinear_solver.i
|
||||
|
||||
$(OBJ_DIR)/swig/linear_solver_java_wrap.$O: $(GEN_DIR)/linear_solver/linear_solver_java_wrap.cc $(LP_DEPS)
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Slinear_solver$Slinear_solver_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Slinear_solver_java_wrap.$O
|
||||
$(OBJ_DIR)/swig/linear_solver_java_wrap.$O: $(GEN_DIR)/ortools/linear_solver/linear_solver_java_wrap.cc $(LP_DEPS)
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Sortools$Slinear_solver$Slinear_solver_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Slinear_solver_java_wrap.$O
|
||||
|
||||
$(OBJ_DIR)/swig/graph_java_wrap.$O: $(GEN_DIR)/graph/graph_java_wrap.cc $(GRAPH_DEPS)
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Sgraph$Sgraph_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sgraph_java_wrap.$O
|
||||
$(OBJ_DIR)/swig/graph_java_wrap.$O: $(GEN_DIR)/ortools/graph/graph_java_wrap.cc $(GRAPH_DEPS)
|
||||
$(CCC) $(JNIFLAGS) $(JAVA_INC) -c $(GEN_DIR)$Sortools$Sgraph$Sgraph_java_wrap.cc $(OBJ_OUT)$(OBJ_DIR)$Sswig$Sgraph_java_wrap.$O
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimitProtobuf.java: $(SRC_DIR)/constraint_solver/search_limit.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sconstraint_solver$Ssearch_limit.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimitProtobuf.java: $(SRC_DIR)/ortools/constraint_solver/search_limit.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Ssearch_limit.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.java: $(SRC_DIR)/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sconstraint_solver$Ssolver_parameters.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.java: $(SRC_DIR)/ortools/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Ssolver_parameters.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingParameters.java: $(SRC_DIR)/constraint_solver/routing_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sconstraint_solver$Srouting_parameters.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingParameters.java: $(SRC_DIR)/ortools/constraint_solver/routing_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Srouting_parameters.proto
|
||||
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingEnums.java: $(SRC_DIR)/constraint_solver/routing_enums.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sconstraint_solver$Srouting_enums.proto
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingEnums.java: $(SRC_DIR)/ortools/constraint_solver/routing_enums.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --java_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Srouting_enums.proto
|
||||
|
||||
$(LIB_DIR)/protobuf.jar: dependencies/install/lib/protobuf.jar
|
||||
$(COPY) dependencies$Sinstall$Slib$Sprotobuf.jar $(LIB_DIR)
|
||||
|
||||
$(LIB_DIR)/com.google.ortools.jar: \
|
||||
$(LIB_DIR)/protobuf.jar \
|
||||
$(GEN_DIR)/constraint_solver/constraint_solver_java_wrap.cc \
|
||||
$(GEN_DIR)/algorithms/knapsack_solver_java_wrap.cc \
|
||||
$(GEN_DIR)/graph/graph_java_wrap.cc \
|
||||
$(GEN_DIR)/linear_solver/linear_solver_java_wrap.cc \
|
||||
$(GEN_DIR)/ortools/constraint_solver/constraint_solver_java_wrap.cc \
|
||||
$(GEN_DIR)/ortools/algorithms/knapsack_solver_java_wrap.cc \
|
||||
$(GEN_DIR)/ortools/graph/graph_java_wrap.cc \
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_java_wrap.cc \
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SolverParameters.java \
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/SearchLimitProtobuf.java \
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingParameters.java \
|
||||
$(GEN_DIR)/com/google/ortools/constraintsolver/RoutingEnums.java
|
||||
$(JAVAC_BIN) -d $(OBJ_DIR) -cp lib$Sprotobuf.jar $(SRC_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver$S*.java
|
||||
$(JAVAC_BIN) -d $(OBJ_DIR) -cp lib$Sprotobuf.jar $(SRC_DIR)$Sortools$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph$S*.java $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver$S*.java
|
||||
$(JAR_BIN) cf $(LIB_DIR)$Scom.google.ortools.jar -C $(OBJ_DIR) com$Sgoogle$Sortools$S
|
||||
|
||||
$(LIB_DIR)/$(LIB_PREFIX)jniortools.$(JNI_LIB_EXT): \
|
||||
@@ -394,10 +394,10 @@ clean_java:
|
||||
-$(DEL) $(GEN_DIR)$Scom$Sgoogle$Sortools$Sgraph$S*.java
|
||||
-$(DEL) $(GEN_DIR)$Scom$Sgoogle$Sortools$Salgorithms$S*.java
|
||||
-$(DEL) $(GEN_DIR)$Scom$Sgoogle$Sortools$Slinearsolver$S*.java
|
||||
-$(DEL) $(GEN_DIR)$Salgorithms$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sconstraint_solver$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sgraph$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Slinear_solver$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Salgorithms$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Sconstraint_solver$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Sgraph$S*java_wrap*
|
||||
-$(DEL) $(GEN_DIR)$Sortools$Slinear_solver$S*java_wrap*
|
||||
-$(DEL) $(OBJ_DIR)$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.class
|
||||
-$(DEL) $(OBJ_DIR)$Scom$Sgoogle$Sortools$Sgraph$S*.class
|
||||
-$(DEL) $(OBJ_DIR)$Scom$Sgoogle$Sortools$Salgorithms$S*.class
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# Detect python3
|
||||
|
||||
OR_TOOLS_PYTHONPATH = $(OR_ROOT_FULL)$Ssrc$(CPSEP)$(OR_ROOT_FULL)$Sdependencies$Ssources$Sprotobuf-$(PROTOBUF_TAG)$Spython
|
||||
OR_TOOLS_PYTHONPATH = $(OR_ROOT_FULL)$(CPSEP)$(OR_ROOT_FULL)$Sdependencies$Ssources$Sprotobuf-$(PROTOBUF_TAG)$Spython
|
||||
|
||||
ifeq ($(SYSTEM),win)
|
||||
PYTHON_EXECUTABLE = $(WINDOWS_PATH_TO_PYTHON)$Spython.exe
|
||||
@@ -72,11 +72,11 @@ $(GEN_DIR)$Sortools$S__init__.py:
|
||||
pyalgorithms: $(LIB_DIR)/_pywrapknapsack_solver.$(SWIG_LIB_SUFFIX) $(GEN_DIR)/ortools/algorithms/pywrapknapsack_solver.py
|
||||
|
||||
$(GEN_DIR)/ortools/algorithms/pywrapknapsack_solver.py: \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/python/vector.swig \
|
||||
$(SRC_DIR)/algorithms/python/knapsack_solver.swig \
|
||||
$(SRC_DIR)/algorithms/knapsack_solver.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Salgorithms$Sknapsack_solver_python_wrap.cc -module pywrapknapsack_solver $(SRC_DIR)/algorithms$Spython$Sknapsack_solver.swig
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/python/vector.i \
|
||||
$(SRC_DIR)/ortools/algorithms/python/knapsack_solver.i \
|
||||
$(SRC_DIR)/ortools/algorithms/knapsack_solver.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Salgorithms$Sknapsack_solver_python_wrap.cc -module pywrapknapsack_solver $(SRC_DIR)/ortools/algorithms$Spython$Sknapsack_solver.i
|
||||
|
||||
$(GEN_DIR)/ortools/algorithms/knapsack_solver_python_wrap.cc: $(GEN_DIR)/ortools/algorithms/pywrapknapsack_solver.py
|
||||
|
||||
@@ -95,14 +95,14 @@ endif
|
||||
pygraph: $(LIB_DIR)/_pywrapgraph.$(SWIG_LIB_SUFFIX) $(GEN_DIR)/ortools/graph/pywrapgraph.py
|
||||
|
||||
$(GEN_DIR)/ortools/graph/pywrapgraph.py: \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/python/vector.swig \
|
||||
$(SRC_DIR)/graph/python/graph.swig \
|
||||
$(SRC_DIR)/graph/min_cost_flow.h \
|
||||
$(SRC_DIR)/graph/max_flow.h \
|
||||
$(SRC_DIR)/graph/ebert_graph.h \
|
||||
$(SRC_DIR)/graph/shortestpaths.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Sgraph$Sgraph_python_wrap.cc -module pywrapgraph $(SRC_DIR)/graph$Spython$Sgraph.swig
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/python/vector.i \
|
||||
$(SRC_DIR)/ortools/graph/python/graph.i \
|
||||
$(SRC_DIR)/ortools/graph/min_cost_flow.h \
|
||||
$(SRC_DIR)/ortools/graph/max_flow.h \
|
||||
$(SRC_DIR)/ortools/graph/ebert_graph.h \
|
||||
$(SRC_DIR)/ortools/graph/shortestpaths.h
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Sgraph$Sgraph_python_wrap.cc -module pywrapgraph $(SRC_DIR)/ortools/graph$Spython$Sgraph.i
|
||||
|
||||
$(GEN_DIR)/ortools/graph/graph_python_wrap.cc: $(GEN_DIR)/ortools/graph/pywrapgraph.py
|
||||
|
||||
@@ -121,50 +121,42 @@ endif
|
||||
|
||||
pycp: $(GEN_DIR)/ortools/constraint_solver/pywrapcp.py $(LIB_DIR)/_pywrapcp.$(SWIG_LIB_SUFFIX)
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/search_limit_pb2.py: $(SRC_DIR)/constraint_solver/search_limit.proto
|
||||
$(COPY) $(SRC_DIR)$Sconstraint_solver$Ssearch_limit.proto $(GEN_DIR)$Sortools$Sconstraint_solver
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(GEN_DIR) --python_out=$(GEN_DIR) $(GEN_DIR)$Sortools$Sconstraint_solver$Ssearch_limit.proto
|
||||
$(GEN_DIR)/ortools/constraint_solver/search_limit_pb2.py: $(SRC_DIR)/ortools/constraint_solver/search_limit.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Ssearch_limit.proto
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/model_pb2.py: $(SRC_DIR)/constraint_solver/model.proto $(GEN_DIR)/ortools/constraint_solver/search_limit_pb2.py
|
||||
$(COPY) $(SRC_DIR)$Sconstraint_solver$Smodel.proto $(GEN_DIR)$Sortools$Sconstraint_solver
|
||||
$(SED) -i -e "s/constraint_solver/ortools\/constraint_solver/g" $(GEN_DIR)$Sortools$Sconstraint_solver$Smodel.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(GEN_DIR) --python_out=$(GEN_DIR) $(GEN_DIR)$Sortools$Sconstraint_solver$Smodel.proto
|
||||
$(GEN_DIR)/ortools/constraint_solver/model_pb2.py: $(SRC_DIR)/ortools/constraint_solver/model.proto $(GEN_DIR)/ortools/constraint_solver/search_limit_pb2.py
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Smodel.proto
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/assignment_pb2.py: $(SRC_DIR)/constraint_solver/assignment.proto
|
||||
$(COPY) $(SRC_DIR)$Sconstraint_solver$Sassignment.proto $(GEN_DIR)$Sortools$Sconstraint_solver
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(GEN_DIR) --python_out=$(GEN_DIR) $(GEN_DIR)$Sortools$Sconstraint_solver$Sassignment.proto
|
||||
$(GEN_DIR)/ortools/constraint_solver/assignment_pb2.py: $(SRC_DIR)/ortools/constraint_solver/assignment.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Sassignment.proto
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/solver_parameters_pb2.py: $(SRC_DIR)/constraint_solver/solver_parameters.proto
|
||||
$(COPY) $(SRC_DIR)$Sconstraint_solver$Ssolver_parameters.proto $(GEN_DIR)$Sortools$Sconstraint_solver
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(GEN_DIR) --python_out=$(GEN_DIR) $(GEN_DIR)$Sortools$Sconstraint_solver$Ssolver_parameters.proto
|
||||
$(GEN_DIR)/ortools/constraint_solver/solver_parameters_pb2.py: $(SRC_DIR)/ortools/constraint_solver/solver_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Ssolver_parameters.proto
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/routing_enums_pb2.py: $(SRC_DIR)/constraint_solver/routing_enums.proto
|
||||
$(COPY) $(SRC_DIR)$Sconstraint_solver$Srouting_enums.proto $(GEN_DIR)$Sortools$Sconstraint_solver
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(GEN_DIR) --python_out=$(GEN_DIR) $(GEN_DIR)$Sortools$Sconstraint_solver$Srouting_enums.proto
|
||||
$(GEN_DIR)/ortools/constraint_solver/routing_enums_pb2.py: $(SRC_DIR)/ortools/constraint_solver/routing_enums.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Srouting_enums.proto
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/routing_parameters_pb2.py: $(SRC_DIR)/constraint_solver/routing_parameters.proto $(GEN_DIR)/ortools/constraint_solver/solver_parameters_pb2.py $(GEN_DIR)/ortools/constraint_solver/routing_enums_pb2.py
|
||||
$(COPY) $(SRC_DIR)$Sconstraint_solver$Srouting_parameters.proto $(GEN_DIR)$Sortools$Sconstraint_solver
|
||||
$(SED) -i -e "s/constraint_solver/ortools\/constraint_solver/g" $(GEN_DIR)$Sortools$Sconstraint_solver$Srouting_parameters.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(GEN_DIR) --python_out=$(GEN_DIR) $(GEN_DIR)$Sortools$Sconstraint_solver$Srouting_parameters.proto
|
||||
$(GEN_DIR)/ortools/constraint_solver/routing_parameters_pb2.py: $(SRC_DIR)/ortools/constraint_solver/routing_parameters.proto $(GEN_DIR)/ortools/constraint_solver/solver_parameters_pb2.py $(GEN_DIR)/ortools/constraint_solver/routing_enums_pb2.py
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)$Sortools$Sconstraint_solver$Srouting_parameters.proto
|
||||
|
||||
$(GEN_DIR)/ortools/constraint_solver/pywrapcp.py: \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/python/vector.swig \
|
||||
$(SRC_DIR)/constraint_solver/python/constraint_solver.swig \
|
||||
$(SRC_DIR)/constraint_solver/python/routing.swig \
|
||||
$(SRC_DIR)/constraint_solver/constraint_solver.h \
|
||||
$(SRC_DIR)/constraint_solver/constraint_solveri.h \
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/python/vector.i \
|
||||
$(SRC_DIR)/ortools/constraint_solver/python/constraint_solver.i \
|
||||
$(SRC_DIR)/ortools/constraint_solver/python/routing.i \
|
||||
$(SRC_DIR)/ortools/constraint_solver/constraint_solver.h \
|
||||
$(SRC_DIR)/ortools/constraint_solver/constraint_solveri.h \
|
||||
$(GEN_DIR)/ortools/constraint_solver/assignment_pb2.py \
|
||||
$(GEN_DIR)/ortools/constraint_solver/model_pb2.py \
|
||||
$(GEN_DIR)/ortools/constraint_solver/routing_enums_pb2.py \
|
||||
$(GEN_DIR)/ortools/constraint_solver/routing_parameters_pb2.py \
|
||||
$(GEN_DIR)/ortools/constraint_solver/search_limit_pb2.py \
|
||||
$(GEN_DIR)/ortools/constraint_solver/solver_parameters_pb2.py \
|
||||
$(GEN_DIR)/constraint_solver/assignment.pb.h \
|
||||
$(GEN_DIR)/constraint_solver/model.pb.h \
|
||||
$(GEN_DIR)/constraint_solver/search_limit.pb.h \
|
||||
$(GEN_DIR)/ortools/constraint_solver/assignment.pb.h \
|
||||
$(GEN_DIR)/ortools/constraint_solver/model.pb.h \
|
||||
$(GEN_DIR)/ortools/constraint_solver/search_limit.pb.h \
|
||||
$(CP_LIB_OBJS)
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Sconstraint_solver$Sconstraint_solver_python_wrap.cc -module pywrapcp $(SRC_DIR)/constraint_solver$Spython$Srouting.swig
|
||||
$(SWIG_BINARY) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Sconstraint_solver$Sconstraint_solver_python_wrap.cc -module pywrapcp $(SRC_DIR)/ortools/constraint_solver$Spython$Srouting.i
|
||||
|
||||
# TODO(user): Support pywraprouting as well.
|
||||
|
||||
@@ -187,17 +179,17 @@ endif
|
||||
|
||||
pylp: $(LIB_DIR)/_pywraplp.$(SWIG_LIB_SUFFIX) $(GEN_DIR)/ortools/linear_solver/pywraplp.py
|
||||
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_pb2.py: $(SRC_DIR)/linear_solver/linear_solver.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(SRC_DIR) --python_out=$(GEN_DIR)$Sortools $(SRC_DIR)/linear_solver/linear_solver.proto
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_pb2.py: $(SRC_DIR)/ortools/linear_solver/linear_solver.proto
|
||||
$(PROTOBUF_DIR)/bin/protoc --proto_path=$(INC_DIR) --python_out=$(GEN_DIR) $(SRC_DIR)/ortools/linear_solver/linear_solver.proto
|
||||
|
||||
$(GEN_DIR)/ortools/linear_solver/pywraplp.py: \
|
||||
$(SRC_DIR)/base/base.swig \
|
||||
$(SRC_DIR)/util/python/vector.swig \
|
||||
$(SRC_DIR)/linear_solver/python/linear_solver.swig \
|
||||
$(SRC_DIR)/linear_solver/linear_solver.h \
|
||||
$(GEN_DIR)/linear_solver/linear_solver.pb.h \
|
||||
$(SRC_DIR)/ortools/base/base.i \
|
||||
$(SRC_DIR)/ortools/util/python/vector.i \
|
||||
$(SRC_DIR)/ortools/linear_solver/python/linear_solver.i \
|
||||
$(SRC_DIR)/ortools/linear_solver/linear_solver.h \
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver.pb.h \
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_pb2.py
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Slinear_solver$Slinear_solver_python_wrap.cc -module pywraplp $(SRC_DIR)/linear_solver$Spython$Slinear_solver.swig
|
||||
$(SWIG_BINARY) $(SWIG_INC) -I$(INC_DIR) -c++ -python $(SWIG_PYTHON3_FLAG) -o $(GEN_DIR)$Sortools$Slinear_solver$Slinear_solver_python_wrap.cc -module pywraplp $(SRC_DIR)/ortools/linear_solver$Spython$Slinear_solver.i
|
||||
|
||||
$(GEN_DIR)/ortools/linear_solver/linear_solver_python_wrap.cc: $(GEN_DIR)/ortools/linear_solver/pywraplp.py
|
||||
|
||||
@@ -321,7 +313,7 @@ else
|
||||
ifeq ($(PLATFORM),MACOSX)
|
||||
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && $(PYTHON_EXECUTABLE) setup.py bdist_egg bdist_wheel
|
||||
else
|
||||
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && $(PYTHON_EXECUTABLE) setup.py bdist_egg
|
||||
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && $(PYTHON_EXECUTABLE) setup.py bdist_egg
|
||||
endif
|
||||
endif
|
||||
cd $(PYPI_ARCHIVE_TEMP_DIR)/ortools && twine upload dist/*
|
||||
@@ -330,4 +322,4 @@ pypi_upload: $(PYPI_UPLOAD)
|
||||
|
||||
detect_python:
|
||||
@echo PYTHON3 = $(PYTHON3)
|
||||
@echo SWIG_PYTHON3_FLAG = $(SWIG_PYTHON3_FLAG)
|
||||
@echo SWIG_PYTHON3_FLAG = $(SWIG_PYTHON3_FLAG)
|
||||
|
||||
@@ -49,24 +49,20 @@ MISSING_DIRECTORIES = \
|
||||
objs/sat \
|
||||
objs/swig \
|
||||
objs/util \
|
||||
src/gen/algorithms \
|
||||
src/gen/bop \
|
||||
src/gen/com/google/ortools/algorithms \
|
||||
src/gen/com/google/ortools/constraintsolver \
|
||||
src/gen/com/google/ortools/flatzinc \
|
||||
src/gen/com/google/ortools/graph \
|
||||
src/gen/com/google/ortools/linearsolver \
|
||||
src/gen/com/google/ortools/properties \
|
||||
src/gen/constraint_solver \
|
||||
src/gen/flatzinc \
|
||||
src/gen/glop \
|
||||
src/gen/graph \
|
||||
src/gen/linear_solver \
|
||||
src/gen/ortools/algorithms \
|
||||
src/gen/ortools/constraint_solver \
|
||||
src/gen/ortools/graph \
|
||||
src/gen/ortools/linear_solver \
|
||||
src/gen/sat
|
||||
ortools/gen/com/google/ortools/algorithms \
|
||||
ortools/gen/com/google/ortools/constraintsolver \
|
||||
ortools/gen/com/google/ortools/flatzinc \
|
||||
ortools/gen/com/google/ortools/graph \
|
||||
ortools/gen/com/google/ortools/linearsolver \
|
||||
ortools/gen/com/google/ortools/properties \
|
||||
ortools/gen/ortools/algorithms \
|
||||
ortools/gen/ortools/bop \
|
||||
ortools/gen/ortools/constraint_solver \
|
||||
ortools/gen/ortools/flatzinc \
|
||||
ortools/gen/ortools/glop \
|
||||
ortools/gen/ortools/graph \
|
||||
ortools/gen/ortools/linear_solver \
|
||||
ortools/gen/ortools/sat
|
||||
|
||||
missing_directories: $(MISSING_DIRECTORIES)
|
||||
|
||||
@@ -123,59 +119,47 @@ objs/swig:
|
||||
objs/util:
|
||||
$(MKDIR_P) objs$Sutil
|
||||
|
||||
src/gen/algorithms:
|
||||
$(MKDIR_P) src$Sgen$Salgorithms
|
||||
ortools/gen/com/google/ortools/algorithms:
|
||||
$(MKDIR_P) ortools$Sgen$Scom$Sgoogle$Sortools$Salgorithms
|
||||
|
||||
src/gen/bop:
|
||||
$(MKDIR_P) src$Sgen$Sbop
|
||||
ortools/gen/com/google/ortools/constraintsolver:
|
||||
$(MKDIR_P) ortools$Sgen$Scom$Sgoogle$Sortools$Sconstraintsolver
|
||||
|
||||
src/gen/com/google/ortools/algorithms:
|
||||
$(MKDIR_P) src$Sgen$Scom$Sgoogle$Sortools$Salgorithms
|
||||
ortools/gen/com/google/ortools/graph:
|
||||
$(MKDIR_P) ortools$Sgen$Scom$Sgoogle$Sortools$Sgraph
|
||||
|
||||
src/gen/com/google/ortools/constraintsolver:
|
||||
$(MKDIR_P) src$Sgen$Scom$Sgoogle$Sortools$Sconstraintsolver
|
||||
ortools/gen/com/google/ortools/linearsolver:
|
||||
$(MKDIR_P) ortools$Sgen$Scom$Sgoogle$Sortools$Slinearsolver
|
||||
|
||||
src/gen/com/google/ortools/graph:
|
||||
$(MKDIR_P) src$Sgen$Scom$Sgoogle$Sortools$Sgraph
|
||||
ortools/gen/com/google/ortools/flatzinc:
|
||||
$(MKDIR_P) ortools$Sgen$Scom$Sgoogle$Sortools$Sflatzinc
|
||||
|
||||
src/gen/com/google/ortools/linearsolver:
|
||||
$(MKDIR_P) src$Sgen$Scom$Sgoogle$Sortools$Slinearsolver
|
||||
ortools/gen/com/google/ortools/properties:
|
||||
$(MKDIR_P) ortools$Sgen$Scom$Sgoogle$Sortools$Sproperties
|
||||
|
||||
src/gen/com/google/ortools/flatzinc:
|
||||
$(MKDIR_P) src$Sgen$Scom$Sgoogle$Sortools$Sflatzinc
|
||||
ortools/gen/ortools/algorithms:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Salgorithms
|
||||
|
||||
src/gen/com/google/ortools/properties:
|
||||
$(MKDIR_P) src$Sgen$Scom$Sgoogle$Sortools$Sproperties
|
||||
ortools/gen/ortools/bop:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Sbop
|
||||
|
||||
src/gen/constraint_solver:
|
||||
$(MKDIR_P) src$Sgen$Sconstraint_solver
|
||||
ortools/gen/ortools/constraint_solver:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Sconstraint_solver
|
||||
|
||||
src/gen/flatzinc:
|
||||
$(MKDIR_P) src$Sgen$Sflatzinc
|
||||
ortools/gen/ortools/flatzinc:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Sflatzinc
|
||||
|
||||
src/gen/glop:
|
||||
$(MKDIR_P) src$Sgen$Sglop
|
||||
ortools/gen/ortools/glop:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Sglop
|
||||
|
||||
src/gen/graph:
|
||||
$(MKDIR_P) src$Sgen$Sgraph
|
||||
ortools/gen/ortools/graph:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Sgraph
|
||||
|
||||
src/gen/linear_solver:
|
||||
$(MKDIR_P) src$Sgen$Slinear_solver
|
||||
ortools/gen/ortools/linear_solver:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Slinear_solver
|
||||
|
||||
src/gen/ortools/algorithms:
|
||||
$(MKDIR_P) src$Sgen$Sortools$Salgorithms
|
||||
|
||||
src/gen/ortools/constraint_solver:
|
||||
$(MKDIR_P) src$Sgen$Sortools$Sconstraint_solver
|
||||
|
||||
src/gen/ortools/graph:
|
||||
$(MKDIR_P) src$Sgen$Sortools$Sgraph
|
||||
|
||||
src/gen/ortools/linear_solver:
|
||||
$(MKDIR_P) src$Sgen$Sortools$Slinear_solver
|
||||
|
||||
src/gen/sat:
|
||||
$(MKDIR_P) src$Sgen$Ssat
|
||||
ortools/gen/ortools/sat:
|
||||
$(MKDIR_P) ortools$Sgen$Sortools$Ssat
|
||||
|
||||
# Install gflags. This uses cmake.
|
||||
install_gflags: dependencies/install/bin/gflags_completions.sh
|
||||
|
||||
@@ -17,11 +17,11 @@ else # No need to keep the path in the lib, it is not stored there on linux.
|
||||
LIB_DIR = $(OR_ROOT)lib
|
||||
endif
|
||||
BIN_DIR = $(OR_ROOT)bin
|
||||
GEN_DIR = $(OR_ROOT)src/gen
|
||||
GEN_DIR = $(OR_ROOT)ortools/gen
|
||||
OBJ_DIR = $(OR_ROOT)objs
|
||||
SRC_DIR = $(OR_ROOT)src
|
||||
SRC_DIR = $(OR_ROOT).
|
||||
EX_DIR = $(OR_ROOT)examples
|
||||
INC_DIR = $(OR_ROOT)src
|
||||
INC_DIR = $(OR_ROOT).
|
||||
DEP_BIN_DIR = $(OR_ROOT)dependencies/install/bin
|
||||
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ LIB_SUFFIX = lib
|
||||
BIN_DIR = $(OR_ROOT)bin
|
||||
GEN_DIR = $(OR_ROOT)src\\gen
|
||||
OBJ_DIR = $(OR_ROOT)objs
|
||||
SRC_DIR = $(OR_ROOT)src
|
||||
SRC_DIR = $(OR_ROOT).
|
||||
EX_DIR = $(OR_ROOT)examples
|
||||
INC_DIR = $(OR_ROOT)src
|
||||
INC_DIR = $(OR_ROOT_FULL)
|
||||
LINK_CMD = lib
|
||||
LINK_PREFIX = /OUT:
|
||||
STATIC_LINK_CMD = lib
|
||||
@@ -126,7 +126,7 @@ JAVAC_BIN="$(JDK_DIRECTORY)/bin/javac"
|
||||
JAVA_BIN="$(JDK_DIRECTORY)/bin/java"
|
||||
JAR_BIN="$(JDK_DIRECTORY)/bin/jar"
|
||||
|
||||
CFLAGS= -nologo $(SYSCFLAGS) $(DEBUG) /I$(INC_DIR) /I$(EX_DIR) /I$(GEN_DIR) \
|
||||
CFLAGS= -nologo $(SYSCFLAGS) $(DEBUG) /I$(INC_DIR) /I$(GEN_DIR) \
|
||||
$(GFLAGS_INC) $(ZLIB_INC) $(MINISAT_INC) $(PROTOBUF_INC) $(CBC_INC) \
|
||||
$(CLP_INC) $(GLPK_INC) $(SCIP_INC) $(GUROBI_INC) /DUSE_GLOP /DUSE_BOP \
|
||||
/D__WIN32__ $(SPARSEHASH_INC) /DPSAPI_VERSION=1 $(ARCH)
|
||||
|
||||
@@ -11,5 +11,5 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
import os as _os
|
||||
__path__.append(_os.path.join(__path__[0], '..', '..', 'gen', 'ortools', 'graph'))
|
||||
__path__.append(_os.path.join(__path__[0], '..', '..', '..', 'lib'))
|
||||
__path__.append(_os.path.join(__path__[0], '..', 'gen', 'ortools', 'algorithms'))
|
||||
__path__.append(_os.path.join(__path__[0], '..', '..', 'lib'))
|
||||
@@ -13,20 +13,20 @@
|
||||
|
||||
// TODO(user): Refactor this file to adhere to the SWIG style guide.
|
||||
|
||||
%include "base/base.swig"
|
||||
%include "ortools/base/base.i"
|
||||
|
||||
/* allow partial c# classes */
|
||||
%typemap(csclassmodifiers) SWIGTYPE "public partial class"
|
||||
|
||||
// Include the file we want to wrap a first time.
|
||||
%{
|
||||
#include "algorithms/knapsack_solver.h"
|
||||
#include "ortools/algorithms/knapsack_solver.h"
|
||||
%}
|
||||
|
||||
%include "std_vector.i"
|
||||
|
||||
// See the comment in
|
||||
// ../../constraint_solver/csharp/constraint_solver.swig about naming
|
||||
// ../../constraint_solver/csharp/constraint_solver.i about naming
|
||||
// the template instantiation of std::vector<> differently.
|
||||
%template(KInt64Vector) std::vector<int64>;
|
||||
%template(KInt64VectorVector) std::vector<std::vector<int64> >;
|
||||
@@ -34,4 +34,4 @@
|
||||
%rename (UseReduction) operations_research::KnapsackSolver::use_reduction;
|
||||
%rename (SetUseReduction) operations_research::KnapsackSolver::set_use_reduction;
|
||||
|
||||
%include "algorithms/knapsack_solver.h"
|
||||
%include "ortools/algorithms/knapsack_solver.h"
|
||||
@@ -15,7 +15,7 @@
|
||||
#define OR_TOOLS_ALGORITHMS_DENSE_DOUBLY_LINKED_LIST_H_
|
||||
|
||||
#include <vector>
|
||||
#include "base/logging.h"
|
||||
#include "ortools/base/logging.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "algorithms/dynamic_partition.h"
|
||||
#include "ortools/algorithms/dynamic_partition.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/join.h"
|
||||
#include "base/murmur.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/base/murmur.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/logging.h"
|
||||
#include "ortools/base/logging.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "algorithms/dynamic_permutation.h"
|
||||
#include "ortools/algorithms/dynamic_permutation.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "algorithms/sparse_permutation.h"
|
||||
#include "ortools/algorithms/sparse_permutation.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include <set> // TODO(user): remove when no longer used.
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "ortools/base/logging.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -11,21 +11,21 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "algorithms/find_graph_symmetries.h"
|
||||
#include "ortools/algorithms/find_graph_symmetries.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <numeric>
|
||||
|
||||
#include "base/commandlineflags.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/join.h"
|
||||
#include "algorithms/dense_doubly_linked_list.h"
|
||||
#include "algorithms/dynamic_partition.h"
|
||||
#include "algorithms/dynamic_permutation.h"
|
||||
#include "algorithms/sparse_permutation.h"
|
||||
#include "graph/util.h"
|
||||
#include "util/iterators.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/stringprintf.h"
|
||||
#include "ortools/base/join.h"
|
||||
#include "ortools/algorithms/dense_doubly_linked_list.h"
|
||||
#include "ortools/algorithms/dynamic_partition.h"
|
||||
#include "ortools/algorithms/dynamic_permutation.h"
|
||||
#include "ortools/algorithms/sparse_permutation.h"
|
||||
#include "ortools/graph/util.h"
|
||||
#include "ortools/util/iterators.h"
|
||||
|
||||
DEFINE_bool(minimize_permutation_support_size, false,
|
||||
"Tweak the algorithm to try and minimize the support size"
|
||||
@@ -27,13 +27,13 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "algorithms/dynamic_partition.h"
|
||||
#include "algorithms/dynamic_permutation.h"
|
||||
#include "graph/graph.h"
|
||||
#include "util/iterators.h"
|
||||
#include "util/stats.h"
|
||||
#include "util/time_limit.h"
|
||||
#include "base/status.h"
|
||||
#include "ortools/algorithms/dynamic_partition.h"
|
||||
#include "ortools/algorithms/dynamic_permutation.h"
|
||||
#include "ortools/graph/graph.h"
|
||||
#include "ortools/util/iterators.h"
|
||||
#include "ortools/util/stats.h"
|
||||
#include "ortools/util/time_limit.h"
|
||||
#include "ortools/base/status.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -50,7 +50,7 @@ class GraphSymmetryFinder {
|
||||
// and bypass the need for reverse adjacency lists.
|
||||
//
|
||||
// If you don't know this in advance, you may use GraphIsSymmetric() from
|
||||
// graph/util.h.
|
||||
// ortools/graph/util.h.
|
||||
//
|
||||
// "graph" must not have multi-arcs.
|
||||
// TODO(user): support multi-arcs.
|
||||
@@ -14,7 +14,7 @@
|
||||
// See: //depot/google3/java/com/google/wireless/genie/frontend
|
||||
// /mixer/matching/HungarianOptimizer.java
|
||||
|
||||
#include "algorithms/hungarian.h"
|
||||
#include "ortools/algorithms/hungarian.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
@@ -35,7 +35,7 @@
|
||||
#ifndef OR_TOOLS_ALGORITHMS_HUNGARIAN_H_
|
||||
#define OR_TOOLS_ALGORITHMS_HUNGARIAN_H_
|
||||
|
||||
#include "base/hash.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include <vector>
|
||||
|
||||
namespace operations_research {
|
||||
@@ -1,13 +1,13 @@
|
||||
// Test file for hungarian.h
|
||||
|
||||
#include "algorithms/hungarian.h"
|
||||
#include "ortools/algorithms/hungarian.h"
|
||||
|
||||
#include "base/hash.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/map_util.h"
|
||||
#include "base/random.h"
|
||||
#include "gtest/gtest.h"
|
||||
#include "ortools/base/hash.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/macros.h"
|
||||
#include "ortools/base/map_util.h"
|
||||
#include "ortools/base/random.h"
|
||||
#include "ortools/gtest/gtest.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
//
|
||||
// TODO(user): test all lines marked "untested".
|
||||
|
||||
%include "base/base.swig"
|
||||
%include "ortools/base/base.i"
|
||||
%include "enums.swg"
|
||||
|
||||
%import "util/java/vector.swig"
|
||||
%import "ortools/util/java/vector.i"
|
||||
|
||||
%{
|
||||
#include "algorithms/knapsack_solver.h"
|
||||
#include "ortools/algorithms/knapsack_solver.h"
|
||||
%}
|
||||
|
||||
%ignoreall
|
||||
@@ -45,6 +45,6 @@
|
||||
%unignore operations_research::KnapsackSolver::KNAPSACK_MULTIDIMENSION_GLPK_MIP_SOLVER; // untested
|
||||
%unignore operations_research::KnapsackSolver::KNAPSACK_MULTIDIMENSION_BRANCH_AND_BOUND_SOLVER;
|
||||
|
||||
%include "algorithms/knapsack_solver.h"
|
||||
%include "ortools/algorithms/knapsack_solver.h"
|
||||
|
||||
%unignoreall
|
||||
@@ -12,17 +12,17 @@
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
#include "algorithms/knapsack_solver.h"
|
||||
#include "ortools/algorithms/knapsack_solver.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "linear_solver/linear_solver.h"
|
||||
#include "util/bitset.h"
|
||||
#include "util/time_limit.h"
|
||||
#include "ortools/base/stl_util.h"
|
||||
#include "ortools/linear_solver/linear_solver.h"
|
||||
#include "ortools/util/bitset.h"
|
||||
#include "ortools/util/time_limit.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "util/time_limit.h"
|
||||
#include "ortools/base/basictypes.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/macros.h"
|
||||
#include "ortools/util/time_limit.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
// Python wrapping of ../knapsack_solver.h. See that file.
|
||||
//
|
||||
// USAGE EXAMPLES:
|
||||
// - python/knapsack.py
|
||||
// - examples/python/knapsack.py
|
||||
// - ./pywrapknapsack_solver_test.py
|
||||
|
||||
%include "base/base.swig"
|
||||
%include "ortools/base/base.i"
|
||||
|
||||
%import "util/python/vector.swig"
|
||||
%import "ortools/util/python/vector.i"
|
||||
|
||||
%{
|
||||
#include "algorithms/knapsack_solver.h"
|
||||
#include "ortools/algorithms/knapsack_solver.h"
|
||||
%}
|
||||
|
||||
%ignoreall
|
||||
@@ -48,6 +48,6 @@
|
||||
%unignore operations_research::KnapsackSolver::
|
||||
KNAPSACK_MULTIDIMENSION_GLPK_MIP_SOLVER;
|
||||
|
||||
%include "algorithms/knapsack_solver.h"
|
||||
%include "ortools/algorithms/knapsack_solver.h"
|
||||
|
||||
%unignoreall
|
||||
@@ -11,11 +11,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "algorithms/sparse_permutation.h"
|
||||
#include "ortools/algorithms/sparse_permutation.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include "base/logging.h"
|
||||
#include "base/join.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/join.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "ortools/base/logging.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
#ifndef OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_INL_H_
|
||||
#define OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_INL_H_
|
||||
|
||||
#include "base/adjustable_priority_queue.h"
|
||||
#include "ortools/base/adjustable_priority_queue.h"
|
||||
|
||||
#endif // OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_INL_H_
|
||||
@@ -14,9 +14,9 @@
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include "base/basictypes.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/macros.h"
|
||||
#include "ortools/base/basictypes.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/macros.h"
|
||||
|
||||
#ifndef OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_H_
|
||||
#define OR_TOOLS_BASE_ADJUSTABLE_PRIORITY_QUEUE_H_
|
||||
@@ -54,8 +54,8 @@
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "base/basictypes.h"
|
||||
#include <base/python-swig.h>
|
||||
#include "ortools/base/basictypes.h"
|
||||
#include "ortools/base/python-swig.h"
|
||||
%}
|
||||
|
||||
// Typedefs and typemaps do not interact the way one would expect.
|
||||
@@ -259,7 +259,7 @@ COPY_TYPEMAPS(uint64, Fprint);
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "base/basictypes.h"
|
||||
#include "ortools/base/basictypes.h"
|
||||
%}
|
||||
|
||||
%include <std_string.i>
|
||||
@@ -389,7 +389,7 @@ COPY_TYPEMAPS(unsigned long long, uint64);
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "base/basictypes.h"
|
||||
#include "ortools/base/basictypes.h"
|
||||
%}
|
||||
|
||||
%include <std_string.i>
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef OR_TOOLS_BASE_BASICTYPES_H_
|
||||
#define OR_TOOLS_BASE_BASICTYPES_H_
|
||||
|
||||
#include "base/integral_types.h"
|
||||
#include "base/logging.h"
|
||||
#include "ortools/base/integral_types.h"
|
||||
#include "ortools/base/logging.h"
|
||||
|
||||
#endif // OR_TOOLS_BASE_BASICTYPES_H_
|
||||
@@ -11,11 +11,11 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "base/bitmap.h"
|
||||
#include "ortools/base/bitmap.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "ortools/base/basictypes.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define OR_TOOLS_BASE_BITMAP_H_
|
||||
|
||||
#include <string.h>
|
||||
#include "base/basictypes.h"
|
||||
#include "ortools/base/basictypes.h"
|
||||
|
||||
namespace operations_research {
|
||||
namespace internal {
|
||||
@@ -11,7 +11,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "ortools/base/callback.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef OR_TOOLS_BASE_CALLBACK_H_
|
||||
#define OR_TOOLS_BASE_CALLBACK_H_
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "ortools/base/logging.h"
|
||||
|
||||
namespace operations_research {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user