49 static absl::StatusOr<std::unique_ptr<SolverInterface>>
New(
54 absl::StatusOr<SolveResultProto>
Solve(
61 absl::StatusOr<ComputeInfeasibleSubsystemResultProto>
75 static constexpr auto kSetBounds = glp_set_col_bnds;
76 static constexpr auto kGetLb = glp_get_col_lb;
77 static constexpr auto kGetUb = glp_get_col_ub;
78 static constexpr auto kGetType = glp_get_col_type;
79 static constexpr auto kDelElts = glp_del_cols;
82 static inline bool IsInteger(glp_prob* problem,
int j);
93 std::vector<int64_t> ids;
97 absl::flat_hash_map<int64_t, int> id_to_index;
104 std::vector<double> unrounded_lower_bounds;
109 std::vector<double> unrounded_upper_bounds;
115 struct LinearConstraints {
116 static constexpr auto kSetBounds = glp_set_row_bnds;
117 static constexpr auto kGetLb = glp_get_row_lb;
118 static constexpr auto kGetUb = glp_get_row_ub;
119 static constexpr auto kGetType = glp_get_row_type;
120 static constexpr auto kDelElts = glp_del_rows;
124 static bool IsInteger(glp_prob*,
int) {
return false; }
135 std::vector<int64_t> ids;
140 absl::flat_hash_map<int64_t, int> id_to_index;
149 void AddLinearConstraints(
154 void UpdateObjectiveCoefficients(
163 void UpdateLinearConstraintMatrix(
165 std::optional<int64_t> first_new_var_id,
166 std::optional<int64_t> first_new_cstr_id);
174 void AddPrimalSolution(
int (*get_prim_stat)(glp_prob*),
175 double (*obj_val)(glp_prob*),
176 double (*col_val)(glp_prob*,
int),
188 void AddDualSolution(
int (*get_dual_stat)(glp_prob*),
189 double (*obj_val)(glp_prob*),
190 double (*row_dual)(glp_prob*,
int),
191 double (*col_dual)(glp_prob*,
int),
197 absl::Status AddPrimalOrDualRay(
202 absl::Status CheckCurrentThread();
210 std::optional<SolveResultProto> EmptyIntegerBoundsResult();
213 const std::thread::id thread_id_;
215 glp_prob*
const problem_;
217 Variables variables_;
218 LinearConstraints linear_constraints_;
absl::StatusOr< SolveResultProto > Solve(const SolveParametersProto ¶meters, const ModelSolveParametersProto &model_parameters, MessageCallback message_cb, const CallbackRegistrationProto &callback_registration, Callback cb, const SolveInterrupter *absl_nullable interrupter) override