14 #ifndef OR_TOOLS_GLOP_REDUCED_COSTS_H_
15 #define OR_TOOLS_GLOP_REDUCED_COSTS_H_
113 return recompute_reduced_costs_ || are_reduced_costs_recomputed_;
165 DCHECK(are_dual_infeasible_positions_maintained_);
166 return is_dual_infeasible_;
173 std::string
StatString()
const {
return stats_.StatString(); }
177 return dual_feasibility_tolerance_;
191 basic_objective_left_inverse_density(
192 "basic_objective_left_inverse_density", this),
193 reduced_costs_accuracy(
"reduced_costs_accuracy", this),
194 cost_shift(
"cost_shift", this) {}
202 void RecomputeReducedCostsAndPrimalEnteringCandidatesIfNeeded();
206 void ComputeBasicObjective();
207 void ComputeReducedCosts();
208 void ComputeBasicObjectiveLeftInverse();
215 void UpdateReducedCosts(ColIndex entering_col, ColIndex leaving_col,
217 UpdateRow* update_row);
221 void ResetDualInfeasibilityBitSet();
224 template <
typename ColumnsToUpdate>
225 void UpdateEnteringCandidates(
const ColumnsToUpdate& cols);
228 void UpdateBasicObjective(ColIndex entering_col, RowIndex leaving_row);
231 const CompactSparseMatrix& matrix_;
234 const VariablesInfo& variables_info_;
235 const BasisFactorization& basis_factorization_;
239 GlopParameters parameters_;
240 mutable Stats stats_;
243 bool must_refactorize_basis_;
244 bool recompute_basic_objective_left_inverse_;
245 bool recompute_basic_objective_;
246 bool recompute_reduced_costs_;
249 bool are_reduced_costs_precise_;
250 bool are_reduced_costs_recomputed_;
272 ScatteredRow basic_objective_left_inverse_;
285 bool are_dual_infeasible_positions_maintained_;
293 #endif // OR_TOOLS_GLOP_REDUCED_COSTS_H_