14 #ifndef OR_TOOLS_GLOP_PRIMAL_EDGE_NORMS_H_
15 #define OR_TOOLS_GLOP_PRIMAL_EDGE_NORMS_H_
22 #include "ortools/glop/parameters.pb.h"
116 RowIndex leaving_row,
127 pricing_rule_ = rule;
137 std::string
StatString()
const {
return stats_.StatString(); }
149 direction_left_inverse_density(
"direction_left_inverse_density",
151 direction_left_inverse_accuracy(
"direction_left_inverse_accuracy",
153 edges_norm_accuracy(
"edges_norm_accuracy", this),
154 lower_bounded_norms(
"lower_bounded_norms", this) {}
162 void ComputeMatrixColumnNorms();
165 void ComputeEdgeSquaredNorms();
169 void ComputeDirectionLeftInverse(ColIndex entering_col,
170 const ScatteredColumn& direction);
173 void UpdateEdgeSquaredNorms(ColIndex entering_col, ColIndex leaving_col,
174 RowIndex leaving_row,
176 const UpdateRow& update_row);
179 void ResetDevexWeights();
182 void UpdateDevexWeights(ColIndex entering_col, ColIndex leaving_col,
183 RowIndex leaving_row,
const DenseColumn& direction,
184 const UpdateRow& update_row);
187 const CompactSparseMatrix& compact_matrix_;
188 const VariablesInfo& variables_info_;
189 const BasisFactorization& basis_factorization_;
192 GlopParameters parameters_;
193 GlopParameters::PricingRule pricing_rule_ = GlopParameters::DANTZIG;
197 bool must_refactorize_basis_;
198 bool recompute_edge_squared_norms_;
199 bool reset_devex_weights_;
214 int num_devex_updates_since_reset_;
220 ScatteredRow direction_left_inverse_;
223 int64_t num_operations_;
227 std::vector<bool*> watchers_;
const DenseRow & GetSquaredNorms()
void AddRecomputationWatcher(bool *watcher)
PrimalEdgeNorms(const CompactSparseMatrix &compact_matrix, const VariablesInfo &variables_info, const BasisFactorization &basis_factorization)
const DenseRow & GetMatrixColumnNorms()
const DenseRow & GetEdgeSquaredNorms()
bool TestEnteringEdgeNormPrecision(ColIndex entering_col, const ScatteredColumn &direction)
const DenseRow & GetDevexWeights()
void UpdateBeforeBasisPivot(ColIndex entering_col, ColIndex leaving_col, RowIndex leaving_row, const ScatteredColumn &direction, UpdateRow *update_row)
void SetPricingRule(GlopParameters::PricingRule rule)
void SetParameters(const GlopParameters ¶meters)
double DeterministicTime() const
bool NeedsBasisRefactorization() const
std::string StatString() const
StrictITIVector< ColIndex, Fractional > DenseRow
StrictITIVector< RowIndex, Fractional > DenseColumn
static double DeterministicTimeForFpOperations(int64_t n)
Collection of objects used to extend the Constraint Solver library.