Google OR-Tools v9.11
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-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
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
23message SetCoverProto {
24 message Subset {
25 // The cost for using the given subset.
26 optional double cost = 1;
27
28 // The list of elements in the subset.
29 repeated int32 element = 2 [packed = true];
30 }
31
32 // The list of subsets in the model.
33 repeated Subset subset = 1;
34
35 // A user-defined name for the model.
36 optional string name = 2;
37
38 // An automatically fingerprint for the model. TODO(user): Implement.
39 optional Int128 fingerprint = 3;
40}
41
42message SetCoverSolutionResponse {
43 // Result of the optimization.
44 enum Status {
45 // Undefined.
46 UNDEFINED = 0;
47 // The solver found the proven optimal solution.
48 OPTIMAL = 1;
49 // The solver had enough time to find some solution that satisfied all
50 // constraints, but it did not reach the optimal.
51 FEASIBLE = 2;
52 // The model does not have any solution.
53 INFEASIBLE = 3;
54 // The model is invalid.
55 INVALID = 4;
56 }
57 // For future use. TODO(user): Implement.
58 optional Status status = 1;
59
60 // The number of subsets that are selected in the solution. This is used
61 // to decompress their indices below.
62 optional int32 num_subsets = 2;
63
64 // The list of the subsets selected in the solution.
65 repeated int32 subset = 3 [packed = true];
66
67 // The cost of the solution, as computed by the algorithm.
68 optional double cost = 4;
69
70 // A lower bound of the solution, as computed by the algorithm.
71 optional double cost_lower_bound = 5;
72
73 // An automatically fingerprint for the solution. TODO(user): Implement.
74 optional Int128 fingerprint = 6;
75
76 // A reference to the model the solution applies to. TODO(user): Implement.
77 optional Int128 model_fingerprint = 7;
78}