Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
names_removal.h
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// Functions to remove names from models and updates.
15//
16// Input models can contain duplicated names which MathOpt solvers will
17// refuse. The functions in this header can be use to mitigate that.
18//
19// These functions can also be used to anonymize models before saving them.
20#ifndef OR_TOOLS_MATH_OPT_IO_NAMES_REMOVAL_H_
21#define OR_TOOLS_MATH_OPT_IO_NAMES_REMOVAL_H_
22
23#include "ortools/math_opt/model.pb.h"
24#include "ortools/math_opt/model_update.pb.h"
25
27
28// Removes the model, variables and constraints names of the provided model.
29void RemoveNames(ModelProto& model);
30
31// Removes the variables and constraints names of the provided update.
32void RemoveNames(ModelUpdateProto& update);
33
34} // namespace operations_research::math_opt
35
36#endif // OR_TOOLS_MATH_OPT_IO_NAMES_REMOVAL_H_
GRBmodel * model
An object oriented wrapper for quadratic constraints in ModelStorage.
Definition gurobi_isv.cc:28
void RemoveNames(ModelProto &model)
Removes the model, variables and constraints names of the provided model.