LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
HistoricalClassificationMappingRegistryFactory.cs
Go to the documentation of this file.
2
4{
5 public const string BaselineRegistryVersion =
6 "1.0-alpha.41";
7
10 {
11 var registry =
14
15 AddWolseyMappings(
16 registry);
17
18 registry.EnsureValid();
19
20 return registry;
21 }
22
23 private static void AddWolseyMappings(
25 {
26 const string source =
27 "Wolsey 2002 mapping consolidated by validated LotSizingDataModel historical milestones through alpha.32.";
28
29 AddExact(registry, "WOLSEY-CAP-U", "CAP=U",
30 new[] { "Uncap:P" }, source);
31
32 AddExact(registry, "WOLSEY-CAP-CC", "CAP=CC",
33 new[] { "Cap:P", "TP:CapP=C" }, source);
34
35 AddExact(registry, "WOLSEY-CAP-C", "CAP=C",
36 new[] { "Cap:P", "Cap:Var" }, source);
37
38 AddExact(registry, "WOLSEY-VAR-B", "VAR=B",
39 new[] { "BL" }, source);
40
41 AddExact(registry, "WOLSEY-VAR-SC", "VAR=SC",
42 new[] { "SU" }, source);
43
44 AddExact(registry, "WOLSEY-VAR-ST", "VAR=ST",
45 new[] { "SUT" }, source);
46
47 AddExact(registry, "WOLSEY-VAR-ST-C", "VAR=ST(C)",
48 new[] { "SUT", "TP:SUT=C" }, source);
49
50 AddExact(registry, "WOLSEY-VAR-LB", "VAR=LB",
51 new[] { "MinLot" }, source);
52
53 AddExact(registry, "WOLSEY-VAR-SS", "VAR=SS",
54 new[] { "SS" }, source);
55
56 AddExact(registry, "WOLSEY-PROB-WW", "PROB=WW",
57 new[] { "Cost:NS" }, source);
58
59 AddExact(registry, "WOLSEY-VAR-SL", "VAR=SL",
60 new[] { "SalesOption" }, source);
61
62 AddExact(registry, "WOLSEY-SQT", "SQT",
63 new[] { "SDCT" }, source);
64
65 AddExact(registry, "WOLSEY-SQC", "SQC",
66 new[] { "SDCC" }, source);
67
68 AddExact(registry, "WOLSEY-SET", "SET",
69 new[] { "SetupTime" }, source);
70
71 AddConservative(registry, "WOLSEY-SB1", "SB1",
72 new[] { "Scheduling:SB1" }, source);
73
74 AddConservative(registry, "WOLSEY-SB2", "SB2",
75 new[] { "Scheduling:SB2" }, source);
76
77 AddConservative(registry, "WOLSEY-BB", "BB",
78 new[] { "Scheduling:BB" }, source);
79
80 AddSourceOnly(
81 registry,
82 "WOLSEY-IM",
83 "IM",
84 source,
85 "Machine label retained from the source only; no automatic generic semantics are inferred.");
86
87 AddSourceOnly(
88 registry,
89 "WOLSEY-VM",
90 "VM",
91 source,
92 "Machine label retained from the source only; no automatic generic semantics are inferred.");
93 }
94
95 private static void AddExact(
96 HistoricalClassificationMappingRegistry registry,
97 string ruleId,
98 string historicalToken,
99 IEnumerable<string> universalTokens,
100 string source)
101 {
102 registry.AddRule(
103 new HistoricalMappingRule(
104 ruleId,
106 historicalToken,
107 universalTokens,
109 allowsInverse: true,
110 sourceReference: source));
111 }
112
113 private static void AddConservative(
114 HistoricalClassificationMappingRegistry registry,
115 string ruleId,
116 string historicalToken,
117 IEnumerable<string> universalTokens,
118 string source)
119 {
120 registry.AddRule(
121 new HistoricalMappingRule(
122 ruleId,
124 historicalToken,
125 universalTokens,
126 HistoricalMappingConfidence.Conservative,
127 allowsInverse: false,
128 sourceReference: source,
129 notes:
130 "Conservative projection; inverse detection is intentionally disabled."));
131 }
132
133 private static void AddSourceOnly(
134 HistoricalClassificationMappingRegistry registry,
135 string ruleId,
136 string historicalToken,
137 string source,
138 string notes)
139 {
140 registry.AddRule(
141 new HistoricalMappingRule(
142 ruleId,
144 historicalToken,
145 Array.Empty<string>(),
147 allowsInverse: false,
148 sourceReference: source,
149 notes: notes));
150 }
151}