Google OR-Tools
v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
gurobi_init_arguments.cc
Go to the documentation of this file.
1
// Copyright 2010-2024 Google LLC
2
// Licensed under the Apache License, Version 2.0 (the "License");
3
// you may not use this file except in compliance with the License.
4
// You may obtain a copy of the License at
5
//
6
// http://www.apache.org/licenses/LICENSE-2.0
7
//
8
// Unless required by applicable law or agreed to in writing, software
9
// distributed under the License is distributed on an "AS IS" BASIS,
10
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
// See the License for the specific language governing permissions and
12
// limitations under the License.
13
14
#include "
ortools/math_opt/solvers/gurobi_init_arguments.h
"
15
16
#include <optional>
17
#include <string>
18
19
#include "absl/status/statusor.h"
20
#include "
ortools/gurobi/isv_public/gurobi_isv.h
"
21
#include "ortools/math_opt/solvers/gurobi.pb.h"
22
#include "
ortools/math_opt/solvers/gurobi/g_gurobi.h
"
23
24
namespace
operations_research
{
25
namespace
math_opt {
26
27
absl::StatusOr<GRBenvUniquePtr>
NewPrimaryEnvironment
(
28
std::optional<GurobiInitializerProto::ISVKey> proto_isv_key) {
29
std::optional<GurobiIsvKey> isv_key;
30
if
(proto_isv_key.has_value()) {
31
GurobiIsvKey
key;
32
key.
name
= proto_isv_key->name();
33
key.
application_name
= proto_isv_key->application_name();
34
key.
expiration
= proto_isv_key->expiration();
35
key.
key
= proto_isv_key->key();
36
isv_key = key;
37
}
38
return
GurobiNewPrimaryEnv
(isv_key);
39
}
40
41
}
// namespace math_opt
42
}
// namespace operations_research
g_gurobi.h
gurobi_init_arguments.h
gurobi_isv.h
operations_research::math_opt::NewPrimaryEnvironment
absl::StatusOr< GRBenvUniquePtr > NewPrimaryEnvironment(std::optional< GurobiInitializerProto::ISVKey > proto_isv_key)
Definition
gurobi_init_arguments.cc:27
operations_research::math_opt::GurobiNewPrimaryEnv
absl::StatusOr< GRBenvUniquePtr > GurobiNewPrimaryEnv(const std::optional< GurobiIsvKey > &isv_key)
Definition
g_gurobi.cc:154
operations_research
In SWIG mode, we don't want anything besides these top-level includes.
Definition
binary_indexed_tree.h:21
operations_research::math_opt::GurobiIsvKey
Definition
gurobi_isv.h:28
operations_research::math_opt::GurobiIsvKey::application_name
std::string application_name
Definition
gurobi_isv.h:30
operations_research::math_opt::GurobiIsvKey::expiration
int32_t expiration
Zero means no expiration.
Definition
gurobi_isv.h:32
operations_research::math_opt::GurobiIsvKey::name
std::string name
Definition
gurobi_isv.h:29
operations_research::math_opt::GurobiIsvKey::key
std::string key
Definition
gurobi_isv.h:33
ortools
math_opt
solvers
gurobi_init_arguments.cc
Generated by
1.12.0