14#ifndef OR_TOOLS_GLOP_ENTERING_VARIABLE_H_
15#define OR_TOOLS_GLOP_ENTERING_VARIABLE_H_
21#include "absl/random/bit_gen_ref.h"
23#include "ortools/glop/parameters.pb.h"
62 bool nothing_to_recompute,
const UpdateRow& update_row,
63 Fractional cost_variation, std::vector<ColIndex>* bound_flip_candidates,
64 ColIndex* entering_col);
71 bool nothing_to_recompute,
const UpdateRow& update_row,
72 Fractional cost_variation, ColIndex* entering_col);
91 absl::BitGenRef random_;
95 GlopParameters parameters_;
101 num_perfect_ties(
"num_perfect_ties", this) {}
110 std::vector<ColIndex> equivalent_entering_choices_;
114 struct ColWithRatio {
115 ColWithRatio() =
default;
117 : col(_col), ratio(reduced_cost / coeff_m), coeff_magnitude(coeff_m) {}
120 bool operator<(
const ColWithRatio& other)
const {
121 if (ratio == other.ratio) {
122 if (coeff_magnitude == other.coeff_magnitude) {
123 return col > other.col;
125 return coeff_magnitude < other.coeff_magnitude;
127 return ratio > other.ratio;
136 std::vector<ColWithRatio> breakpoints_;
139 int64_t num_operations_ = 0;
Statistic on the distribution of a sequence of integers.
Base class to print a nice summary of a group of statistics.
std::string StatString() const
void SetParameters(const GlopParameters ¶meters)
Sets the parameters.
double DeterministicTime() const
EnteringVariable & operator=(const EnteringVariable &)=delete
std::string StatString() const
Stats related functions.
ABSL_MUST_USE_RESULT Status DualChooseEnteringColumn(bool nothing_to_recompute, const UpdateRow &update_row, Fractional cost_variation, std::vector< ColIndex > *bound_flip_candidates, ColIndex *entering_col)
EnteringVariable(const EnteringVariable &)=delete
This type is neither copyable nor movable.
ABSL_MUST_USE_RESULT Status DualPhaseIChooseEnteringColumn(bool nothing_to_recompute, const UpdateRow &update_row, Fractional cost_variation, ColIndex *entering_col)
EnteringVariable(const VariablesInfo &variables_info, absl::BitGenRef random, ReducedCosts *reduced_costs)
Takes references to the linear program data we need.
static double DeterministicTimeForFpOperations(int64_t n)
In SWIG mode, we don't want anything besides these top-level includes.