backport from main
This commit is contained in:
committed by
Mizux Seiha
parent
1dda1bd639
commit
ef8716241a
@@ -19,6 +19,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -274,7 +275,7 @@ absl::Status SetSolverSpecificParameters(absl::string_view parameters,
|
||||
absl::StatusOr<MPSolutionResponse> GurobiSolveProto(
|
||||
LazyMutableCopy<MPModelRequest> request, GRBenv* gurobi_env) {
|
||||
MPSolutionResponse response;
|
||||
const absl::optional<LazyMutableCopy<MPModelProto>> optional_model =
|
||||
const std::optional<LazyMutableCopy<MPModelProto>> optional_model =
|
||||
GetMPModelOrPopulateResponse(request, &response);
|
||||
if (!optional_model) return response;
|
||||
const MPModelProto& model = **optional_model;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -45,7 +46,7 @@ absl::Status SetSolverSpecificParameters(const std::string& parameters,
|
||||
absl::StatusOr<MPSolutionResponse> HighsSolveProto(
|
||||
LazyMutableCopy<MPModelRequest> request) {
|
||||
MPSolutionResponse response;
|
||||
const absl::optional<LazyMutableCopy<MPModelProto>> optional_model =
|
||||
const std::optional<LazyMutableCopy<MPModelProto>> optional_model =
|
||||
GetMPModelOrPopulateResponse(request, &response);
|
||||
if (!optional_model) return response;
|
||||
const MPModelProto& model = **optional_model;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
#include <numeric>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -692,7 +693,7 @@ std::string FindErrorInMPModelForScip(const MPModelProto& model, SCIP* scip) {
|
||||
absl::StatusOr<MPSolutionResponse> ScipSolveProto(
|
||||
LazyMutableCopy<MPModelRequest> request) {
|
||||
MPSolutionResponse response;
|
||||
const absl::optional<LazyMutableCopy<MPModelProto>> optional_model =
|
||||
const std::optional<LazyMutableCopy<MPModelProto>> optional_model =
|
||||
GetMPModelOrPopulateResponse(request, &response);
|
||||
if (!optional_model) return response;
|
||||
const MPModelProto& model = **optional_model;
|
||||
|
||||
Reference in New Issue
Block a user