LotSizingDataModel.Instance
2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
WolseyHistoricalDescriptor.cs
Go to the documentation of this file.
1
using
LotSizingDataModel.Instance.Historical
;
2
3
namespace
LotSizingDataModel.Instance.Classification.Historical
;
4
5
public
enum
WolseyDetectedProblemVariant
6
{
7
Undetermined
= 0,
8
DLSI
= 1,
9
DLS
= 2
10
}
11
12
public
enum
WolseyDetectedCapacityVariant
13
{
14
Undetermined
= 0,
15
U
= 1,
16
CC
= 2,
17
C
= 3
18
}
19
20
public
enum
WolseyDetectedBucketVariant
21
{
22
Undetermined
= 0,
23
SB1
= 1,
24
SB2
= 2,
25
BB
= 3
26
}
27
28
/// <summary>
29
/// Lossless detected/source-preserved Wolsey descriptor.
30
/// </summary>
31
public
sealed
class
WolseyHistoricalDescriptor
32
{
33
public
WolseyDetectedProblemVariant
ProblemVariant
{
get
; init; }
34
35
public
WolseyDetectedCapacityVariant
CapacityVariant
{
get
; init; }
36
37
public
WolseyDetectedBucketVariant
BucketVariant
{
get
; init; }
38
39
public
int
NumberOfMachines
{
get
; init; }
40
41
public
int
NumberOfItems
{
get
; init; }
42
43
public
int
NumberOfPeriods
{
get
; init; }
44
45
public
int
?
NumberOfLevels
{
get
; init; }
46
47
public
bool
HasSalesOption
{
get
; init; }
48
49
public
bool
HasSetupTimes
{
get
; init; }
50
51
public
WolseyDeclaredMachineLabel
DeclaredMachineLabel
{
get
; init; }
52
53
/// <summary>
54
/// Always false in alpha.32: IM/VM are never inferred.
55
/// </summary>
56
public
bool
MachineLabelWasInferred
=>
false
;
57
58
public
bool
HasExactCounters
=>
59
NumberOfMachines
>= 0 &&
60
NumberOfItems
>= 0 &&
61
NumberOfPeriods
>= 0 &&
62
NumberOfLevels
is >= 1;
63
64
public
bool
HasDetectedProblemVariant
=>
65
ProblemVariant
!=
WolseyDetectedProblemVariant
.Undetermined;
66
67
public
string
ToDetectedSummary
()
68
{
69
var parts =
new
List<string>();
70
71
if
(
ProblemVariant
!=
WolseyDetectedProblemVariant
.Undetermined)
72
{
73
parts.Add(
ProblemVariant
.ToString());
74
}
75
76
if
(
CapacityVariant
!=
WolseyDetectedCapacityVariant
.Undetermined)
77
{
78
parts.Add(
CapacityVariant
.ToString());
79
}
80
81
var variants =
new
List<string>();
82
83
if
(
HasSalesOption
)
84
{
85
variants.Add(
"SL"
);
86
}
87
88
if
(
HasSetupTimes
)
89
{
90
variants.Add(
"SET"
);
91
}
92
93
string
basic =
94
parts.Count == 0
95
?
"Undetermined"
96
:
string
.Join(
"-"
, parts);
97
98
if
(variants.Count > 0)
99
{
100
basic +=
"-{"
+
string
.Join(
","
, variants) +
"}"
;
101
}
102
103
string
counts =
104
$
"NK={NumberOfMachines};NI={NumberOfItems};NT={NumberOfPeriods};"
+
105
$
"NL={(NumberOfLevels?.ToString() ?? "
?
")}"
;
106
107
string
bucket =
108
BucketVariant
==
WolseyDetectedBucketVariant.Undetermined
109
? string.Empty
110
:
";"
+
BucketVariant
;
111
112
return
basic +
";"
+ counts + bucket;
113
}
114
}
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor
Lossless detected/source-preserved Wolsey descriptor.
Definition
WolseyHistoricalDescriptor.cs:32
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.ProblemVariant
WolseyDetectedProblemVariant ProblemVariant
Definition
WolseyHistoricalDescriptor.cs:33
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.NumberOfMachines
int NumberOfMachines
Definition
WolseyHistoricalDescriptor.cs:39
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.NumberOfPeriods
int NumberOfPeriods
Definition
WolseyHistoricalDescriptor.cs:43
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.HasExactCounters
bool HasExactCounters
Definition
WolseyHistoricalDescriptor.cs:58
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.NumberOfItems
int NumberOfItems
Definition
WolseyHistoricalDescriptor.cs:41
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.DeclaredMachineLabel
WolseyDeclaredMachineLabel DeclaredMachineLabel
Definition
WolseyHistoricalDescriptor.cs:51
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.MachineLabelWasInferred
bool MachineLabelWasInferred
Always false in alpha.32: IM/VM are never inferred.
Definition
WolseyHistoricalDescriptor.cs:56
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.HasDetectedProblemVariant
bool HasDetectedProblemVariant
Definition
WolseyHistoricalDescriptor.cs:64
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.ToDetectedSummary
string ToDetectedSummary()
Definition
WolseyHistoricalDescriptor.cs:67
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.BucketVariant
WolseyDetectedBucketVariant BucketVariant
Definition
WolseyHistoricalDescriptor.cs:37
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.HasSetupTimes
bool HasSetupTimes
Definition
WolseyHistoricalDescriptor.cs:49
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.CapacityVariant
WolseyDetectedCapacityVariant CapacityVariant
Definition
WolseyHistoricalDescriptor.cs:35
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.HasSalesOption
bool HasSalesOption
Definition
WolseyHistoricalDescriptor.cs:47
LotSizingDataModel.Instance.Classification.Historical.WolseyHistoricalDescriptor.NumberOfLevels
int? NumberOfLevels
Definition
WolseyHistoricalDescriptor.cs:45
LotSizingDataModel.Instance.Classification.Historical
Definition
WolseyHistoricalDescriptor.cs:3
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedBucketVariant
WolseyDetectedBucketVariant
Definition
WolseyHistoricalDescriptor.cs:21
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedBucketVariant.SB2
@ SB2
Definition
WolseyHistoricalDescriptor.cs:24
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedBucketVariant.BB
@ BB
Definition
WolseyHistoricalDescriptor.cs:25
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedBucketVariant.Undetermined
@ Undetermined
Definition
WolseyHistoricalDescriptor.cs:22
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedBucketVariant.SB1
@ SB1
Definition
WolseyHistoricalDescriptor.cs:23
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedProblemVariant
WolseyDetectedProblemVariant
Definition
WolseyHistoricalDescriptor.cs:6
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedProblemVariant.DLSI
@ DLSI
Definition
WolseyHistoricalDescriptor.cs:8
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedProblemVariant.DLS
@ DLS
Definition
WolseyHistoricalDescriptor.cs:9
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedProblemVariant.Undetermined
@ Undetermined
Definition
WolseyHistoricalDescriptor.cs:7
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedCapacityVariant
WolseyDetectedCapacityVariant
Definition
WolseyHistoricalDescriptor.cs:13
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedCapacityVariant.C
@ C
Definition
WolseyHistoricalDescriptor.cs:17
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedCapacityVariant.U
@ U
Definition
WolseyHistoricalDescriptor.cs:15
LotSizingDataModel.Instance.Classification.Historical.WolseyDetectedCapacityVariant.CC
@ CC
Definition
WolseyHistoricalDescriptor.cs:16
LotSizingDataModel.Instance.Historical
Definition
BitranYanasseApplicabilityAssessment.cs:1
LotSizingDataModel.Instance.Historical.WolseyDeclaredMachineLabel
WolseyDeclaredMachineLabel
Wolsey machine labels preserved from the source without semantic inference.
Definition
HistoricalSemanticsMetadata.cs:44
LotSizingDataModel.Instance
Classification
Historical
WolseyHistoricalDescriptor.cs
Generated by
1.17.0