LotSizingDataModel.Checker 2.0.1
Reusable validation engine for structural, mathematical and objective consistency checks.
Loading...
Searching...
No Matches
SolutionVerificationBatchOptions.cs
Go to the documentation of this file.
2
4
5/// <summary>
6/// Configures execution of a batch solution-verification campaign.
7/// </summary>
9{
10 /// <summary>
11 /// Gets or sets the maximum number of candidates verified concurrently.
12 /// </summary>
13 /// <remarks>
14 /// The default is bounded to four workers to avoid excessive memory use
15 /// while mathematical models are built for several candidates at once.
16 /// </remarks>
18 {
19 get;
20 set;
21 } = Math.Max(
22 1,
23 Math.Min(
24 Environment.ProcessorCount,
25 4));
26
27 /// <summary>
28 /// Gets or sets the verification policy applied independently to every
29 /// candidate.
30 /// </summary>
32 {
33 get;
34 set;
35 } = new();
36
37 /// <summary>
38 /// Validates this batch configuration.
39 /// </summary>
40 public void EnsureValid()
41 {
43 {
44 throw new ArgumentOutOfRangeException(
47 "The maximum degree of parallelism must be at least one.");
48 }
49
50 if (VerificationOptions is null)
51 {
52 throw new InvalidOperationException(
53 "VerificationOptions cannot be null.");
54 }
55
56 VerificationOptions.EnsureValid();
57 }
58}
Configures execution of a batch solution-verification campaign.
SolutionVerificationOptions VerificationOptions
Gets or sets the verification policy applied independently to every candidate.
int MaxDegreeOfParallelism
Gets or sets the maximum number of candidates verified concurrently.
Configures the high-level verification facade and the application of checker results back to domain o...