ortools.set_cover.python.set_cover

class SetCoverModelStats(pybind11_builtins.pybind11_object):
SetCoverModelStats(*args, **kwargs)
to_string: str
to_verbose_string: str
class SetCoverModel(pybind11_builtins.pybind11_object):
SetCoverModel()
num_elements: int
num_subsets: int
num_nonzeros: int
fill_rate: float
subset_costs: list[float]
columns: list[list[int]]
rows: list[list[int]]
row_view_is_valid: bool
def SubsetRange(self) -> Iterator[int]:

SubsetRange(self: ortools.set_cover.python.set_cover.SetCoverModel) -> Iterator[int]

def ElementRange(self) -> Iterator[int]:

ElementRange(self: ortools.set_cover.python.set_cover.SetCoverModel) -> Iterator[int]

all_subsets: list[int]
def set_name(self, arg0: str) -> None:

set_name(self: ortools.set_cover.python.set_cover.SetCoverModel, arg0: str) -> None

def add_empty_subset(self, cost: float) -> None:

add_empty_subset(self: ortools.set_cover.python.set_cover.SetCoverModel, cost: float) -> None

def add_element_to_last_subset(self, element: int) -> None:

add_element_to_last_subset(self: ortools.set_cover.python.set_cover.SetCoverModel, element: int) -> None

def set_subset_cost(self, subset: int, cost: float) -> None:

set_subset_cost(self: ortools.set_cover.python.set_cover.SetCoverModel, subset: int, cost: float) -> None

def add_element_to_subset(self, subset: int, cost: int) -> None:

add_element_to_subset(self: ortools.set_cover.python.set_cover.SetCoverModel, subset: int, cost: int) -> None

def create_sparse_row_view(self) -> None:

create_sparse_row_view(self: ortools.set_cover.python.set_cover.SetCoverModel) -> None

def sort_elements_in_subsets(self) -> None:

sort_elements_in_subsets(self: ortools.set_cover.python.set_cover.SetCoverModel) -> None

def compute_feasibility(self) -> bool:

compute_feasibility(self: ortools.set_cover.python.set_cover.SetCoverModel) -> bool

def resize_num_subsets(self, num_subsets: int) -> None:

resize_num_subsets(self: ortools.set_cover.python.set_cover.SetCoverModel, num_subsets: int) -> None

def reserve_num_elements_in_subset(self, num_elements: int, subset: int) -> None:

reserve_num_elements_in_subset(self: ortools.set_cover.python.set_cover.SetCoverModel, num_elements: int, subset: int) -> None

def export_model_as_proto(self, *args, **kwargs):

export_model_as_proto(self: ortools.set_cover.python.set_cover.SetCoverModel) -> operations_research::SetCoverProto

def import_model_from_proto(self, arg0) -> None:

import_model_from_proto(self: ortools.set_cover.python.set_cover.SetCoverModel, arg0: operations_research::SetCoverProto) -> None

def compute_row_deciles(self) -> list[int]:

compute_row_deciles(self: ortools.set_cover.python.set_cover.SetCoverModel) -> list[int]

def compute_column_deciles(self) -> list[int]:

compute_column_deciles(self: ortools.set_cover.python.set_cover.SetCoverModel) -> list[int]

class SetCoverDecision(pybind11_builtins.pybind11_object):
SetCoverDecision(**kwds)

__init__(args, *kwargs) Overloaded function.

  1. __init__(self: ortools.set_cover.python.set_cover.SetCoverDecision) -> None

  2. __init__(self: ortools.set_cover.python.set_cover.SetCoverDecision, subset: int, value: bool) -> None

def subset(self) -> int:
def decision(self) -> bool:
class consistency_level(pybind11_builtins.pybind11_object):

Members:

COST_AND_COVERAGE

FREE_AND_UNCOVERED

REDUNDANCY

consistency_level(value: int)

__init__(self: ortools.set_cover.python.set_cover.consistency_level, value: int) -> None

name: str

name(self: object) -> str

COST_AND_COVERAGE: ClassVar[consistency_level] = <consistency_level.COST_AND_COVERAGE: 1>
FREE_AND_UNCOVERED: ClassVar[consistency_level] = <consistency_level.FREE_AND_UNCOVERED: 2>
REDUNDANCY: ClassVar[consistency_level] = <consistency_level.REDUNDANCY: 3>
class SetCoverInvariant(pybind11_builtins.pybind11_object):
def initialize(self) -> None:
def clear(self) -> None:
def cost(self) -> float:
def num_uncovered_elements(self) -> int:

num_uncovered_elements(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> int

def is_selected(self) -> list[bool]:
def num_free_elements(self) -> list[int]:

num_free_elements(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[int]

def num_coverage_le_1_elements(self) -> list[int]:

num_coverage_le_1_elements(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[int]

def coverage(self) -> list[int]:
def compute_coverage_in_focus(self, focus) -> list[int]:

compute_coverage_in_focus(self: ortools.set_cover.python.set_cover.SetCoverInvariant, focus: absl::lts_20250814::Span) -> list[int]

def is_redundant(self) -> list[bool]:

is_redundant(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[bool]

def clear_trace(self) -> None:
def clear_removability_information(self) -> None:

clear_removability_information(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> None

def newly_removable_subsets(self, *args, **kwargs):

newly_removable_subsets(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[util_intops::StrongInt]

def newly_non_removable_subsets(self, *args, **kwargs):

newly_non_removable_subsets(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[util_intops::StrongInt]

def compress_trace(self) -> None:
def load_solution(self, arg0) -> None:

load_solution(self: ortools.set_cover.python.set_cover.SetCoverInvariant, arg0: absl::lts_20250814::Span) -> None

def check_consistency(self, arg0: consistency_level) -> bool:
def compute_is_redundant(self, subset: int) -> bool:

compute_is_redundant(self: ortools.set_cover.python.set_cover.SetCoverInvariant, subset: int) -> bool

def select( self, subset: int, consistency: consistency_level) -> None:
def deselect( self, subset: int, consistency: consistency_level) -> None:
def export_solution_as_proto(self, *args, **kwargs):

export_solution_as_proto(self: ortools.set_cover.python.set_cover.SetCoverInvariant) -> operations_research::SetCoverSolutionResponse

def import_solution_from_proto(self, arg0) -> None:

import_solution_from_proto(self: ortools.set_cover.python.set_cover.SetCoverInvariant, arg0: operations_research::SetCoverSolutionResponse) -> None

class TrivialSolutionGenerator(pybind11_builtins.pybind11_object):
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.TrivialSolutionGenerator, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.TrivialSolutionGenerator) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.TrivialSolutionGenerator, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.TrivialSolutionGenerator, arg0: list[bool]) -> bool

def name(self) -> str:
class RandomSolutionGenerator(pybind11_builtins.pybind11_object):
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.RandomSolutionGenerator, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.RandomSolutionGenerator) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.RandomSolutionGenerator, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.RandomSolutionGenerator, arg0: list[bool]) -> bool

class GreedySolutionGenerator(pybind11_builtins.pybind11_object):
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.GreedySolutionGenerator, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.GreedySolutionGenerator) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.GreedySolutionGenerator, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.GreedySolutionGenerator, arg0: list[bool]) -> bool

class ElementDegreeSolutionGenerator(pybind11_builtins.pybind11_object):
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.ElementDegreeSolutionGenerator, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.ElementDegreeSolutionGenerator) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.ElementDegreeSolutionGenerator, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.ElementDegreeSolutionGenerator, arg0: list[bool]) -> bool

class LazyElementDegreeSolutionGenerator(pybind11_builtins.pybind11_object):
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.LazyElementDegreeSolutionGenerator, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.LazyElementDegreeSolutionGenerator) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.LazyElementDegreeSolutionGenerator, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.LazyElementDegreeSolutionGenerator, arg0: list[bool]) -> bool

class SteepestSearch(pybind11_builtins.pybind11_object):
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.SteepestSearch, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.SteepestSearch) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.SteepestSearch, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.SteepestSearch, arg0: list[bool]) -> bool

class GuidedLocalSearch(pybind11_builtins.pybind11_object):
def initialize(self) -> None:
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.GuidedLocalSearch, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.GuidedLocalSearch) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.GuidedLocalSearch, arg0: absl::lts_20250814::Span, arg1: int) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.GuidedLocalSearch, arg0: list[bool]) -> bool

class TabuList(pybind11_builtins.pybind11_object):
TabuList(size: int)

__init__(self: ortools.set_cover.python.set_cover.TabuList, size: int) -> None

def size(self) -> int:
def init(self, size: int) -> None:

init(self: ortools.set_cover.python.set_cover.TabuList, size: int) -> None

def add(self, t: int) -> None:
def contains(self, t: int) -> bool:

contains(self: ortools.set_cover.python.set_cover.TabuList, t: int) -> bool

class GuidedTabuSearch(pybind11_builtins.pybind11_object):
def initialize(self) -> None:
def set_max_iterations(self, *args, **kwargs):

set_max_iterations(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, max_iterations: int) -> operations_research::SetCoverSolutionGenerator

def next_solution(*args, **kwds):

next_solution(args, *kwargs) Overloaded function.

  1. next_solution(self: ortools.set_cover.python.set_cover.GuidedTabuSearch) -> bool

  2. next_solution(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, arg0: absl::lts_20250814::Span) -> bool

  3. next_solution(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, arg0: list[bool]) -> bool

def get_lagrangian_factor(self, factor: float) -> None:

get_lagrangian_factor(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, factor: float) -> None

def set_lagrangian_factor(self) -> float:

set_lagrangian_factor(self: ortools.set_cover.python.set_cover.GuidedTabuSearch) -> float

def set_epsilon(self, r: float) -> None:

set_epsilon(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, r: float) -> None

def get_epsilon(self) -> float:
def set_penalty_factor(self, factor: float) -> None:

set_penalty_factor(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, factor: float) -> None

def get_penalty_factor(self) -> float:

get_penalty_factor(self: ortools.set_cover.python.set_cover.GuidedTabuSearch) -> float

def set_tabu_list_size(self, size: int) -> None:

set_tabu_list_size(self: ortools.set_cover.python.set_cover.GuidedTabuSearch, size: int) -> None

def get_tabu_list_size(self) -> int:

get_tabu_list_size(self: ortools.set_cover.python.set_cover.GuidedTabuSearch) -> int

def clear_random_subsets(unknown):

clear_random_subsets(args, *kwargs) Overloaded function.

  1. clear_random_subsets(arg0: int, arg1: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[int]

  2. clear_random_subsets(arg0: absl::lts_20250814::Span, arg1: int, arg2: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[int]

def clear_most_covered_elements(unknown):

clear_most_covered_elements(args, *kwargs) Overloaded function.

  1. clear_most_covered_elements(arg0: int, arg1: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[int]

  2. clear_most_covered_elements(arg0: absl::lts_20250814::Span, arg1: int, arg2: ortools.set_cover.python.set_cover.SetCoverInvariant) -> list[int]

def read_orlib_scp(arg0: str) -> SetCoverModel:
def read_orlib_rail(arg0: str) -> SetCoverModel:
def read_fimi_dat(arg0: str) -> SetCoverModel:
def read_set_cover_proto( arg0: str, arg1: bool) -> SetCoverModel:

read_set_cover_proto(arg0: str, arg1: bool) -> ortools.set_cover.python.set_cover.SetCoverModel

def write_orlib_scp( arg0: SetCoverModel, arg1: str) -> None:

write_orlib_scp(arg0: ortools.set_cover.python.set_cover.SetCoverModel, arg1: str) -> None

def write_orlib_rail( arg0: SetCoverModel, arg1: str) -> None:

write_orlib_rail(arg0: ortools.set_cover.python.set_cover.SetCoverModel, arg1: str) -> None

def write_set_cover_proto( arg0: SetCoverModel, arg1: str, arg2: bool) -> None:

write_set_cover_proto(arg0: ortools.set_cover.python.set_cover.SetCoverModel, arg1: str, arg2: bool) -> None

def write_set_cover_solution_text( arg0: SetCoverModel, arg1, int, util_intops, bool, std, arg2: str) -> None:

write_set_cover_solution_text(arg0: ortools.set_cover.python.set_cover.SetCoverModel, arg1: util_intops::StrongVector, bool, std::allocator >, arg2: str) -> None

def write_set_cover_solution_proto( arg0: SetCoverModel, arg1, int, util_intops, bool, std, arg2: str, arg3: bool) -> None:

write_set_cover_solution_proto(arg0: ortools.set_cover.python.set_cover.SetCoverModel, arg1: util_intops::StrongVector, bool, std::allocator >, arg2: str, arg3: bool) -> None

def read_set_cover_solution_text(*args, **kwargs):

read_set_cover_solution_text(arg0: str) -> util_intops::StrongVector, bool, std::allocator >

def read_set_cover_solution_proto(*args, **kwargs):

read_set_cover_solution_proto(arg0: str, arg1: bool) -> util_intops::StrongVector, bool, std::allocator >