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.
1
using
ULSAlgorithms.Abstractions;
2
using
ULSAlgorithms.Catalog;
3
4
namespace
LotSizingDataModel.Solver.Algorithms.Uls
;
5
6
/// <summary>
7
/// Pins the external exact-method identities used by alpha.34.
8
/// </summary>
9
public
static
class
UlsAlgorithmsExactMethodCatalog
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
(
26
UlsAlgorithmsExactMethod
method)
27
{
28
return
method
switch
29
{
30
UlsAlgorithmsExactMethod.WagnerWhitinClassical
=>
31
WagnerWhitinClassicalId
,
32
33
UlsAlgorithmsExactMethod.ZangwillNetwork
=>
34
ZangwillNetworkId
,
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
(
45
UlsAlgorithmsExactMethod
method)
46
{
47
string
solverId =
48
GetSolverId
(
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
}
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog
Pins the external exact-method identities used by alpha.34.
Definition
UlsAlgorithmsExactMethodCatalog.cs:10
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.ZangwillNetworkId
const string ZangwillNetworkId
Definition
UlsAlgorithmsExactMethodCatalog.cs:22
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.SourceCommit
const string SourceCommit
Definition
UlsAlgorithmsExactMethodCatalog.cs:13
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.GetSolverId
static string GetSolverId(UlsAlgorithmsExactMethod method)
Definition
UlsAlgorithmsExactMethodCatalog.cs:25
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.PackageSha256
const string PackageSha256
Definition
UlsAlgorithmsExactMethodCatalog.cs:16
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.GetExactDescriptor
static UlsSolverDescriptor GetExactDescriptor(UlsAlgorithmsExactMethod method)
Definition
UlsAlgorithmsExactMethodCatalog.cs:44
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.PackageVersion
const string PackageVersion
Definition
UlsAlgorithmsExactMethodCatalog.cs:11
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethodCatalog.WagnerWhitinClassicalId
const string WagnerWhitinClassicalId
Definition
UlsAlgorithmsExactMethodCatalog.cs:19
LotSizingDataModel.Solver.Algorithms.Uls
Definition
UlsAlgorithmsExactAdapterResult.cs:4
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethod
UlsAlgorithmsExactMethod
Exact ULSAlgorithms methods deliberately exposed by the LotSizingDataModel alpha.34 bridge.
Definition
UlsAlgorithmsExactMethod.cs:8
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethod.ZangwillNetwork
@ ZangwillNetwork
Definition
UlsAlgorithmsExactMethod.cs:10
LotSizingDataModel.Solver.Algorithms.Uls.UlsAlgorithmsExactMethod.WagnerWhitinClassical
@ WagnerWhitinClassical
Definition
UlsAlgorithmsExactMethod.cs:9
LotSizingDataModel.Solver
Algorithms
Uls
UlsAlgorithmsExactMethodCatalog.cs
Generated by
1.17.0