export from google3
This commit is contained in:
@@ -25,10 +25,11 @@ important for performance.
|
||||
|
||||
### Solution
|
||||
|
||||
* [assignment.proto](../constraint_solver/assignment.proto):
|
||||
Holds the solution of a CP problem.
|
||||
* [demon_profiler.proto](../constraint_solver/demon_profiler.proto):
|
||||
Holds the timeline and execution profile of constraints and demons (daemons).
|
||||
* [assignment.proto](../constraint_solver/assignment.proto):
|
||||
Holds the solution of a CP problem.
|
||||
* [demon_profiler.proto](../constraint_solver/demon_profiler.proto):
|
||||
Holds the timeline and execution profile of constraints and demons
|
||||
(daemons).
|
||||
|
||||
## Routing solver
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
syntax = "proto3";
|
||||
|
||||
|
||||
package operations_research;
|
||||
|
||||
// Storage for IntVars.
|
||||
@@ -63,4 +62,3 @@ message AssignmentProto {
|
||||
WorkerInfo worker_info = 4;
|
||||
bool is_valid = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -1009,7 +1009,6 @@ class IntVarLocalSearchHandler {
|
||||
IntVarLocalSearchHandler>::OnStart;
|
||||
// clang-format on
|
||||
#endif // SWIGPYTHON
|
||||
|
||||
// clang-format off
|
||||
%rename(IntVarLocalSearchOperatorTemplate)
|
||||
VarLocalSearchOperator<IntVar, int64_t, IntVarLocalSearchHandler>;
|
||||
|
||||
@@ -7385,7 +7385,7 @@ void IntVar::SetValues(const std::vector<int64_t>& values) {
|
||||
// that uses a global, static shared (and locked) storage.
|
||||
// TODO(user): [optional] consider porting
|
||||
// STLSortAndRemoveDuplicates from ortools/base/stl_util.h to the
|
||||
// existing open_source/base/stl_util.h and using it here.
|
||||
// existing base/stl_util.h and using it here.
|
||||
// TODO(user): We could filter out values not in the var.
|
||||
std::vector<int64_t>& tmp = solver()->tmp_vector_;
|
||||
tmp.clear();
|
||||
|
||||
@@ -1656,7 +1656,7 @@ PROTO2_RETURN(operations_research::RegularLimitParameters,
|
||||
namespace operations_research {
|
||||
|
||||
// Globals
|
||||
// IMPORTANT(corentinl): Globals will be placed in main.java
|
||||
// IMPORTANT(user): Globals will be placed in main.java
|
||||
// i.e. use `import com.[...].constraintsolver.main`
|
||||
%ignore FillValues;
|
||||
%rename (areAllBooleans) AreAllBooleans;
|
||||
|
||||
@@ -365,7 +365,7 @@ PROTO2_RETURN(operations_research::RoutingModelParameters,
|
||||
%unignore RoutingIndexPairs;
|
||||
|
||||
namespace operations_research {
|
||||
// IMPORTANT(viger): These functions from routing_parameters.h are global, so in
|
||||
// IMPORTANT(user): These functions from routing_parameters.h are global, so in
|
||||
// java they are in the main.java (import com.[...].constraintsolver.main).
|
||||
%rename (defaultRoutingSearchParameters) DefaultRoutingSearchParameters;
|
||||
%rename (defaultRoutingModelParameters) DefaultRoutingModelParameters;
|
||||
|
||||
@@ -2760,7 +2760,7 @@ class PathStateFilter : public LocalSearchFilter {
|
||||
// Selection-based algorithm in O(n^2), to use for small change sets.
|
||||
void MakeChainsFromChangedPathsAndArcsWithSelectionAlgorithm();
|
||||
// From changed_paths_ and changed_arcs_, fill chains_ and paths_.
|
||||
// Generic algorithm in O(std::sort(n)+n), to use for larger change sets.
|
||||
// Generic algorithm in O(sort(n)+n), to use for larger change sets.
|
||||
void MakeChainsFromChangedPathsAndArcsWithGenericAlgorithm();
|
||||
|
||||
const std::unique_ptr<PathState> path_state_;
|
||||
|
||||
@@ -52,7 +52,6 @@ DEFINE_INDEX_TYPE_TYPEDEF(
|
||||
operations_research::RoutingVehicleClassIndex,
|
||||
operations_research::RoutingModel::VehicleClassIndex);
|
||||
|
||||
|
||||
%ignore operations_research::RoutingModel::RegisterStateDependentTransitCallback;
|
||||
%ignore operations_research::RoutingModel::StateDependentTransitCallback;
|
||||
%ignore operations_research::RoutingModel::MakeStateDependentTransit;
|
||||
@@ -80,7 +79,7 @@ PY_PROTO_TYPEMAP(ortools.constraint_solver.routing_parameters_pb2,
|
||||
%include "ortools/constraint_solver/routing_parameters.h"
|
||||
%unignoreall
|
||||
|
||||
// %including a .proto.h is frowned upon (for good general reasons), so we
|
||||
// %including a .pb.h is frowned upon (for good general reasons), so we
|
||||
// have to duplicate the OptionalBoolean enum here to give it to python users.
|
||||
namespace operations_research {
|
||||
enum OptionalBoolean {
|
||||
|
||||
@@ -14,29 +14,28 @@
|
||||
"""Helper macro to compile and test code samples."""
|
||||
|
||||
def code_sample_cc(name):
|
||||
native.cc_binary(
|
||||
name = name,
|
||||
srcs = [name + ".cc"],
|
||||
deps = [
|
||||
"//ortools/base",
|
||||
"//ortools/constraint_solver:cp",
|
||||
"//ortools/constraint_solver:routing",
|
||||
"//ortools/constraint_solver:routing_enums_cc_proto",
|
||||
"//ortools/constraint_solver:routing_flags",
|
||||
],
|
||||
)
|
||||
|
||||
native.cc_test(
|
||||
name = name+"_test",
|
||||
size = "small",
|
||||
srcs = [name + ".cc"],
|
||||
deps = [
|
||||
":"+name,
|
||||
"//ortools/base",
|
||||
"//ortools/constraint_solver:cp",
|
||||
"//ortools/constraint_solver:routing",
|
||||
"//ortools/constraint_solver:routing_enums_cc_proto",
|
||||
"//ortools/constraint_solver:routing_flags",
|
||||
],
|
||||
)
|
||||
native.cc_binary(
|
||||
name = name,
|
||||
srcs = [name + ".cc"],
|
||||
deps = [
|
||||
"//ortools/base",
|
||||
"//ortools/constraint_solver:cp",
|
||||
"//ortools/constraint_solver:routing",
|
||||
"//ortools/constraint_solver:routing_enums_cc_proto",
|
||||
"//ortools/constraint_solver:routing_flags",
|
||||
],
|
||||
)
|
||||
|
||||
native.cc_test(
|
||||
name = name + "_test",
|
||||
size = "small",
|
||||
srcs = [name + ".cc"],
|
||||
deps = [
|
||||
":" + name,
|
||||
"//ortools/base",
|
||||
"//ortools/constraint_solver:cp",
|
||||
"//ortools/constraint_solver:routing",
|
||||
"//ortools/constraint_solver:routing_enums_cc_proto",
|
||||
"//ortools/constraint_solver:routing_flags",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -20,7 +20,7 @@ option java_package = "com.google.ortools.constraintsolver";
|
||||
option java_multiple_files = true;
|
||||
// We set the outer classname to something other than 'SearchLimit', which is
|
||||
// in conflict with the SWIG-generated class in the same directory (see
|
||||
// java/constraint_solver.swig).
|
||||
// java/constraint_solver.i).
|
||||
option java_outer_classname = "SearchLimitProtobuf";
|
||||
option csharp_namespace = "Google.OrTools.ConstraintSolver";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user