Google OR-Tools
v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
solve_mp_model.h
Go to the documentation of this file.
1
// Copyright 2010-2025 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
// Functions for solving optimization models defined by MPModelRequest.
15
//
16
// See linear_solver.proto for further documentation.
17
18
#ifndef ORTOOLS_LINEAR_SOLVER_SOLVE_MP_MODEL_H_
19
#define ORTOOLS_LINEAR_SOLVER_SOLVE_MP_MODEL_H_
20
21
#include <string>
22
23
#include "absl/base/nullability.h"
24
#include "
ortools/linear_solver/linear_solver.pb.h
"
25
#include "
ortools/util/lazy_mutable_copy.h
"
26
#include "
ortools/util/solve_interrupter.h
"
27
28
namespace
operations_research
{
29
45
MPSolutionResponse
SolveMPModel
(
46
LazyMutableCopy<MPModelRequest>
request,
47
const
SolveInterrupter
* absl_nullable interrupter =
nullptr
);
48
49
bool
SolverTypeSupportsInterruption
(
MPModelRequest::SolverType
solver);
50
51
// Gives some brief (a few lines, at most) human-readable information about
52
// the given request, suitable for debug logging.
53
std::string
MPModelRequestLoggingInfo
(
const
MPModelRequest
& request);
54
55
}
// namespace operations_research
56
57
#endif
// ORTOOLS_LINEAR_SOLVER_SOLVE_MP_MODEL_H_
operations_research::LazyMutableCopy
Definition
lazy_mutable_copy.h:44
operations_research::MPModelRequest
Definition
linear_solver.pb.h:5365
operations_research::MPModelRequest::SolverType
MPModelRequest_SolverType SolverType
Definition
linear_solver.pb.h:5503
operations_research::MPSolutionResponse
Definition
linear_solver.pb.h:3749
operations_research::SolveInterrupter
Definition
solve_interrupter.h:37
lazy_mutable_copy.h
linear_solver.pb.h
operations_research
OR-Tools root namespace.
Definition
binary_indexed_tree.h:21
operations_research::SolverTypeSupportsInterruption
bool SolverTypeSupportsInterruption(const MPModelRequest::SolverType solver)
Definition
solve_mp_model.cc:46
operations_research::SolveMPModel
MPSolutionResponse SolveMPModel(LazyMutableCopy< MPModelRequest > request, const SolveInterrupter *absl_nullable interrupter)
Definition
solve_mp_model.cc:30
operations_research::MPModelRequestLoggingInfo
std::string MPModelRequestLoggingInfo(const MPModelRequest &request)
Definition
solve_mp_model.cc:50
solve_interrupter.h
ortools
linear_solver
solve_mp_model.h
Generated by
1.15.0