LotSizingDataModel.Instance
2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
WolseyMachineClassification.cs
Go to the documentation of this file.
1
namespace
LotSizingDataModel.Instance.Historical.Wolsey
;
2
3
/// <summary>Bucket-size subfield in Wolsey's multi-item extension.</summary>
4
public
enum
WolseyBucketType
5
{
6
SB1
,
7
SB2
,
8
BB
9
}
10
11
/// <summary>
12
/// Capacity-utilization/setup/changeover markers in Wolsey's multi-item
13
/// extension.
14
/// </summary>
15
public
enum
WolseyMachineFeature
16
{
17
SET
,
18
ST
,
19
SQT
,
20
SQC
21
}
22
23
/// <summary>
24
/// Preserves the IM/VM machine-mode labels used in Wolsey's formal scheme.
25
/// </summary>
26
/// <remarks>
27
/// The historical symbols are preserved without expanding or reinterpreting
28
/// them here. Their exact wording is kept as source terminology until the
29
/// project has a verified primary-source definition suitable for semantic
30
/// mapping.
31
/// </remarks>
32
public
enum
WolseyMachineMode
33
{
34
IM
,
35
VM
36
}
37
38
/// <summary>
39
/// Typed representation of the machine block
40
/// {NK=#,[IM,VM],[LT]*,[SB1,SB2,BB],[SET,ST,SQT,SQC]*}.
41
/// </summary>
42
public
sealed
class
WolseyMachineClassification
43
{
44
public
WolseyMachineClassification
(
45
int
machineCount,
46
WolseyMachineMode
machineMode,
47
WolseyBucketType
bucketType,
48
bool
hasLeadTimes =
false
,
49
IEnumerable<WolseyMachineFeature>? features =
null
)
50
{
51
if
(machineCount <= 0)
52
{
53
throw
new
ArgumentOutOfRangeException(
54
nameof(machineCount),
55
machineCount,
56
"Wolsey NK must be strictly positive."
);
57
}
58
59
MachineCount
= machineCount;
60
MachineMode
= machineMode;
61
BucketType
= bucketType;
62
HasLeadTimes
= hasLeadTimes;
63
64
Features
=
65
(features ?? Array.Empty<
WolseyMachineFeature
>())
66
.Distinct()
67
.OrderBy(feature => (
int
)feature)
68
.ToArray();
69
}
70
71
public
int
MachineCount
{
get
; }
72
public
WolseyMachineMode
MachineMode
{
get
; }
73
public
bool
HasLeadTimes
{
get
; }
74
public
WolseyBucketType
BucketType
{
get
; }
75
public
IReadOnlyCollection<WolseyMachineFeature>
Features
{
get
; }
76
77
public
string
HistoricalCode
78
{
79
get
80
{
81
var parts =
82
new
List<string>
83
{
84
$
"NK={MachineCount}"
,
85
MachineMode
.ToString()
86
};
87
88
if
(
HasLeadTimes
)
89
{
90
parts.Add(
"LT"
);
91
}
92
93
parts.Add(
BucketType
.ToString());
94
95
parts.AddRange(
96
Features
.Select(feature => feature.ToString()));
97
98
return
99
"{"
+
100
string
.Join(
","
, parts) +
101
"}"
;
102
}
103
}
104
105
public
override
string
ToString
() =>
106
HistoricalCode
;
107
}
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.ToString
override string ToString()
Definition
WolseyMachineClassification.cs:105
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.MachineCount
int MachineCount
Definition
WolseyMachineClassification.cs:71
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.WolseyMachineClassification
WolseyMachineClassification(int machineCount, WolseyMachineMode machineMode, WolseyBucketType bucketType, bool hasLeadTimes=false, IEnumerable< WolseyMachineFeature >? features=null)
Definition
WolseyMachineClassification.cs:44
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.Features
IReadOnlyCollection< WolseyMachineFeature > Features
Definition
WolseyMachineClassification.cs:75
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.HasLeadTimes
bool HasLeadTimes
Definition
WolseyMachineClassification.cs:73
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.HistoricalCode
string HistoricalCode
Definition
WolseyMachineClassification.cs:78
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.MachineMode
WolseyMachineMode MachineMode
Definition
WolseyMachineClassification.cs:72
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineClassification.BucketType
WolseyBucketType BucketType
Definition
WolseyMachineClassification.cs:74
LotSizingDataModel.Instance.Historical.Wolsey
Definition
WolseyCapacityRegime.cs:1
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineFeature
WolseyMachineFeature
Capacity-utilization/setup/changeover markers in Wolsey's multi-item extension.
Definition
WolseyMachineClassification.cs:16
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineFeature.SQT
@ SQT
Definition
WolseyMachineClassification.cs:19
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineFeature.SQC
@ SQC
Definition
WolseyMachineClassification.cs:20
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineFeature.SET
@ SET
Definition
WolseyMachineClassification.cs:17
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineFeature.ST
@ ST
Definition
WolseyMachineClassification.cs:18
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineMode
WolseyMachineMode
Preserves the IM/VM machine-mode labels used in Wolsey's formal scheme.
Definition
WolseyMachineClassification.cs:33
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineMode.VM
@ VM
Definition
WolseyMachineClassification.cs:35
LotSizingDataModel.Instance.Historical.Wolsey.WolseyMachineMode.IM
@ IM
Definition
WolseyMachineClassification.cs:34
LotSizingDataModel.Instance.Historical.Wolsey.WolseyBucketType
WolseyBucketType
Bucket-size subfield in Wolsey's multi-item extension.
Definition
WolseyMachineClassification.cs:5
LotSizingDataModel.Instance.Historical.Wolsey.WolseyBucketType.SB2
@ SB2
Definition
WolseyMachineClassification.cs:7
LotSizingDataModel.Instance.Historical.Wolsey.WolseyBucketType.BB
@ BB
Definition
WolseyMachineClassification.cs:8
LotSizingDataModel.Instance.Historical.Wolsey.WolseyBucketType.SB1
@ SB1
Definition
WolseyMachineClassification.cs:6
LotSizingDataModel.Instance
Historical
Wolsey
WolseyMachineClassification.cs
Generated by
1.17.0