# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.2 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise RuntimeError("Python 2.7 or later required") # Import the low-level C/C++ module if __package__ or "." in __name__: from . import _pywrapsat else: import _pywrapsat try: import builtins as __builtin__ except ImportError: import __builtin__ def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except __builtin__.Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) def _swig_setattr_nondynamic_instance_variable(set): def set_instance_attr(self, name, value): if name == "thisown": self.this.own(value) elif name == "this": set(self, name, value) elif hasattr(self, name) and isinstance(getattr(type(self), name), property): set(self, name, value) else: raise AttributeError("You cannot add instance attributes to %s" % self) return set_instance_attr def _swig_setattr_nondynamic_class_variable(set): def set_class_attr(cls, name, value): if hasattr(cls, name) and not isinstance(getattr(cls, name), property): set(cls, name, value) else: raise AttributeError("You cannot add class attributes to %s" % cls) return set_class_attr def _swig_add_metaclass(metaclass): """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" def wrapper(cls): return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) return wrapper class _SwigNonDynamicMeta(type): """Meta class to enforce nondynamic attributes (no new attributes) for a class""" __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) import weakref import numbers class SolutionCallback(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr __swig_destroy__ = _pywrapsat.delete_SolutionCallback def OnSolutionCallback(self) -> "void": return _pywrapsat.SolutionCallback_OnSolutionCallback(self) def NumBooleans(self) -> "int64": return _pywrapsat.SolutionCallback_NumBooleans(self) def NumBranches(self) -> "int64": return _pywrapsat.SolutionCallback_NumBranches(self) def NumConflicts(self) -> "int64": return _pywrapsat.SolutionCallback_NumConflicts(self) def NumBinaryPropagations(self) -> "int64": return _pywrapsat.SolutionCallback_NumBinaryPropagations(self) def NumIntegerPropagations(self) -> "int64": return _pywrapsat.SolutionCallback_NumIntegerPropagations(self) def WallTime(self) -> "double": return _pywrapsat.SolutionCallback_WallTime(self) def UserTime(self) -> "double": return _pywrapsat.SolutionCallback_UserTime(self) def ObjectiveValue(self) -> "double": return _pywrapsat.SolutionCallback_ObjectiveValue(self) def BestObjectiveBound(self) -> "double": return _pywrapsat.SolutionCallback_BestObjectiveBound(self) def SolutionIntegerValue(self, index: "int") -> "int64": return _pywrapsat.SolutionCallback_SolutionIntegerValue(self, index) def SolutionBooleanValue(self, index: "int") -> "bool": return _pywrapsat.SolutionCallback_SolutionBooleanValue(self, index) def StopSearch(self) -> "void": return _pywrapsat.SolutionCallback_StopSearch(self) def Response(self) -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SolutionCallback_Response(self) def HasResponse(self) -> "bool": return _pywrapsat.SolutionCallback_HasResponse(self) def __init__(self): if self.__class__ == SolutionCallback: _self = None else: _self = self _pywrapsat.SolutionCallback_swiginit(self, _pywrapsat.new_SolutionCallback(_self, )) def __disown__(self): self.this.disown() _pywrapsat.disown_SolutionCallback(self) return weakref.proxy(self) # Register SolutionCallback in _pywrapsat: _pywrapsat.SolutionCallback_swigregister(SolutionCallback) class SatHelper(object): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr @staticmethod def Solve(model_proto: "operations_research::sat::CpModelProto const &") -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SatHelper_Solve(model_proto) @staticmethod def SolveWithParameters(model_proto: "operations_research::sat::CpModelProto const &", parameters: "operations_research::sat::SatParameters const &") -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SatHelper_SolveWithParameters(model_proto, parameters) @staticmethod def SolveWithParametersAndSolutionCallback(model_proto: "operations_research::sat::CpModelProto const &", parameters: "operations_research::sat::SatParameters const &", callback: "SolutionCallback") -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SatHelper_SolveWithParametersAndSolutionCallback(model_proto, parameters, callback) @staticmethod def ModelStats(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string": return _pywrapsat.SatHelper_ModelStats(model_proto) @staticmethod def SolverResponseStats(response: "operations_research::sat::CpSolverResponse const &") -> "std::string": return _pywrapsat.SatHelper_SolverResponseStats(response) @staticmethod def ValidateModel(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string": return _pywrapsat.SatHelper_ValidateModel(model_proto) @staticmethod def VariableDomain(variable_proto: "operations_research::sat::IntegerVariableProto const &") -> "operations_research::Domain": return _pywrapsat.SatHelper_VariableDomain(variable_proto) @staticmethod def WriteModelToFile(model_proto: "operations_research::sat::CpModelProto const &", filename: "std::string const &") -> "bool": return _pywrapsat.SatHelper_WriteModelToFile(model_proto, filename) def __init__(self): _pywrapsat.SatHelper_swiginit(self, _pywrapsat.new_SatHelper()) __swig_destroy__ = _pywrapsat.delete_SatHelper # Register SatHelper in _pywrapsat: _pywrapsat.SatHelper_swigregister(SatHelper) def SatHelper_Solve(model_proto: "operations_research::sat::CpModelProto const &") -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SatHelper_Solve(model_proto) def SatHelper_SolveWithParameters(model_proto: "operations_research::sat::CpModelProto const &", parameters: "operations_research::sat::SatParameters const &") -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SatHelper_SolveWithParameters(model_proto, parameters) def SatHelper_SolveWithParametersAndSolutionCallback(model_proto: "operations_research::sat::CpModelProto const &", parameters: "operations_research::sat::SatParameters const &", callback: "SolutionCallback") -> "operations_research::sat::CpSolverResponse": return _pywrapsat.SatHelper_SolveWithParametersAndSolutionCallback(model_proto, parameters, callback) def SatHelper_ModelStats(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string": return _pywrapsat.SatHelper_ModelStats(model_proto) def SatHelper_SolverResponseStats(response: "operations_research::sat::CpSolverResponse const &") -> "std::string": return _pywrapsat.SatHelper_SolverResponseStats(response) def SatHelper_ValidateModel(model_proto: "operations_research::sat::CpModelProto const &") -> "std::string": return _pywrapsat.SatHelper_ValidateModel(model_proto) def SatHelper_VariableDomain(variable_proto: "operations_research::sat::IntegerVariableProto const &") -> "operations_research::Domain": return _pywrapsat.SatHelper_VariableDomain(variable_proto) def SatHelper_WriteModelToFile(model_proto: "operations_research::sat::CpModelProto const &", filename: "std::string const &") -> "bool": return _pywrapsat.SatHelper_WriteModelToFile(model_proto, filename)