LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
LotSizingProblemClassAnalyzer.cs
Go to the documentation of this file.
3
5
6/// <summary>
7/// Assesses one descriptor against one canonical problem-class core.
8/// </summary>
10{
11 private readonly UniversalNotationMatcher _matcher;
12 private readonly LotSizingProblemClassExtensionAnalyzer _extensionAnalyzer;
13
15 _smallBucketSchedulingAnalyzer;
16
18 _macroMicroSchedulingAnalyzer;
19
26
30 {
31 _matcher =
32 matcher ??
33 throw new ArgumentNullException(nameof(matcher));
34
35 _extensionAnalyzer =
36 extensionAnalyzer ??
37 throw new ArgumentNullException(nameof(extensionAnalyzer));
38
39 _smallBucketSchedulingAnalyzer =
41 _extensionAnalyzer);
42
43 _macroMicroSchedulingAnalyzer =
45 _extensionAnalyzer);
46 }
47
51 {
52 ArgumentNullException.ThrowIfNull(descriptor);
53 ArgumentNullException.ThrowIfNull(definition);
54
55 if (
56 definition.SupportLevel ==
58 {
60 definition,
61 LotSizingProblemClassMatchKind.NotRepresentable,
62 failedRequirements:
63 definition.CapabilityGaps);
64 }
65
66 if (
67 definition.Id ==
69 .DiscreteLotSizingAndScheduling ||
70 definition.Id ==
72 .ContinuousSetupLotSizing ||
73 definition.Id ==
75 .ProportionalLotSizingAndScheduling)
76 {
77 return _smallBucketSchedulingAnalyzer.Assess(
78 descriptor,
79 definition);
80 }
81
82 if (
83 definition.Id ==
85 .GeneralLotSizingAndScheduling)
86 {
87 return _macroMicroSchedulingAnalyzer.Assess(
88 descriptor,
89 definition);
90 }
91
93 _matcher.Match(
94 descriptor,
95 definition.UniversalCoreSpecification!);
96
97 if (
98 universal.Kind ==
99 UniversalNotationMatchKind.Contradiction)
100 {
102 definition,
103 LotSizingProblemClassMatchKind.NotApplicable,
104 failedRequirements:
105 universal.Issues.Select(
106 issue => issue.ToString()));
107 }
108
109 if (
110 universal.Kind ==
112 {
114 definition,
116 failedRequirements:
117 universal.Issues.Select(
118 issue => issue.ToString()));
119 }
120
121 IReadOnlyList<LotSizingProblemClassExtensionKind>
122 extensions =
123 _extensionAnalyzer.Analyze(
124 descriptor);
125
127 definition,
128 extensions.Count == 0
130 : LotSizingProblemClassMatchKind.CompatibleExtension,
131 extensions);
132 }
133}
Typed structured description of the factual lot-sizing problem characteristics currently represented ...
Represents the complete result of matching a typed descriptor against a universal problem specificati...
Matches a typed lot-sizing descriptor against a universal-notation problem specification.
LotSizingProblemClassAnalyzer(UniversalNotationMatcher matcher, LotSizingProblemClassExtensionAnalyzer extensionAnalyzer)
LotSizingProblemClassMatchResult Assess(LotSizingProblemDescriptor descriptor, LotSizingProblemClassDefinition definition)
Identifies modeled extensions outside the six currently executable canonical lot-sizing core signatur...
Canonical membership analyzer for the DLSP, CSLP and PLSP small-bucket scheduling families independen...
UniversalNotationMatchKind
Describes the semantic relationship between an instance descriptor and a universal-notation problem s...
LotSizingProblemClassSupportLevel
Implementation support of one scientifically catalogued problem class.
LotSizingProblemClassMatchKind
Relationship between an instance descriptor and one canonical problem class.
CanonicalLotSizingProblemClassId
Stable canonical LotSizingDataModel identifiers for problem classes.