14 ScientificClassificationResult classification,
17 ArgumentNullException.ThrowIfNull(classification);
25 formulationId?.Trim() ??
string.Empty,
29 verifiedSupportedExtensions:
30 Array.Empty<LotSizingProblemClassExtensionKind>(),
31 knownUnsupportedExtensions:
32 Array.Empty<LotSizingProblemClassExtensionKind>(),
33 undeterminedExtensions:
34 Array.Empty<LotSizingProblemClassExtensionKind>(),
38 new ScientificFormulationDiagnostic(
40 ScientificFormulationDiagnosticSeverity.Warning,
41 "formulation.profile",
42 "No scientific capability profile is registered " +
43 "for this formulation.")
53 ScientificClassificationResult classification,
56 ArgumentNullException.ThrowIfNull(classification);
57 ArgumentNullException.ThrowIfNull(profile);
60 new List<ScientificFormulationDiagnostic>();
62 if (classification.IsBlocked)
69 "Scientific formulation compatibility is blocked " +
70 "because instance scientific classification is blocked."));
76 Array.Empty<LotSizingProblemClassExtensionKind>(),
77 Array.Empty<LotSizingProblemClassExtensionKind>(),
78 Array.Empty<LotSizingProblemClassExtensionKind>(),
82 LotSizingProblemClassMatchResult? primary =
83 classification.PrimaryProblemClass;
91 "classification.problemClass",
92 "No unique canonical problem class is available for " +
93 "scientific formulation assessment."));
99 Array.Empty<LotSizingProblemClassExtensionKind>(),
100 Array.Empty<LotSizingProblemClassExtensionKind>(),
101 Array.Empty<LotSizingProblemClassExtensionKind>(),
105 CanonicalLotSizingProblemClassId problemClass =
106 primary.Definition.Id;
114 "classification.problemClass",
115 $
"Formulation '{profile.FormulationId}' has no " +
116 $
"verified support for canonical class '{problemClass}'."));
122 Array.Empty<LotSizingProblemClassExtensionKind>(),
123 Array.Empty<LotSizingProblemClassExtensionKind>(),
124 Array.Empty<LotSizingProblemClassExtensionKind>(),
128 OptimizationObjectiveKind objectiveKind =
129 classification.Descriptor?.ObjectiveFinance
130 .PrimaryObjectiveKind ??
131 OptimizationObjectiveKind.Economic;
139 "classification.objective",
140 $
"Formulation '{profile.FormulationId}' has no verified " +
141 $
"support for objective kind '{objectiveKind}'."));
147 Array.Empty<LotSizingProblemClassExtensionKind>(),
148 Array.Empty<LotSizingProblemClassExtensionKind>(),
149 Array.Empty<LotSizingProblemClassExtensionKind>(),
154 new List<LotSizingProblemClassExtensionKind>();
157 new List<LotSizingProblemClassExtensionKind>();
160 new List<LotSizingProblemClassExtensionKind>();
163 LotSizingProblemClassExtensionKind extension
164 in primary.Extensions)
166 if (profile.IsExtensionVerifiedSupported(extension))
168 supported.Add(extension);
170 else if (profile.IsExtensionKnownUnsupported(extension))
172 unsupported.Add(extension);
176 undetermined.Add(extension);
180 if (unsupported.Count > 0)
186 "classification.extensions",
187 "Known unsupported formulation extensions: " +
188 string.Join(
",", unsupported)));
200 if (undetermined.Count > 0)
206 "classification.extensions",
207 "Formulation support has not yet been scientifically " +
208 "verified for extensions: " +
209 string.Join(
",", undetermined)));
226 $
"Formulation '{profile.FormulationId}' has verified " +
227 "scientific coverage for the detected canonical core and " +
228 "all classified extensions."));