Skip to main content

ommx/
ommx.v2.rs

1// This file is @generated by prost-build.
2/// Human-authored modeling notation for one table or collection row.
3///
4/// This label preserves the mathematical model notation before the model was
5/// lowered into OMMX. For example, a variable written as `x\[i, j\]` can be
6/// represented as `name = "x"` and `subscripts = \[i, j\]`.
7#[non_exhaustive]
8#[allow(clippy::derive_partial_eq_without_eq)]
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct ModelingLabel {
11    #[prost(string, optional, tag = "1")]
12    pub name: ::core::option::Option<::prost::alloc::string::String>,
13    #[prost(int64, repeated, tag = "2")]
14    pub subscripts: ::prost::alloc::vec::Vec<i64>,
15    #[prost(btree_map = "string, string", tag = "3")]
16    pub parameters: ::prost::alloc::collections::BTreeMap<
17        ::prost::alloc::string::String,
18        ::prost::alloc::string::String,
19    >,
20    #[prost(string, optional, tag = "4")]
21    pub description: ::core::option::Option<::prost::alloc::string::String>,
22}
23/// Wire-level semantics required to interpret a top-level root exactly.
24///
25/// This is OMMX's feature-based forward-compatibility gate. Protobuf itself
26/// preserves wire compatibility by letting older readers ignore unknown fields,
27/// but that is not sufficient for mathematical optimization data: ignoring an
28/// unknown constraint family or other semantic field can turn the payload into a
29/// different problem. Top-level roots therefore declare the semantic features
30/// required by the concrete payload.
31///
32/// Readers must reject payloads containing unknown or unspecified
33/// `required_features`. Writers must include every feature whose omission would
34/// let an older reader silently interpret a weaker or otherwise different model.
35/// Readers use only `required_features` for this compatibility decision and do
36/// not compare the declarations with decoded payload fields. Declaring every
37/// feature used by a payload is the writer's responsibility.
38/// Writers must not emit `FEATURE_UNSPECIFIED` as a required feature.
39#[non_exhaustive]
40#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
41#[repr(i32)]
42pub enum Feature {
43    /// Placeholder for the protobuf default value. This is not a semantic feature.
44    Unspecified = 0,
45    /// The payload contains first-class indicator constraints.
46    ConstraintIndicator = 1,
47    /// The payload contains first-class one-hot constraints.
48    ConstraintOneHot = 2,
49    /// The payload contains first-class SOS1 constraints.
50    ConstraintSos1 = 3,
51    /// The Instance or ParametricInstance payload explicitly carries
52    /// output-objective semantics separately from the active solver formulation.
53    OutputObjective = 4,
54}
55impl Feature {
56    /// String value of the enum field names used in the ProtoBuf definition.
57    ///
58    /// The values are not transformed in any way and thus are considered stable
59    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
60    pub fn as_str_name(&self) -> &'static str {
61        match self {
62            Feature::Unspecified => "FEATURE_UNSPECIFIED",
63            Feature::ConstraintIndicator => "FEATURE_CONSTRAINT_INDICATOR",
64            Feature::ConstraintOneHot => "FEATURE_CONSTRAINT_ONE_HOT",
65            Feature::ConstraintSos1 => "FEATURE_CONSTRAINT_SOS1",
66            Feature::OutputObjective => "FEATURE_OUTPUT_OBJECTIVE",
67        }
68    }
69    /// Creates an enum from field names used in the ProtoBuf definition.
70    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
71        match value {
72            "FEATURE_UNSPECIFIED" => Some(Self::Unspecified),
73            "FEATURE_CONSTRAINT_INDICATOR" => Some(Self::ConstraintIndicator),
74            "FEATURE_CONSTRAINT_ONE_HOT" => Some(Self::ConstraintOneHot),
75            "FEATURE_CONSTRAINT_SOS1" => Some(Self::ConstraintSos1),
76            "FEATURE_OUTPUT_OBJECTIVE" => Some(Self::OutputObjective),
77            _ => None,
78        }
79    }
80}
81/// One transformation step in a constraint's lineage.
82///
83/// Provenance records special-constraint origins when a special constraint is
84/// converted or propagated into another constraint family.
85#[non_exhaustive]
86#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct Provenance {
89    #[prost(oneof = "provenance::Source", tags = "1, 2, 3")]
90    pub source: ::core::option::Option<provenance::Source>,
91}
92/// Nested message and enum types in `Provenance`.
93pub mod provenance {
94    #[non_exhaustive]
95    #[allow(clippy::derive_partial_eq_without_eq)]
96    #[derive(Clone, PartialEq, ::prost::Oneof)]
97    pub enum Source {
98        #[prost(uint64, tag = "1")]
99        IndicatorConstraintId(u64),
100        #[prost(uint64, tag = "2")]
101        OneHotConstraintId(u64),
102        #[prost(uint64, tag = "3")]
103        Sos1ConstraintId(u64),
104    }
105}
106/// Constraint sidecar owned by one constraint collection.
107#[non_exhaustive]
108#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct ConstraintContext {
111    #[prost(message, optional, tag = "1")]
112    pub label: ::core::option::Option<ModelingLabel>,
113    #[prost(message, repeated, tag = "2")]
114    pub provenance: ::prost::alloc::vec::Vec<Provenance>,
115}
116/// Why a constraint row was removed or relaxed by preprocessing.
117#[non_exhaustive]
118#[allow(clippy::derive_partial_eq_without_eq)]
119#[derive(Clone, PartialEq, ::prost::Message)]
120pub struct RemovedReason {
121    #[prost(string, tag = "1")]
122    pub reason: ::prost::alloc::string::String,
123    #[prost(btree_map = "string, string", tag = "2")]
124    pub parameters: ::prost::alloc::collections::BTreeMap<
125        ::prost::alloc::string::String,
126        ::prost::alloc::string::String,
127    >,
128}
129/// Regular scalar constraint row.
130///
131/// The enclosing collection owns ConstraintID, modeling context, active/removed
132/// placement, and removed reasons.
133#[non_exhaustive]
134#[allow(clippy::derive_partial_eq_without_eq)]
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct RegularConstraint {
137    #[prost(enumeration = "super::v1::Equality", tag = "1")]
138    pub equality: i32,
139    #[prost(message, optional, tag = "2")]
140    pub function: ::core::option::Option<super::v1::Function>,
141}
142/// Indicator constraint row.
143#[non_exhaustive]
144#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct IndicatorConstraint {
147    #[prost(uint64, tag = "1")]
148    pub indicator_variable: u64,
149    #[prost(enumeration = "super::v1::Equality", tag = "2")]
150    pub equality: i32,
151    #[prost(message, optional, tag = "3")]
152    pub function: ::core::option::Option<super::v1::Function>,
153}
154/// One-hot constraint row.
155#[non_exhaustive]
156#[allow(clippy::derive_partial_eq_without_eq)]
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct OneHotConstraint {
159    #[prost(uint64, repeated, tag = "1")]
160    pub variables: ::prost::alloc::vec::Vec<u64>,
161}
162/// SOS1 constraint row.
163#[non_exhaustive]
164#[allow(clippy::derive_partial_eq_without_eq)]
165#[derive(Clone, PartialEq, ::prost::Message)]
166pub struct Sos1Constraint {
167    #[prost(uint64, repeated, tag = "1")]
168    pub variables: ::prost::alloc::vec::Vec<u64>,
169}
170/// Regular constraint collection at the definition stage.
171#[non_exhaustive]
172#[allow(clippy::derive_partial_eq_without_eq)]
173#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct RegularConstraintCollection {
175    #[prost(btree_map = "uint64, message", tag = "1")]
176    pub active: ::prost::alloc::collections::BTreeMap<u64, RegularConstraint>,
177    #[prost(btree_map = "uint64, message", tag = "2")]
178    pub removed: ::prost::alloc::collections::BTreeMap<u64, RegularConstraint>,
179    #[prost(btree_map = "uint64, message", tag = "3")]
180    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
181    #[prost(btree_map = "uint64, message", tag = "4")]
182    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
183}
184/// Indicator constraint collection at the definition stage.
185#[non_exhaustive]
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct IndicatorConstraintCollection {
189    #[prost(btree_map = "uint64, message", tag = "1")]
190    pub active: ::prost::alloc::collections::BTreeMap<u64, IndicatorConstraint>,
191    #[prost(btree_map = "uint64, message", tag = "2")]
192    pub removed: ::prost::alloc::collections::BTreeMap<u64, IndicatorConstraint>,
193    #[prost(btree_map = "uint64, message", tag = "3")]
194    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
195    #[prost(btree_map = "uint64, message", tag = "4")]
196    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
197}
198/// One-hot constraint collection at the definition stage.
199#[non_exhaustive]
200#[allow(clippy::derive_partial_eq_without_eq)]
201#[derive(Clone, PartialEq, ::prost::Message)]
202pub struct OneHotConstraintCollection {
203    #[prost(btree_map = "uint64, message", tag = "1")]
204    pub active: ::prost::alloc::collections::BTreeMap<u64, OneHotConstraint>,
205    #[prost(btree_map = "uint64, message", tag = "2")]
206    pub removed: ::prost::alloc::collections::BTreeMap<u64, OneHotConstraint>,
207    #[prost(btree_map = "uint64, message", tag = "3")]
208    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
209    #[prost(btree_map = "uint64, message", tag = "4")]
210    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
211}
212/// SOS1 constraint collection at the definition stage.
213#[non_exhaustive]
214#[allow(clippy::derive_partial_eq_without_eq)]
215#[derive(Clone, PartialEq, ::prost::Message)]
216pub struct Sos1ConstraintCollection {
217    #[prost(btree_map = "uint64, message", tag = "1")]
218    pub active: ::prost::alloc::collections::BTreeMap<u64, Sos1Constraint>,
219    #[prost(btree_map = "uint64, message", tag = "2")]
220    pub removed: ::prost::alloc::collections::BTreeMap<u64, Sos1Constraint>,
221    #[prost(btree_map = "uint64, message", tag = "3")]
222    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
223    #[prost(btree_map = "uint64, message", tag = "4")]
224    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
225}
226/// Evaluated regular constraint row.
227#[non_exhaustive]
228#[allow(clippy::derive_partial_eq_without_eq)]
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct EvaluatedRegularConstraint {
231    #[prost(enumeration = "super::v1::Equality", tag = "1")]
232    pub equality: i32,
233    #[prost(double, tag = "2")]
234    pub evaluated_value: f64,
235    #[prost(bool, tag = "3")]
236    pub feasible: bool,
237    #[prost(uint64, repeated, tag = "4")]
238    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
239    #[prost(double, optional, tag = "5")]
240    pub dual_variable: ::core::option::Option<f64>,
241}
242/// Evaluated indicator constraint row.
243#[non_exhaustive]
244#[allow(clippy::derive_partial_eq_without_eq)]
245#[derive(Clone, PartialEq, ::prost::Message)]
246pub struct EvaluatedIndicatorConstraint {
247    #[prost(uint64, tag = "1")]
248    pub indicator_variable: u64,
249    #[prost(enumeration = "super::v1::Equality", tag = "2")]
250    pub equality: i32,
251    #[prost(double, tag = "3")]
252    pub evaluated_value: f64,
253    #[prost(bool, tag = "4")]
254    pub feasible: bool,
255    #[prost(bool, tag = "5")]
256    pub indicator_active: bool,
257    #[prost(uint64, repeated, tag = "6")]
258    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
259}
260/// Evaluated one-hot constraint row.
261#[non_exhaustive]
262#[allow(clippy::derive_partial_eq_without_eq)]
263#[derive(Clone, PartialEq, ::prost::Message)]
264pub struct EvaluatedOneHotConstraint {
265    #[prost(uint64, repeated, tag = "1")]
266    pub variables: ::prost::alloc::vec::Vec<u64>,
267    #[prost(bool, tag = "2")]
268    pub feasible: bool,
269    #[prost(uint64, optional, tag = "3")]
270    pub active_variable: ::core::option::Option<u64>,
271    #[prost(uint64, repeated, tag = "4")]
272    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
273}
274/// Evaluated SOS1 constraint row.
275#[non_exhaustive]
276#[allow(clippy::derive_partial_eq_without_eq)]
277#[derive(Clone, PartialEq, ::prost::Message)]
278pub struct EvaluatedSos1Constraint {
279    #[prost(uint64, repeated, tag = "1")]
280    pub variables: ::prost::alloc::vec::Vec<u64>,
281    #[prost(bool, tag = "2")]
282    pub feasible: bool,
283    #[prost(uint64, optional, tag = "3")]
284    pub active_variable: ::core::option::Option<u64>,
285    #[prost(uint64, repeated, tag = "4")]
286    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
287}
288/// Evaluated regular constraint collection.
289#[non_exhaustive]
290#[allow(clippy::derive_partial_eq_without_eq)]
291#[derive(Clone, PartialEq, ::prost::Message)]
292pub struct EvaluatedRegularConstraintCollection {
293    #[prost(btree_map = "uint64, message", tag = "1")]
294    pub entries: ::prost::alloc::collections::BTreeMap<u64, EvaluatedRegularConstraint>,
295    #[prost(btree_map = "uint64, message", tag = "2")]
296    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
297    #[prost(btree_map = "uint64, message", tag = "3")]
298    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
299}
300/// Evaluated indicator constraint collection.
301#[non_exhaustive]
302#[allow(clippy::derive_partial_eq_without_eq)]
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct EvaluatedIndicatorConstraintCollection {
305    #[prost(btree_map = "uint64, message", tag = "1")]
306    pub entries: ::prost::alloc::collections::BTreeMap<u64, EvaluatedIndicatorConstraint>,
307    #[prost(btree_map = "uint64, message", tag = "2")]
308    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
309    #[prost(btree_map = "uint64, message", tag = "3")]
310    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
311}
312/// Evaluated one-hot constraint collection.
313#[non_exhaustive]
314#[allow(clippy::derive_partial_eq_without_eq)]
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct EvaluatedOneHotConstraintCollection {
317    #[prost(btree_map = "uint64, message", tag = "1")]
318    pub entries: ::prost::alloc::collections::BTreeMap<u64, EvaluatedOneHotConstraint>,
319    #[prost(btree_map = "uint64, message", tag = "2")]
320    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
321    #[prost(btree_map = "uint64, message", tag = "3")]
322    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
323}
324/// Evaluated SOS1 constraint collection.
325#[non_exhaustive]
326#[allow(clippy::derive_partial_eq_without_eq)]
327#[derive(Clone, PartialEq, ::prost::Message)]
328pub struct EvaluatedSos1ConstraintCollection {
329    #[prost(btree_map = "uint64, message", tag = "1")]
330    pub entries: ::prost::alloc::collections::BTreeMap<u64, EvaluatedSos1Constraint>,
331    #[prost(btree_map = "uint64, message", tag = "2")]
332    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
333    #[prost(btree_map = "uint64, message", tag = "3")]
334    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
335}
336/// Map value used when a present sample can have no active variable.
337#[non_exhaustive]
338#[allow(clippy::derive_partial_eq_without_eq)]
339#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct SampledActiveVariable {
341    #[prost(uint64, optional, tag = "1")]
342    pub variable_id: ::core::option::Option<u64>,
343}
344/// Sampled regular constraint row.
345#[non_exhaustive]
346#[allow(clippy::derive_partial_eq_without_eq)]
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct SampledRegularConstraint {
349    #[prost(enumeration = "super::v1::Equality", tag = "1")]
350    pub equality: i32,
351    #[prost(message, optional, tag = "2")]
352    pub evaluated_values: ::core::option::Option<super::v1::SampledValues>,
353    #[prost(btree_map = "uint64, bool", tag = "3")]
354    pub feasible: ::prost::alloc::collections::BTreeMap<u64, bool>,
355    #[prost(uint64, repeated, tag = "4")]
356    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
357    #[prost(message, optional, tag = "5")]
358    pub dual_variables: ::core::option::Option<super::v1::SampledValues>,
359}
360/// Sampled indicator constraint row.
361#[non_exhaustive]
362#[allow(clippy::derive_partial_eq_without_eq)]
363#[derive(Clone, PartialEq, ::prost::Message)]
364pub struct SampledIndicatorConstraint {
365    #[prost(uint64, tag = "1")]
366    pub indicator_variable: u64,
367    #[prost(enumeration = "super::v1::Equality", tag = "2")]
368    pub equality: i32,
369    #[prost(message, optional, tag = "3")]
370    pub evaluated_values: ::core::option::Option<super::v1::SampledValues>,
371    #[prost(btree_map = "uint64, bool", tag = "4")]
372    pub feasible: ::prost::alloc::collections::BTreeMap<u64, bool>,
373    #[prost(btree_map = "uint64, bool", tag = "5")]
374    pub indicator_active: ::prost::alloc::collections::BTreeMap<u64, bool>,
375    #[prost(uint64, repeated, tag = "6")]
376    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
377}
378/// Sampled one-hot constraint row.
379#[non_exhaustive]
380#[allow(clippy::derive_partial_eq_without_eq)]
381#[derive(Clone, PartialEq, ::prost::Message)]
382pub struct SampledOneHotConstraint {
383    #[prost(uint64, repeated, tag = "1")]
384    pub variables: ::prost::alloc::vec::Vec<u64>,
385    #[prost(btree_map = "uint64, bool", tag = "2")]
386    pub feasible: ::prost::alloc::collections::BTreeMap<u64, bool>,
387    #[prost(btree_map = "uint64, message", tag = "3")]
388    pub active_variable: ::prost::alloc::collections::BTreeMap<u64, SampledActiveVariable>,
389    #[prost(uint64, repeated, tag = "4")]
390    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
391}
392/// Sampled SOS1 constraint row.
393#[non_exhaustive]
394#[allow(clippy::derive_partial_eq_without_eq)]
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct SampledSos1Constraint {
397    #[prost(uint64, repeated, tag = "1")]
398    pub variables: ::prost::alloc::vec::Vec<u64>,
399    #[prost(btree_map = "uint64, bool", tag = "2")]
400    pub feasible: ::prost::alloc::collections::BTreeMap<u64, bool>,
401    #[prost(btree_map = "uint64, message", tag = "3")]
402    pub active_variable: ::prost::alloc::collections::BTreeMap<u64, SampledActiveVariable>,
403    #[prost(uint64, repeated, tag = "4")]
404    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
405}
406/// Sampled regular constraint collection.
407#[non_exhaustive]
408#[allow(clippy::derive_partial_eq_without_eq)]
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct SampledRegularConstraintCollection {
411    #[prost(btree_map = "uint64, message", tag = "1")]
412    pub entries: ::prost::alloc::collections::BTreeMap<u64, SampledRegularConstraint>,
413    #[prost(btree_map = "uint64, message", tag = "2")]
414    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
415    #[prost(btree_map = "uint64, message", tag = "3")]
416    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
417}
418/// Sampled indicator constraint collection.
419#[non_exhaustive]
420#[allow(clippy::derive_partial_eq_without_eq)]
421#[derive(Clone, PartialEq, ::prost::Message)]
422pub struct SampledIndicatorConstraintCollection {
423    #[prost(btree_map = "uint64, message", tag = "1")]
424    pub entries: ::prost::alloc::collections::BTreeMap<u64, SampledIndicatorConstraint>,
425    #[prost(btree_map = "uint64, message", tag = "2")]
426    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
427    #[prost(btree_map = "uint64, message", tag = "3")]
428    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
429}
430/// Sampled one-hot constraint collection.
431#[non_exhaustive]
432#[allow(clippy::derive_partial_eq_without_eq)]
433#[derive(Clone, PartialEq, ::prost::Message)]
434pub struct SampledOneHotConstraintCollection {
435    #[prost(btree_map = "uint64, message", tag = "1")]
436    pub entries: ::prost::alloc::collections::BTreeMap<u64, SampledOneHotConstraint>,
437    #[prost(btree_map = "uint64, message", tag = "2")]
438    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
439    #[prost(btree_map = "uint64, message", tag = "3")]
440    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
441}
442/// Sampled SOS1 constraint collection.
443#[non_exhaustive]
444#[allow(clippy::derive_partial_eq_without_eq)]
445#[derive(Clone, PartialEq, ::prost::Message)]
446pub struct SampledSos1ConstraintCollection {
447    #[prost(btree_map = "uint64, message", tag = "1")]
448    pub entries: ::prost::alloc::collections::BTreeMap<u64, SampledSos1Constraint>,
449    #[prost(btree_map = "uint64, message", tag = "2")]
450    pub removed_reasons: ::prost::alloc::collections::BTreeMap<u64, RemovedReason>,
451    #[prost(btree_map = "uint64, message", tag = "3")]
452    pub contexts: ::prost::alloc::collections::BTreeMap<u64, ConstraintContext>,
453}
454/// Definition-stage decision-variable row.
455///
456/// The enclosing DecisionVariableTable owns VariableID and modeling labels.
457#[non_exhaustive]
458#[allow(clippy::derive_partial_eq_without_eq)]
459#[derive(Clone, PartialEq, ::prost::Message)]
460pub struct DecisionVariable {
461    #[prost(enumeration = "super::v1::decision_variable::Kind", tag = "1")]
462    pub kind: i32,
463    #[prost(message, optional, tag = "2")]
464    pub bound: ::core::option::Option<super::v1::Bound>,
465}
466/// Evaluated-stage decision-variable row.
467#[non_exhaustive]
468#[allow(clippy::derive_partial_eq_without_eq)]
469#[derive(Clone, PartialEq, ::prost::Message)]
470pub struct EvaluatedDecisionVariable {
471    #[prost(enumeration = "super::v1::decision_variable::Kind", tag = "1")]
472    pub kind: i32,
473    #[prost(message, optional, tag = "2")]
474    pub bound: ::core::option::Option<super::v1::Bound>,
475    #[prost(double, tag = "3")]
476    pub value: f64,
477}
478/// Sampled-stage decision-variable row.
479#[non_exhaustive]
480#[allow(clippy::derive_partial_eq_without_eq)]
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct SampledDecisionVariable {
483    #[prost(enumeration = "super::v1::decision_variable::Kind", tag = "1")]
484    pub kind: i32,
485    #[prost(message, optional, tag = "2")]
486    pub bound: ::core::option::Option<super::v1::Bound>,
487    #[prost(message, optional, tag = "3")]
488    pub samples: ::core::option::Option<super::v1::SampledValues>,
489}
490/// Definition-stage decision-variable table.
491///
492/// Map keys own VariableID. `labels` and `fixed_values` must only reference
493/// IDs present in `entries`.
494#[non_exhaustive]
495#[allow(clippy::derive_partial_eq_without_eq)]
496#[derive(Clone, PartialEq, ::prost::Message)]
497pub struct DecisionVariableTable {
498    #[prost(btree_map = "uint64, message", tag = "1")]
499    pub entries: ::prost::alloc::collections::BTreeMap<u64, DecisionVariable>,
500    #[prost(btree_map = "uint64, message", tag = "2")]
501    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
502    #[prost(btree_map = "uint64, double", tag = "3")]
503    pub fixed_values: ::prost::alloc::collections::BTreeMap<u64, f64>,
504}
505/// Evaluated-stage decision-variable table.
506#[non_exhaustive]
507#[allow(clippy::derive_partial_eq_without_eq)]
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct EvaluatedDecisionVariableTable {
510    #[prost(btree_map = "uint64, message", tag = "1")]
511    pub entries: ::prost::alloc::collections::BTreeMap<u64, EvaluatedDecisionVariable>,
512    #[prost(btree_map = "uint64, message", tag = "2")]
513    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
514}
515/// Sampled-stage decision-variable table.
516#[non_exhaustive]
517#[allow(clippy::derive_partial_eq_without_eq)]
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct SampledDecisionVariableTable {
520    #[prost(btree_map = "uint64, message", tag = "1")]
521    pub entries: ::prost::alloc::collections::BTreeMap<u64, SampledDecisionVariable>,
522    #[prost(btree_map = "uint64, message", tag = "2")]
523    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
524}
525/// Named function row used by v2 top-level table owners.
526///
527/// The enclosing named-function table owns the NamedFunctionID and modeling
528/// label sidecars. This row stores only the intrinsic expression payload.
529#[non_exhaustive]
530#[allow(clippy::derive_partial_eq_without_eq)]
531#[derive(Clone, PartialEq, ::prost::Message)]
532pub struct NamedFunction {
533    #[prost(message, optional, tag = "1")]
534    pub function: ::core::option::Option<super::v1::Function>,
535}
536/// Evaluated named-function row used by v2 top-level table owners.
537#[non_exhaustive]
538#[allow(clippy::derive_partial_eq_without_eq)]
539#[derive(Clone, PartialEq, ::prost::Message)]
540pub struct EvaluatedNamedFunction {
541    #[prost(double, tag = "1")]
542    pub evaluated_value: f64,
543    #[prost(uint64, repeated, tag = "2")]
544    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
545}
546/// Sampled named-function row used by v2 top-level table owners.
547#[non_exhaustive]
548#[allow(clippy::derive_partial_eq_without_eq)]
549#[derive(Clone, PartialEq, ::prost::Message)]
550pub struct SampledNamedFunction {
551    #[prost(message, optional, tag = "1")]
552    pub evaluated_values: ::core::option::Option<super::v1::SampledValues>,
553    #[prost(uint64, repeated, tag = "2")]
554    pub used_decision_variable_ids: ::prost::alloc::vec::Vec<u64>,
555}
556/// Definition-stage named-function table.
557///
558/// Map keys own NamedFunctionID. `labels` must only reference IDs present in
559/// `entries`.
560#[non_exhaustive]
561#[allow(clippy::derive_partial_eq_without_eq)]
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct NamedFunctionTable {
564    #[prost(btree_map = "uint64, message", tag = "1")]
565    pub entries: ::prost::alloc::collections::BTreeMap<u64, NamedFunction>,
566    #[prost(btree_map = "uint64, message", tag = "2")]
567    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
568}
569/// Evaluated-stage named-function table.
570#[non_exhaustive]
571#[allow(clippy::derive_partial_eq_without_eq)]
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct EvaluatedNamedFunctionTable {
574    #[prost(btree_map = "uint64, message", tag = "1")]
575    pub entries: ::prost::alloc::collections::BTreeMap<u64, EvaluatedNamedFunction>,
576    #[prost(btree_map = "uint64, message", tag = "2")]
577    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
578}
579/// Sampled-stage named-function table.
580#[non_exhaustive]
581#[allow(clippy::derive_partial_eq_without_eq)]
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct SampledNamedFunctionTable {
584    #[prost(btree_map = "uint64, message", tag = "1")]
585    pub entries: ::prost::alloc::collections::BTreeMap<u64, SampledNamedFunction>,
586    #[prost(btree_map = "uint64, message", tag = "2")]
587    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
588}
589/// Serialized output-objective semantics retained separately from the root's
590/// active objective.
591///
592/// `sense`, `function`, and `preserves_optimality` form one atomic value. A
593/// validated payload carries all three. When a root omits `output_objective`,
594/// its own `sense` and `objective` are also its output semantics and active
595/// optimality implicitly transports. Presence is explicit and must be retained
596/// even when later transformations make the output sense/function pair equal
597/// to the active pair.
598#[non_exhaustive]
599#[allow(clippy::derive_partial_eq_without_eq)]
600#[derive(Clone, PartialEq, ::prost::Message)]
601pub struct OutputObjective {
602    #[prost(enumeration = "super::v1::instance::Sense", tag = "1")]
603    pub sense: i32,
604    #[prost(message, optional, tag = "2")]
605    pub function: ::core::option::Option<super::v1::Function>,
606    /// Whether optimality for the active formulation also proves optimality for
607    /// this output objective.
608    ///
609    /// This compares objective orderings over candidate states of the active
610    /// formulation. It does not assert feasibility or optimality with respect to
611    /// removed constraints.
612    ///
613    /// `false` is conservative: it means that such a proof is not available,
614    /// not that the reconstructed state is known to be suboptimal.
615    #[prost(bool, tag = "3")]
616    pub preserves_optimality: bool,
617}
618/// Validated optimization problem serialization root.
619#[non_exhaustive]
620#[allow(clippy::derive_partial_eq_without_eq)]
621#[derive(Clone, PartialEq, ::prost::Message)]
622pub struct Instance {
623    #[prost(enumeration = "Feature", repeated, tag = "1")]
624    pub required_features: ::prost::alloc::vec::Vec<i32>,
625    #[prost(message, optional, tag = "2")]
626    pub description: ::core::option::Option<super::v1::instance::Description>,
627    #[prost(message, optional, tag = "3")]
628    pub decision_variables: ::core::option::Option<DecisionVariableTable>,
629    #[prost(message, optional, tag = "4")]
630    pub objective: ::core::option::Option<super::v1::Function>,
631    #[prost(message, optional, tag = "5")]
632    pub regular_constraints: ::core::option::Option<RegularConstraintCollection>,
633    #[prost(enumeration = "super::v1::instance::Sense", tag = "6")]
634    pub sense: i32,
635    #[prost(message, optional, tag = "7")]
636    pub parameters: ::core::option::Option<super::v1::Parameters>,
637    #[prost(message, optional, tag = "8")]
638    pub indicator_constraints: ::core::option::Option<IndicatorConstraintCollection>,
639    #[prost(message, optional, tag = "9")]
640    pub one_hot_constraints: ::core::option::Option<OneHotConstraintCollection>,
641    #[prost(message, optional, tag = "10")]
642    pub sos1_constraints: ::core::option::Option<Sos1ConstraintCollection>,
643    #[prost(btree_map = "uint64, message", tag = "11")]
644    pub decision_variable_dependency:
645        ::prost::alloc::collections::BTreeMap<u64, super::v1::Function>,
646    #[prost(message, optional, tag = "12")]
647    pub named_functions: ::core::option::Option<NamedFunctionTable>,
648    #[prost(btree_map = "string, string", tag = "13")]
649    pub annotations: ::prost::alloc::collections::BTreeMap<
650        ::prost::alloc::string::String,
651        ::prost::alloc::string::String,
652    >,
653    /// Optional output-objective pair. Function references must resolve to
654    /// decision variables owned by this root.
655    #[prost(message, optional, tag = "14")]
656    pub output_objective: ::core::option::Option<OutputObjective>,
657}
658/// Parameter IDs and labels owned by ParametricInstance.
659///
660/// Parameter IDs intentionally share the VariableID namespace with decision
661/// variables. ParametricInstance validates disjointness.
662///
663/// `ids` is a set encoded as a repeated field. IDs must be unique, and `labels`
664/// must only reference IDs present in `ids`.
665#[non_exhaustive]
666#[allow(clippy::derive_partial_eq_without_eq)]
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct ParameterTable {
669    #[prost(uint64, repeated, tag = "1")]
670    pub ids: ::prost::alloc::vec::Vec<u64>,
671    #[prost(btree_map = "uint64, message", tag = "2")]
672    pub labels: ::prost::alloc::collections::BTreeMap<u64, ModelingLabel>,
673}
674/// Validated parametric optimization problem serialization root.
675#[non_exhaustive]
676#[allow(clippy::derive_partial_eq_without_eq)]
677#[derive(Clone, PartialEq, ::prost::Message)]
678pub struct ParametricInstance {
679    #[prost(enumeration = "Feature", repeated, tag = "1")]
680    pub required_features: ::prost::alloc::vec::Vec<i32>,
681    #[prost(message, optional, tag = "2")]
682    pub description: ::core::option::Option<super::v1::instance::Description>,
683    #[prost(message, optional, tag = "3")]
684    pub decision_variables: ::core::option::Option<DecisionVariableTable>,
685    #[prost(message, optional, tag = "4")]
686    pub parameters: ::core::option::Option<ParameterTable>,
687    #[prost(message, optional, tag = "5")]
688    pub objective: ::core::option::Option<super::v1::Function>,
689    #[prost(message, optional, tag = "6")]
690    pub regular_constraints: ::core::option::Option<RegularConstraintCollection>,
691    #[prost(enumeration = "super::v1::instance::Sense", tag = "7")]
692    pub sense: i32,
693    #[prost(message, optional, tag = "8")]
694    pub indicator_constraints: ::core::option::Option<IndicatorConstraintCollection>,
695    #[prost(message, optional, tag = "9")]
696    pub one_hot_constraints: ::core::option::Option<OneHotConstraintCollection>,
697    #[prost(message, optional, tag = "10")]
698    pub sos1_constraints: ::core::option::Option<Sos1ConstraintCollection>,
699    #[prost(btree_map = "uint64, message", tag = "11")]
700    pub decision_variable_dependency:
701        ::prost::alloc::collections::BTreeMap<u64, super::v1::Function>,
702    #[prost(message, optional, tag = "12")]
703    pub named_functions: ::core::option::Option<NamedFunctionTable>,
704    #[prost(btree_map = "string, string", tag = "13")]
705    pub annotations: ::prost::alloc::collections::BTreeMap<
706        ::prost::alloc::string::String,
707        ::prost::alloc::string::String,
708    >,
709    /// Optional output-objective pair. Function references must resolve to
710    /// decision variables or parameters owned by this root.
711    #[prost(message, optional, tag = "14")]
712    pub output_objective: ::core::option::Option<OutputObjective>,
713}
714/// Validated multi-sample solver or sampler output serialization root.
715#[non_exhaustive]
716#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct SampleSet {
719    #[prost(enumeration = "Feature", repeated, tag = "1")]
720    pub required_features: ::prost::alloc::vec::Vec<i32>,
721    #[prost(message, optional, tag = "2")]
722    pub objectives: ::core::option::Option<super::v1::SampledValues>,
723    #[prost(message, optional, tag = "3")]
724    pub decision_variables: ::core::option::Option<SampledDecisionVariableTable>,
725    #[prost(message, optional, tag = "4")]
726    pub sampled_regular_constraints: ::core::option::Option<SampledRegularConstraintCollection>,
727    #[prost(btree_map = "uint64, bool", tag = "5")]
728    pub feasible: ::prost::alloc::collections::BTreeMap<u64, bool>,
729    #[prost(enumeration = "super::v1::instance::Sense", tag = "6")]
730    pub sense: i32,
731    #[prost(btree_map = "uint64, bool", tag = "7")]
732    pub feasible_relaxed: ::prost::alloc::collections::BTreeMap<u64, bool>,
733    #[prost(message, optional, tag = "8")]
734    pub sampled_named_functions: ::core::option::Option<SampledNamedFunctionTable>,
735    #[prost(message, optional, tag = "9")]
736    pub metadata: ::core::option::Option<super::v1::ProcessMetadata>,
737    #[prost(btree_map = "string, string", tag = "10")]
738    pub annotations: ::prost::alloc::collections::BTreeMap<
739        ::prost::alloc::string::String,
740        ::prost::alloc::string::String,
741    >,
742    #[prost(message, optional, tag = "11")]
743    pub sampled_indicator_constraints: ::core::option::Option<SampledIndicatorConstraintCollection>,
744    #[prost(message, optional, tag = "12")]
745    pub sampled_one_hot_constraints: ::core::option::Option<SampledOneHotConstraintCollection>,
746    #[prost(message, optional, tag = "13")]
747    pub sampled_sos1_constraints: ::core::option::Option<SampledSos1ConstraintCollection>,
748    /// Absolute tolerance used to compute and validate `feasible`,
749    /// `feasible_relaxed`, and per-constraint feasibility columns.
750    #[prost(double, optional, tag = "14")]
751    pub feasibility_atol: ::core::option::Option<f64>,
752}
753/// Validated single-state solver output serialization root.
754#[non_exhaustive]
755#[allow(clippy::derive_partial_eq_without_eq)]
756#[derive(Clone, PartialEq, ::prost::Message)]
757pub struct Solution {
758    #[prost(enumeration = "Feature", repeated, tag = "1")]
759    pub required_features: ::prost::alloc::vec::Vec<i32>,
760    #[prost(double, tag = "2")]
761    pub objective: f64,
762    #[prost(message, optional, tag = "3")]
763    pub decision_variables: ::core::option::Option<EvaluatedDecisionVariableTable>,
764    #[prost(message, optional, tag = "4")]
765    pub evaluated_regular_constraints: ::core::option::Option<EvaluatedRegularConstraintCollection>,
766    #[prost(bool, tag = "5")]
767    pub feasible: bool,
768    #[prost(enumeration = "super::v1::Optimality", tag = "6")]
769    pub optimality: i32,
770    #[prost(enumeration = "super::v1::Relaxation", tag = "7")]
771    pub relaxation: i32,
772    #[prost(bool, optional, tag = "8")]
773    pub feasible_relaxed: ::core::option::Option<bool>,
774    #[prost(enumeration = "super::v1::instance::Sense", tag = "9")]
775    pub sense: i32,
776    #[prost(message, optional, tag = "10")]
777    pub evaluated_named_functions: ::core::option::Option<EvaluatedNamedFunctionTable>,
778    #[prost(message, optional, tag = "11")]
779    pub metadata: ::core::option::Option<super::v1::ProcessMetadata>,
780    #[prost(btree_map = "string, string", tag = "12")]
781    pub annotations: ::prost::alloc::collections::BTreeMap<
782        ::prost::alloc::string::String,
783        ::prost::alloc::string::String,
784    >,
785    #[prost(message, optional, tag = "13")]
786    pub evaluated_indicator_constraints:
787        ::core::option::Option<EvaluatedIndicatorConstraintCollection>,
788    #[prost(message, optional, tag = "14")]
789    pub evaluated_one_hot_constraints: ::core::option::Option<EvaluatedOneHotConstraintCollection>,
790    #[prost(message, optional, tag = "15")]
791    pub evaluated_sos1_constraints: ::core::option::Option<EvaluatedSos1ConstraintCollection>,
792    /// Absolute tolerance used to compute and validate `feasible`,
793    /// `feasible_relaxed`, and per-constraint feasibility columns.
794    #[prost(double, optional, tag = "16")]
795    pub feasibility_atol: ::core::option::Option<f64>,
796}