LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
UlsAlgorithmsExactBridgeResult.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Immutable external exact-solve evidence retained before
5/// projection back into LotSizingDataModel.
6/// </summary>
8{
11 string solverId,
12 string solverName,
13 string solverVersion,
14 double objectiveValue,
15 IReadOnlyList<double> productionQuantities,
16 IReadOnlyList<double> endingInventories,
17 IReadOnlyList<bool> setupDecisions,
18 TimeSpan solveDuration)
19 {
20 Method = method;
21 SolverId = solverId;
22 SolverName = solverName;
23 SolverVersion = solverVersion;
24 ObjectiveValue = objectiveValue;
25 ProductionQuantities = productionQuantities.ToArray();
26 EndingInventories = endingInventories.ToArray();
27 SetupDecisions = setupDecisions.ToArray();
28 SolveDuration = solveDuration;
29
31 }
32
34 {
35 get;
36 }
37
38 public string SolverId
39 {
40 get;
41 }
42
43 public string SolverName
44 {
45 get;
46 }
47
48 public string SolverVersion
49 {
50 get;
51 }
52
53 public double ObjectiveValue
54 {
55 get;
56 }
57
58 public double[] ProductionQuantities
59 {
60 get;
61 }
62
63 public double[] EndingInventories
64 {
65 get;
66 }
67
68 public bool[] SetupDecisions
69 {
70 get;
71 }
72
73 public TimeSpan SolveDuration
74 {
75 get;
76 }
77
78 public int Horizon =>
80
81 public void EnsureValid()
82 {
83 if (string.IsNullOrWhiteSpace(SolverId) ||
84 string.IsNullOrWhiteSpace(SolverName) ||
85 string.IsNullOrWhiteSpace(SolverVersion))
86 {
87 throw new InvalidOperationException(
88 "External exact-solver provenance must be complete.");
89 }
90
91 if (double.IsNaN(ObjectiveValue) ||
92 double.IsInfinity(ObjectiveValue))
93 {
94 throw new InvalidOperationException(
95 "The external exact objective value must be finite.");
96 }
97
98 if (Horizon <= 0 ||
99 EndingInventories.Length != Horizon ||
100 SetupDecisions.Length != Horizon)
101 {
102 throw new InvalidOperationException(
103 "The external exact solution vectors must be complete and use one common horizon.");
104 }
105
106 if (SolveDuration < TimeSpan.Zero)
107 {
108 throw new InvalidOperationException(
109 "External exact solve duration cannot be negative.");
110 }
111 }
112}
UlsAlgorithmsExactBridgeResult(UlsAlgorithmsExactMethod method, string solverId, string solverName, string solverVersion, double objectiveValue, IReadOnlyList< double > productionQuantities, IReadOnlyList< double > endingInventories, IReadOnlyList< bool > setupDecisions, TimeSpan solveDuration)
UlsAlgorithmsExactMethod
Exact ULSAlgorithms methods deliberately exposed by the LotSizingDataModel alpha.34 bridge.