50 max_fp_iterations_ = std::max(1, max_iter);
75 return integer_solution_objective_;
78 return integer_solution_is_feasible_;
95 bool NearestIntegerRounding();
106 bool LockBasedRounding();
110 bool ActiveLockBasedRounding();
122 bool PropagationRounding();
124 void FillIntegerSolutionStats();
127 void InitializeWorkingLP();
131 void L1DistanceMinimize();
135 void MaybePushToRepo();
140 double GetVariableValueAtCpScale(glop::ColIndex
var);
143 using LinearExpression = std::vector<std::pair<glop::ColIndex, IntegerValue>>;
147 glop::ColIndex GetOrCreateMirrorVariable(IntegerVariable positive_variable);
150 void UpdateBoundsOfLpVariables();
155 static const double kCpEpsilon;
159 struct LinearConstraintInternal {
164 LinearExpression integer_objective_;
165 IntegerValue objective_infinity_norm_ = IntegerValue(0);
166 double objective_normalization_factor_ = 0.0;
167 double mixing_factor_ = 1.0;
171 int model_vars_size_ = 0;
188 std::vector<IntegerVariable> integer_variables_;
189 absl::flat_hash_map<IntegerVariable, glop::ColIndex> mirror_lp_variable_;
192 std::vector<bool> var_is_binary_;
197 std::vector<int> var_up_locks_;
198 std::vector<int> var_down_locks_;
202 bool objective_is_defined_ =
false;
205 const SatParameters& sat_parameters_;
207 IntegerTrail* integer_trail_;
209 IntegerEncoder* integer_encoder_;
210 SharedIncompleteSolutionManager* incomplete_solutions_;
211 SatSolver* sat_solver_;
212 IntegerDomains* domains_;
213 const CpModelMapping* mapping_;
216 bool lp_solution_is_set_ =
false;
217 bool lp_solution_is_integer_ =
false;
218 double lp_objective_;
219 std::vector<double> lp_solution_;
220 std::vector<double> best_lp_solution_;
222 double lp_solution_fractionality_;
225 bool integer_solution_is_set_ =
false;
226 bool integer_solution_is_feasible_ =
false;
227 int64_t integer_solution_objective_;
228 std::vector<int64_t> integer_solution_;
229 std::vector<int64_t> best_integer_solution_;
230 int num_infeasible_constraints_;
232 int64_t integer_solution_infeasibility_;
236 int64_t total_num_simplex_iterations_ = 0;
239 int max_fp_iterations_ = 20;