Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
infeasible_subsystem.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
14// Messages for representing subsets of a models constraints, and for computing
15// infeasible subsystems of a model. Cf. "Irreducible Inconsistent subsystems"
16// (IIS), which are useful for debugging/diagnosing model infeasibility.
17syntax = "proto3";
18
19package operations_research.math_opt;
20
21import "ortools/math_opt/result.proto";
22
23option java_package = "com.google.ortools.mathopt";
24option java_multiple_files = true;
25
26// Represents a subset of the constraints (including variable bounds and
27// integrality) of a `ModelProto`.
28message ModelSubsetProto {
29 message Bounds {
30 bool lower = 1;
31 bool upper = 2;
32 }
33
34 // Keys are variable IDs, and must be in [0, max(int64)). Values indicate
35 // which of the lower and upper variable bounds are included in the subsystem.
36 map<int64, Bounds> variable_bounds = 1;
37
38 // Variable IDs. Values must be in [0, max(int64)) and strictly increasing.
39 repeated int64 variable_integrality = 2;
40
41 // Keys are linear constraint IDs, and must be in [0, max(int64)). Values
42 // indicate which of the lower and upper bounds on the linear constraint are
43 // included in the subsystem.
44 map<int64, Bounds> linear_constraints = 3;
45
46 // Keys are quadratic constraint IDs, and must be in [0, max(int64)). Values
47 // indicate which of the lower and upper bounds on the quadratic constraint
48 // are included in the subsystem.
49 map<int64, Bounds> quadratic_constraints = 4;
50
51 // Second-order cone constraint IDs. Values must be in [0, max(int64)) and
52 // strictly increasing.
53 repeated int64 second_order_cone_constraints = 5;
54
55 // SOS1 constraint IDs. Values must be in [0, max(int64)) and strictly
56 // increasing.
57 repeated int64 sos1_constraints = 6;
58
59 // SOS2 constraint IDs. Values must be in [0, max(int64)) and strictly
60 // increasing.
61 repeated int64 sos2_constraints = 7;
62
63 // Indicator constraint IDs. Values must be in [0, max(int64)) and strictly
64 // increasing.
65 repeated int64 indicator_constraints = 8;
66}
67
68message ComputeInfeasibleSubsystemResultProto {
69 // The primal feasibility status of the model, as determined by the solver.
70 FeasibilityStatusProto feasibility = 1;
71
72 // An infeasible subsystem of the input model. Set if `feasibility` is
73 // INFEASIBLE and empty otherwise. The IDs correspond to those constraints
74 // included in the infeasible subsystem. Submessages with `Bounds` values
75 // indicate which side of a potentially ranged constraint are included in the
76 // subsystem: lower bound, upper bound, or both.
77 ModelSubsetProto infeasible_subsystem = 2;
78
79 // True if the solver has certified that the returned subsystem is minimal
80 // (the instance is feasible if any additional constraint is removed). Note
81 // that, due to problem transformations MathOpt applies or idiosyncrasies of
82 // the solvers contract, the returned infeasible subsystem may not actually be
83 // minimal.
84 bool is_minimal = 3;
85}