LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
HistoricalClassificationCapabilityAnalyzer.cs
Go to the documentation of this file.
3
5
6/// <summary>
7/// Reports historical mapping/detection capability without inventing a
8/// historical code that cannot be derived safely.
9/// </summary>
11{
12 private readonly BitranYanasseHistoricalMapper _bitranYanasseMapper =
13 new();
14
15 public IReadOnlyList<HistoricalClassificationCapability> Analyze(
17 {
18 ArgumentNullException.ThrowIfNull(descriptor);
19
21 _bitranYanasseMapper.AssessApplicability(
22 descriptor);
23
25 by.Kind switch
26 {
29
32
35 .ApplicableNeedsExplicitProfile,
36
39 .ExtendedProjectableNeedsExplicitProfile,
40
41 _ => throw new ArgumentOutOfRangeException()
42 };
43
44 string byNote =
45 by.Kind switch
46 {
48 "The descriptor lacks information required to decide " +
49 "membership in the classical Bitran-Yanasse domain.",
50
52 "The descriptor violates classical-domain requirements: " +
53 string.Join(",", by.FailedRequirements),
54
56 "The complete historical code requires explicit setup, " +
57 "holding, production-cost and capacity temporal profiles.",
58
60 "The classical domain is projectable, with extensions: " +
61 string.Join(",", by.Extensions),
62
63 _ => throw new ArgumentOutOfRangeException()
64 };
65
66 return new[]
67 {
69 code: "BY",
70 name: "Bitran-Yanasse temporal classification",
71 kind: byKind,
72 canMapDeclaredClassification: true,
73 canDetectCompleteHistoricalCode: false,
74 requiresExplicitParameterProfile: true,
75 note: byNote),
76
78 code: "WOLSEY-2002",
79 name: "Wolsey 2002 problem classification",
80 kind:
83 canMapDeclaredClassification: true,
84 canDetectCompleteHistoricalCode: false,
85 requiresExplicitParameterProfile: false,
86 note:
87 "Historical-to-universal mapping is supported, but the " +
88 "current engine does not invent a unique Wolsey source " +
89 "code from a descriptor.")
90 };
91 }
92}
Typed structured description of the factual lot-sizing problem characteristics currently represented ...
IReadOnlyList< string > FailedRequirements
Gets defining historical-domain conditions that are not satisfied. Empty for applicable/projectable i...
IReadOnlyList< string > Extensions
Gets additional modeled characteristics outside the strict historical domain but not erasing the clas...
Maps the historical Bitran-Yanasse temporal classification to the portion of the LotSizingDataModel u...
Reports historical mapping/detection capability without inventing a historical code that cannot be de...
IReadOnlyList< HistoricalClassificationCapability > Analyze(LotSizingProblemDescriptor descriptor)
Describes what the current engine can safely do with one historical classification scheme.
@ ExactHistoricalDomain
The descriptor satisfies the classical domain conditions and contains no currently identified extensi...
@ Incomplete
The descriptor does not contain enough basic information to assess applicability.
@ NotApplicable
The descriptor contradicts at least one defining domain condition.
@ ExtendedButProjectable
The classical domain is present, but the instance also contains extensions not represented by the his...