LotSizingDataModel.Solver 2.0.1
Solver-independent modeling, execution, monitoring and adapter infrastructure.
Loading...
Searching...
No Matches
UlsAlgorithmsExactMethodCatalog.cs
Go to the documentation of this file.
1using ULSAlgorithms.Abstractions;
2using ULSAlgorithms.Catalog;
3
5
6/// <summary>
7/// Pins the external exact-method identities used by alpha.34.
8/// </summary>
10{
11 public const string PackageVersion = "1.1.0";
12
13 public const string SourceCommit =
14 "3e5595996d35373dd93f90a9245c6bc9e65f9e0d";
15
16 public const string PackageSha256 =
17 "4eff21da87a9ff7649ee2e0f1c6f835b0af3cfa6bc08dd9ba91306fdd5ff2a3c";
18
19 public const string WagnerWhitinClassicalId =
20 "wagner-whitin-classical";
21
22 public const string ZangwillNetworkId =
23 "zangwill-network";
24
25 public static string GetSolverId(
27 {
28 return method switch
29 {
32
35
36 _ =>
37 throw new ArgumentOutOfRangeException(
38 nameof(method),
39 method,
40 "The requested ULSAlgorithms exact method is not exposed by alpha.34.")
41 };
42 }
43
44 public static UlsSolverDescriptor GetExactDescriptor(
46 {
47 string solverId =
49 method);
50
51 UlsSolverDescriptor descriptor =
52 UlsSolverCatalog.Get(
53 solverId);
54
55 if (descriptor.Kind !=
56 UlsSolverKind.Exact)
57 {
58 throw new InvalidOperationException(
59 $"ULSAlgorithms solver '{solverId}' is not classified as an exact solver.");
60 }
61
62 return descriptor;
63 }
64}
static UlsSolverDescriptor GetExactDescriptor(UlsAlgorithmsExactMethod method)
UlsAlgorithmsExactMethod
Exact ULSAlgorithms methods deliberately exposed by the LotSizingDataModel alpha.34 bridge.