Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
set_cover.proto
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
14syntax = "proto3";
15
16package operations_research;
17
18import "ortools/util/int128.proto";
19
20option java_package = "com.google.ortools.algorithms";
21option java_multiple_files = true;
22
23// TODO(user): use uint64 instead of int32 for indices, as the solver
24// supports it.
25message SetCoverProto {
26 message Subset {
27 // The cost for using the given subset.
28 optional double cost = 1;
29
30 // The list of elements in the subset.
31 repeated int32 element = 2 [packed = true];
32 }
33
34 // The list of subsets in the model.
35 repeated Subset subset = 1;
36
37 // A user-defined name for the model.
38 optional string name = 2;
39
40 // An automatically fingerprint for the model. TODO(user): Implement.
41 optional Int128 fingerprint = 3;
42}
43
44message SetCoverSolutionResponse {
45 // Result of the optimization.
46 enum Status {
47 // Undefined.
48 UNDEFINED = 0;
49
50 // The solver found the proven optimal solution.
51 OPTIMAL = 1;
52
53 // The solver had enough time to find some solution that satisfied all
54 // constraints, but it did not reach the optimal.
55 FEASIBLE = 2;
56
57 // The model does not have any solution.
58 INFEASIBLE = 3;
59
60 // The model is invalid.
61 INVALID = 4;
62 }
63
64 // For future use. TODO(user): Implement.
65 optional Status status = 1;
66
67 // The number of subsets that are selected in the solution. This is used
68 // to decompress their indices below.
69 optional int32 num_subsets = 2;
70
71 // The list of the subsets selected in the solution.
72 repeated int32 subset = 3 [packed = true];
73
74 // The cost of the solution, as computed by the algorithm.
75 optional double cost = 4;
76
77 // A lower bound of the solution, as computed by the algorithm.
78 optional double cost_lower_bound = 5;
79
80 // An automatically fingerprint for the solution. TODO(user): Implement.
81 optional Int128 fingerprint = 6;
82
83 // A reference to the model the solution applies to. TODO(user): Implement.
84 optional Int128 model_fingerprint = 7;
85}