27 const absl::StatusOr<absl::Duration> solve_time =
29 if (!solve_time.ok()) {
30 return absl::InvalidArgumentError(
31 absl::StrCat(
"invalid solve_time, ", solve_time.status().message()));
33 if (solve_time.value() < absl::ZeroDuration()) {
34 return absl::InvalidArgumentError(
"solve_time must be non-negative");
36 if (solve_stats.simplex_iterations() < 0) {
37 return absl::InvalidArgumentError(
38 "simplex_iterations must be non-negative");
40 if (solve_stats.barrier_iterations() < 0) {
41 return absl::InvalidArgumentError(
42 "barrier_iterations must be non-negative");
44 if (solve_stats.node_count() < 0) {
45 return absl::InvalidArgumentError(
"node_count must be non-negative");
47 return absl::OkStatus();