Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions ortools/constraint_solver/constraint_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@
#include "ortools/util/sorted_interval_list.h"
#include "ortools/util/tuple_set.h"

#if !defined(SWIG)
#ifndef SWIG
OR_DLL ABSL_DECLARE_FLAG(int64_t, cp_random_seed);
OR_DLL ABSL_DECLARE_FLAG(bool, cp_disable_solve);
#endif // !defined(SWIG)
#endif // SWIG

class File;

Expand Down Expand Up @@ -3609,7 +3609,11 @@ class Demon : public BaseObject {
};

/// Model visitor.
class OR_DLL ModelVisitor : public BaseObject {
class
#ifndef SWIG
OR_DLL
#endif
ModelVisitor : public BaseObject {
public:
/// Constraint and Expression types.
static const char kAbs[];
Expand Down Expand Up @@ -4825,7 +4829,11 @@ class ImprovementSearchLimit : public SearchLimit {
/// cannot be accessed any more. An interval var is automatically marked
/// as unperformed when it is not consistent anymore (start greater
/// than end, duration < 0...)
class OR_DLL IntervalVar : public PropagationBaseObject {
class
#ifndef SWIG
OR_DLL
#endif
IntervalVar : public PropagationBaseObject {
public:
/// The smallest acceptable value to be returned by StartMin()
static const int64_t kMinValidValue;
Expand Down
1 change: 1 addition & 0 deletions ortools/graph/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ cc_library(
visibility = ["//visibility:public"],
deps = [
"//ortools/base",
"//ortools/base:base_export",
"//ortools/graph:iterators",
"//ortools/util:permutation",
"//ortools/util:zvector",
Expand Down
8 changes: 7 additions & 1 deletion ortools/linear_solver/linear_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@
#include "ortools/port/proto_utils.h"
#include "ortools/util/lazy_mutable_copy.h"

#ifndef SWIG
OR_DLL ABSL_DECLARE_FLAG(bool, linear_solver_enable_verbose_output);
OR_DLL ABSL_DECLARE_FLAG(bool, log_verification_errors);
OR_DLL ABSL_DECLARE_FLAG(bool, verify_solution);
#endif

namespace operations_research {

Expand Down Expand Up @@ -1470,7 +1472,11 @@ class MPConstraint {
* instead. We need to figure out how to deal with the subtleties of
* the default values.
*/
class OR_DLL MPSolverParameters {
class
#ifndef SWIG
OR_DLL
#endif
MPSolverParameters {
public:
/// Enumeration of parameters that take continuous values.
enum DoubleParam {
Expand Down
3 changes: 3 additions & 0 deletions ortools/sat/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ cc_library(
":cp_model_cc_proto",
":drat_proof_handler",
":sat_base",
"//ortools/base:base_export",
"//ortools/base:file",
"//ortools/base:hash",
"//ortools/base:stl_util",
Expand Down Expand Up @@ -855,6 +856,7 @@ cc_library(
":util",
":work_assignment",
"//ortools/base",
"//ortools/base:base_export",
"//ortools/base:file",
"//ortools/base:status_macros",
"//ortools/base:strong_vector",
Expand Down Expand Up @@ -1094,6 +1096,7 @@ cc_library(
":sat_solver",
":solution_crush",
":util",
"//ortools/base:base_export",
"//ortools/base:logging",
"//ortools/port:proto_utils",
"//ortools/util:affine_relation",
Expand Down
2 changes: 2 additions & 0 deletions ortools/sat/cp_model_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
#include "ortools/sat/model.h"
#include "ortools/sat/sat_parameters.pb.h"

#ifndef SWIG
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_dump_response);
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_drat_check);
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_lrat_check);
#endif

namespace operations_research {
namespace sat {
Expand Down
2 changes: 2 additions & 0 deletions ortools/sat/cp_model_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@
#include "ortools/util/bitset.h"
#include "ortools/util/sorted_interval_list.h"

#ifndef SWIG
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_dump_models);
OR_DLL ABSL_DECLARE_FLAG(std::string, cp_model_dump_prefix);
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_dump_problematic_lns);
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_dump_submodels);
#endif

namespace operations_research {
namespace sat {
Expand Down
2 changes: 2 additions & 0 deletions ortools/sat/presolve_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@
#include "ortools/util/sorted_interval_list.h"
#include "ortools/util/time_limit.h"

#ifndef SWIG
OR_DLL ABSL_DECLARE_FLAG(bool, cp_model_debug_postsolve);
#endif

namespace operations_research {
namespace sat {
Expand Down
1 change: 1 addition & 0 deletions ortools/util/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ cc_library(
hdrs = ["time_limit.h"],
deps = [
":running_stat",
"//ortools/base:base_export",
"//ortools/base:timer",
"//ortools/base:types",
"@abseil-cpp//absl/base:core_headers",
Expand Down
2 changes: 2 additions & 0 deletions ortools/util/time_limit.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@
#include "ortools/base/types.h"
#include "ortools/util/running_stat.h"

#ifndef SWIG
/**
* Enables changing the behavior of the TimeLimit class to use -b usertime
* instead of \b walltime. This is mainly useful for benchmarks.
*/
OR_DLL ABSL_DECLARE_FLAG(bool, time_limit_use_usertime);
#endif // SWIG

namespace operations_research {

Expand Down
Loading