ortools.init.python.init

class CppFlags(pybind11_builtins.pybind11_object):

Simple structure that holds useful C++ flags to setup from non-C++ languages.

CppFlags()

__init__(self: CppFlags) -> None

stderrthreshold: int

(self: CppFlags) -> int

log_prefix: bool

(self: CppFlags) -> bool

cp_model_dump_prefix: str

(self: CppFlags) -> str

cp_model_dump_models: bool

(self: CppFlags) -> bool

cp_model_dump_lns: bool

(self: CppFlags) -> bool

cp_model_dump_response: bool

(self: CppFlags) -> bool

class CppBridge(pybind11_builtins.pybind11_object):

This class performs various C++ initialization.

It is meant to be used once at the start of a program.

CppBridge(*args, **kwargs)
def init_logging(usage: str) -> None:

init_logging(usage: str) -> None

Initialize the C++ logging layer.

This must be called once before any other library from OR-Tools are used.

def shutdown_logging() -> None:

shutdown_logging() -> None

Shutdown the C++ logging layer.

This can be called to shutdown the C++ logging layer from OR-Tools. It should only be called once.

Deprecated: this is a no-op.

def set_flags(flags: CppFlags) -> None:

set_flags(flags: CppFlags) -> None

Sets all the C++ flags contained in the CppFlags structure.

def load_gurobi_shared_library(full_library_path: str) -> bool:

load_gurobi_shared_library(full_library_path: str) -> bool

Load the gurobi shared library.

This is necessary if the library is installed in a non canonical directory, or if for any reason, it is not found. You need to pass the full path, including the shared library file. It returns true if the library was found and correctly loaded.

def delete_byte_array(buffer: int) -> None:

delete_byte_array(buffer: int) -> None

Delete a temporary C++ byte array.

class OrToolsVersion(pybind11_builtins.pybind11_object):
OrToolsVersion(*args, **kwargs)
def major_number() -> int:

major_number() -> int

Returns the major version of OR-Tools.

def minor_number() -> int:

minor_number() -> int

Returns the minor version of OR-Tools.

def patch_number() -> int:

patch_number() -> int

Returns the patch version of OR-Tools.

def version_string() -> str:

version_string() -> str

Returns the string version of OR-Tools.