LotSizingDataModel.Checker 2.0.1
Reusable validation engine for structural, mathematical and objective consistency checks.
Loading...
Searching...
No Matches
SolutionVerificationBatchResult.cs
Go to the documentation of this file.
2
4
5/// <summary>
6/// Contains the deterministic result of a complete batch-verification run.
7/// </summary>
9{
10 /// <summary>
11 /// Gets the per-candidate results in exactly the same order as the input.
12 /// </summary>
13 public IReadOnlyList<SolutionVerificationBatchItemResult> Items
14 {
15 get;
16 init;
17 } = Array.Empty<SolutionVerificationBatchItemResult>();
18
19 /// <summary>
20 /// Gets the checker-only aggregate summary for candidates whose execution
21 /// reached a checker result.
22 /// </summary>
23 /// <remarks>
24 /// Candidates that failed because of an unexpected execution exception are
25 /// deliberately excluded from this checker summary and are counted through
26 /// <see cref="ExecutionFailureCount"/> instead.
27 /// </remarks>
29 {
30 get;
31 init;
32 } = new();
33
34 /// <summary>
35 /// Gets the total number of input candidates.
36 /// </summary>
37 public int CandidateCount =>
38 Items.Count;
39
40 /// <summary>
41 /// Gets the number of candidates for which verification execution
42 /// completed normally.
43 /// </summary>
45 Items.Count(item => item.ExecutionSucceeded);
46
47 /// <summary>
48 /// Gets the number of candidates that failed because of an unexpected
49 /// execution exception.
50 /// </summary>
52 Items.Count(item => !item.ExecutionSucceeded);
53
54 /// <summary>
55 /// Gets the number of candidates that were checked successfully and passed
56 /// all requested checks.
57 /// </summary>
58 public int ValidCandidateCount =>
59 Items.Count(item => item.IsValid);
60
61 /// <summary>
62 /// Gets the number of candidates whose execution succeeded but whose
63 /// solution did not pass all requested checks.
64 /// </summary>
66 Items.Count(
67 item =>
68 item.ExecutionSucceeded &&
69 !item.IsValid);
70
71 /// <summary>
72 /// Gets whether no candidate suffered an execution failure.
73 /// </summary>
74 public bool ExecutionSucceeded =>
76
77 /// <summary>
78 /// Gets whether every candidate executed successfully and passed every
79 /// requested check.
80 /// </summary>
81 public bool IsValid =>
84}
Contains the execution and checker result for one batch candidate.
Contains the deterministic result of a complete batch-verification run.
IReadOnlyList< SolutionVerificationBatchItemResult > Items
Gets the per-candidate results in exactly the same order as the input.
SolutionCheckBatchSummary CheckSummary
Gets the checker-only aggregate summary for candidates whose execution reached a checker result.
int CompletedCandidateCount
Gets the number of candidates for which verification execution completed normally.
int ExecutionFailureCount
Gets the number of candidates that failed because of an unexpected execution exception.
bool ExecutionSucceeded
Gets whether no candidate suffered an execution failure.
int ValidCandidateCount
Gets the number of candidates that were checked successfully and passed all requested checks.
bool IsValid
Gets whether every candidate executed successfully and passed every requested check.
int InvalidCandidateCount
Gets the number of candidates whose execution succeeded but whose solution did not pass all requested...
Contains aggregated metrics for a collection of checked solutions.