LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
HistoricalInverseResolution.cs
Go to the documentation of this file.
2
3public sealed class HistoricalInverseResolution
4{
7 IReadOnlyList<HistoricalMappingRule> candidates)
8 {
9 Status = status;
10 Candidates = candidates?.ToArray() ??
11 throw new ArgumentNullException(nameof(candidates));
12
14 Candidates.Count != 1)
15 {
16 throw new InvalidOperationException(
17 "A unique inverse resolution must contain exactly one candidate.");
18 }
19
21 Candidates.Count != 0)
22 {
23 throw new InvalidOperationException(
24 "A not-found resolution cannot contain candidates.");
25 }
26
28 Candidates.Count < 2)
29 {
30 throw new InvalidOperationException(
31 "An ambiguous resolution requires at least two candidates.");
32 }
33 }
34
36 public IReadOnlyList<HistoricalMappingRule> Candidates { get; }
37
40 ? Candidates[0]
41 : null;
42}
HistoricalInverseResolution(HistoricalInverseResolutionStatus status, IReadOnlyList< HistoricalMappingRule > candidates)