Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::TrivialSolutionGenerator Class Reference

#include <set_cover_heuristics.h>

Public Member Functions

 TrivialSolutionGenerator (SetCoverInvariant *inv)
 
bool NextSolution ()
 TrivialSolutionGenerator.
 
bool NextSolution (absl::Span< const SubsetIndex > focus)
 

Detailed Description

An obvious idea is to take all the S_j's (or equivalently to set all the x_j's to 1). It's a bit silly but fast, and we can improve on it later using local search.

Definition at line 105 of file set_cover_heuristics.h.

Constructor & Destructor Documentation

◆ TrivialSolutionGenerator()

operations_research::TrivialSolutionGenerator::TrivialSolutionGenerator ( SetCoverInvariant * inv)
inlineexplicit

Definition at line 107 of file set_cover_heuristics.h.

Member Function Documentation

◆ NextSolution() [1/2]

bool operations_research::TrivialSolutionGenerator::NextSolution ( )

TrivialSolutionGenerator.

Returns true if a solution was found.

Todo
(user): Add time-outs and exit with a partial solution. This seems unlikely, though.

Definition at line 76 of file set_cover_heuristics.cc.

◆ NextSolution() [2/2]

bool operations_research::TrivialSolutionGenerator::NextSolution ( absl::Span< const SubsetIndex > focus)

Computes the next partial solution considering only the subsets whose indices are in focus.

Definition at line 80 of file set_cover_heuristics.cc.


The documentation for this class was generated from the following files: