 |
OR-Tools
8.0
|
Go to the documentation of this file.
14 #ifndef OR_TOOLS_BOP_BOP_SOLUTION_H_
15 #define OR_TOOLS_BOP_BOP_SOLUTION_H_
33 BopSolution(
const sat::LinearBooleanProblem& problem,
const std::string&
name);
36 recompute_cost_ =
true;
37 recompute_is_feasible_ =
true;
43 const std::string&
name()
const {
return name_; }
50 if (recompute_cost_) {
51 cost_ = ComputeCost();
69 if (recompute_is_feasible_) {
70 is_feasible_ = ComputeIsFeasible();
77 return values_.
begin();
93 bool ComputeIsFeasible()
const;
94 int64 ComputeCost()
const;
96 const sat::LinearBooleanProblem* problem_;
103 mutable bool recompute_cost_;
104 mutable bool recompute_is_feasible_;
106 mutable bool is_feasible_;
114 #endif // OR_TOOLS_BOP_BOP_SOLUTION_H_
gtl::ITIVector< VariableIndex, bool >::const_iterator end() const
void SetValue(VariableIndex var, bool value)
void set_name(const std::string &name)
bool Value(VariableIndex var) const
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
bool operator<(const BopSolution &solution) const
double AddOffsetAndScaleObjectiveValue(const LinearBooleanProblem &problem, Coefficient v)
const std::string & name() const
double GetScaledCost() const
BopSolution(const sat::LinearBooleanProblem &problem, const std::string &name)
ParentType::const_iterator const_iterator
gtl::ITIVector< VariableIndex, bool >::const_iterator begin() const