LotSizingDataModel.Solution 2.0.1
Solution objects for production, setup, inventory and related decisions.
Loading...
Searching...
No Matches
SolutionScientificProvenance.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Dependency-neutral scientific provenance snapshot for one generated
5/// lot-sizing solution.
6/// </summary>
7/// <remarks>
8/// Only neutral values are stored so Solution remains independent from
9/// Instance and Solver. Persistence uses the existing generation-parameter
10/// collection through <see cref="SolutionScientificProvenanceCodec"/>.
11/// </remarks>
13{
14 public const string LegacySchemaVersion = "1";
15
16 public const string CurrentSchemaVersion = "2";
17
18 public string SchemaVersion { get; init; } =
20
21 public string NotationSchemeId { get; init; } =
22 "LSDM";
23
24 public string NotationSchemeVersion { get; init; } =
25 "1";
26
27 public string DetectedNotation { get; init; } =
28 string.Empty;
29
30 public string CanonicalProblemClassCode { get; init; } =
31 string.Empty;
32
33 public string ProblemClassMatchKind { get; init; } =
34 string.Empty;
35
36 public string FormulationId { get; init; } =
37 string.Empty;
38
39 public string FormulationFamily { get; init; } =
40 string.Empty;
41
42 public string FormulationScientificCompatibility { get; init; } =
43 string.Empty;
44
45 public string SolutionMethodId { get; init; } =
46 string.Empty;
47
48 public string SolutionMethodCategory { get; init; } =
49 string.Empty;
50
51 public string SolverBackendKind { get; init; } =
52 string.Empty;
53
54 public DateTime CapturedAtUtc { get; init; } =
55 DateTime.UtcNow;
56
57 public bool IsLegacySchema =>
58 SchemaVersion.Equals(
60 StringComparison.Ordinal);
61
63 !string.IsNullOrWhiteSpace(SolutionMethodId) &&
64 !string.IsNullOrWhiteSpace(SolutionMethodCategory) &&
65 !string.IsNullOrWhiteSpace(SolverBackendKind);
66
68 !string.IsNullOrWhiteSpace(SchemaVersion) &&
69 !string.IsNullOrWhiteSpace(NotationSchemeId) &&
70 !string.IsNullOrWhiteSpace(NotationSchemeVersion) &&
71 !string.IsNullOrWhiteSpace(DetectedNotation) &&
72 !string.IsNullOrWhiteSpace(CanonicalProblemClassCode) &&
73 !string.IsNullOrWhiteSpace(FormulationId) &&
74 !string.IsNullOrWhiteSpace(
76 (
78 (
79 SchemaVersion.Equals(
81 StringComparison.Ordinal) &&
83 )
84 );
85}
Dependency-neutral scientific provenance snapshot for one generated lot-sizing solution.