LotSizingDataModel.Checker 2.0.1
Reusable validation engine for structural, mathematical and objective consistency checks.
Loading...
Searching...
No Matches
SolutionCheckResult.cs
Go to the documentation of this file.
2
4
5/// <summary>
6/// Contains the complete result of checking one lot-sizing solution.
7/// </summary>
8public sealed class SolutionCheckResult
9{
10 private readonly List<SolutionCheckIssue> _issues = new();
11
12 /// <summary>
13 /// Gets or sets the checking level that was executed.
14 /// </summary>
16 {
17 get;
18 set;
19 }
20
21
22 /// <summary>
23 /// Gets or sets whether structural checking completed.
24 /// </summary>
26 {
27 get;
28 set;
29 }
30
31 /// <summary>
32 /// Gets or sets whether variable-domain checking completed.
33 /// </summary>
35 {
36 get;
37 set;
38 }
39
40 /// <summary>
41 /// Gets or sets whether mathematical feasibility checking completed.
42 /// </summary>
44 {
45 get;
46 set;
47 }
48
49 /// <summary>
50 /// Gets or sets whether objective checking completed.
51 /// </summary>
53 {
54 get;
55 set;
56 }
57
58 /// <summary>
59 /// Gets or sets whether structural validation succeeded.
60 /// </summary>
62 {
63 get;
64 set;
65 }
66
67 /// <summary>
68 /// Gets or sets whether all checked variable-domain conditions are satisfied.
69 /// </summary>
71 {
72 get;
73 set;
74 }
75
76 /// <summary>
77 /// Gets or sets whether all checked mathematical constraints are feasible.
78 /// </summary>
79 public bool IsFeasible
80 {
81 get;
82 set;
83 }
84
85 /// <summary>
86 /// Gets or sets whether objective-value verification succeeded.
87 /// </summary>
89 {
90 get;
91 set;
92 }
93
94 /// <summary>
95 /// Gets or sets the objective value independently recomputed by the checker.
96 /// </summary>
98 {
99 get;
100 set;
101 }
102
103 /// <summary>
104 /// Gets or sets the objective value reported by the candidate solution.
105 /// </summary>
107 {
108 get;
109 set;
110 }
111
112 /// <summary>
113 /// Gets or sets the absolute objective-value difference.
114 /// </summary>
115 public double? ObjectiveDifference
116 {
117 get;
118 set;
119 }
120
121 /// <summary>
122 /// Gets or sets the relative objective-value difference, scaled by
123 /// max(1, abs(reported), abs(recomputed)).
124 /// </summary>
126 {
127 get;
128 set;
129 }
130
131 /// <summary>
132 /// Gets or sets the effective absolute comparison tolerance used for
133 /// objective-value verification.
134 /// </summary>
136 {
137 get;
138 set;
139 }
140
141 /// <summary>
142 /// Gets or sets the maximum mathematical-constraint violation.
143 /// </summary>
145 {
146 get;
147 set;
148 }
149
150 /// <summary>
151 /// Gets or sets the sum of mathematical-constraint violations.
152 /// </summary>
154 {
155 get;
156 set;
157 }
158
159 /// <summary>
160 /// Gets or sets the number of violated mathematical constraints.
161 /// </summary>
163 {
164 get;
165 set;
166 }
167
168 /// <summary>
169 /// Gets all checker diagnostics.
170 /// </summary>
171 public IReadOnlyList<SolutionCheckIssue> Issues =>
172 _issues;
173
174 /// <summary>
175 /// Gets whether the solution passed every check requested by
176 /// <see cref="Level"/>.
177 /// </summary>
198
199 /// <summary>
200 /// Adds one issue to the result.
201 /// </summary>
202 /// <param name="issue">Issue to append.</param>
203 public void AddIssue(
204 SolutionCheckIssue issue)
205 {
206 ArgumentNullException.ThrowIfNull(
207 issue);
208
209 _issues.Add(
210 issue);
211 }
212}
Describes one issue detected by a lot-sizing solution checker.
Contains the complete result of checking one lot-sizing solution.
IReadOnlyList< SolutionCheckIssue > Issues
Gets all checker diagnostics.
bool FeasibilityCheckCompleted
Gets or sets whether mathematical feasibility checking completed.
double? ObjectiveRelativeDifference
Gets or sets the relative objective-value difference, scaled by max(1, abs(reported),...
bool AreVariableDomainsValid
Gets or sets whether all checked variable-domain conditions are satisfied.
double TotalConstraintViolation
Gets or sets the sum of mathematical-constraint violations.
SolutionCheckLevel Level
Gets or sets the checking level that was executed.
bool IsFeasible
Gets or sets whether all checked mathematical constraints are feasible.
double MaximumConstraintViolation
Gets or sets the maximum mathematical-constraint violation.
double? ObjectiveComparisonTolerance
Gets or sets the effective absolute comparison tolerance used for objective-value verification.
double? ReportedObjectiveValue
Gets or sets the objective value reported by the candidate solution.
double? ObjectiveDifference
Gets or sets the absolute objective-value difference.
int ViolatedConstraintCount
Gets or sets the number of violated mathematical constraints.
bool VariableDomainCheckCompleted
Gets or sets whether variable-domain checking completed.
bool IsStructurallyValid
Gets or sets whether structural validation succeeded.
bool IsObjectiveConsistent
Gets or sets whether objective-value verification succeeded.
bool StructuralCheckCompleted
Gets or sets whether structural checking completed.
bool IsValid
Gets whether the solution passed every check requested by Level.
void AddIssue(SolutionCheckIssue issue)
Adds one issue to the result.
bool ObjectiveCheckCompleted
Gets or sets whether objective checking completed.
double? RecomputedObjectiveValue
Gets or sets the objective value independently recomputed by the checker.
SolutionCheckLevel
Defines how deeply a lot-sizing solution must be checked.
@ Feasibility
Checks structure, numerical domains, and mathematical feasibility.
@ Structural
Checks only the structural consistency of the solution.
@ Full
Performs all available checks, including objective-value verification.