18#include "absl/status/statusor.h"
19#include "ortools/math_opt/parameters.pb.h"
20#include "ortools/math_opt/solvers/gurobi.pb.h"
26 GurobiInitializerProto::ISVKey isv_key_proto;
27 isv_key_proto.set_name(
name);
30 isv_key_proto.set_key(
key);
35 const GurobiInitializerProto::ISVKey& key_proto) {
37 .name = key_proto.name(),
38 .application_name = key_proto.application_name(),
39 .expiration = key_proto.expiration(),
40 .key = key_proto.key(),
45 GurobiInitializerProto params_proto;
48 *params_proto.mutable_isv_key() =
isv_key->Proto();
55 const GurobiInitializerProto& args_proto) {
57 if (args_proto.has_isv_key()) {
64 SolverInitializerProto params_proto;
67 *params_proto.mutable_gurobi() =
gurobi->Proto();
73absl::StatusOr<StreamableSolverInitArguments>
75 const SolverInitializerProto& args_proto) {
77 if (args_proto.has_gurobi()) {
In SWIG mode, we don't want anything besides these top-level includes.
std::string application_name
static GurobiISVKey FromProto(const GurobiInitializerProto::ISVKey &key_proto)
GurobiInitializerProto::ISVKey Proto() const
Streamable Gurobi specific parameters for solver instantiation.
static StreamableGurobiInitArguments FromProto(const GurobiInitializerProto &args_proto)
Parses the proto corresponding to these parameters.
GurobiInitializerProto Proto() const
Returns the proto corresponding to these parameters.
std::optional< GurobiISVKey > isv_key
SolverInitializerProto Proto() const
Returns the proto corresponding to these parameters.
std::optional< StreamableGurobiInitArguments > gurobi
static absl::StatusOr< StreamableSolverInitArguments > FromProto(const SolverInitializerProto &args_proto)
Parses the proto corresponding to these parameters.