LotSizingDataModel.Solution
2.0.1
Solution objects for production, setup, inventory and related decisions.
Loading...
Searching...
No Matches
LotSizingSolution.ClosedLoop.cs
Go to the documentation of this file.
1
using
System.Linq;
2
using
System.Xml.Serialization;
3
using
LotSizingDataModel.Solution.Decisions
;
4
5
namespace
LotSizingDataModel.Solution
;
6
7
public
sealed
partial class
LotSizingSolution
8
{
9
[XmlArray(
"closedLoopDecisions"
)]
10
[XmlArrayItem(
"closedLoopDecision"
)]
11
public
List<ClosedLoopDecision>
ClosedLoopDecisions
12
{
13
get
;
14
} =
new
();
15
16
[XmlIgnore]
17
public
int
ClosedLoopDecisionCount
=>
18
ClosedLoopDecisions
.Count;
19
20
[XmlIgnore]
21
public
bool
HasValidClosedLoopDecisions
=>
22
ClosedLoopDecisions
.All(
23
decision =>
24
decision is not
null
&&
25
decision.IsInternallyValid &&
26
decision.PlanningHorizon ==
27
PlanningHorizon
) &&
28
ClosedLoopDecisions
29
.Select(
30
decision =>
31
decision.ReturnStreamId)
32
.Distinct()
33
.Count() ==
34
ClosedLoopDecisions
.Count;
35
36
public
ClosedLoopDecision
?
FindClosedLoopDecision
(
37
int
returnStreamId)
38
{
39
return
ClosedLoopDecisions
.FirstOrDefault(
40
decision =>
41
decision.ReturnStreamId ==
42
returnStreamId);
43
}
44
45
public
void
ResizeClosedLoopDecisions
()
46
{
47
foreach
(
ClosedLoopDecision
decision
48
in
ClosedLoopDecisions
)
49
{
50
decision.
ResizeTimeSeries
(
51
PlanningHorizon
);
52
}
53
}
54
}
LotSizingDataModel.Solution.Decisions.ClosedLoopDecision
Definition
ClosedLoopDecision.cs:13
LotSizingDataModel.Solution.Decisions.ClosedLoopDecision.ResizeTimeSeries
void ResizeTimeSeries(int periodCount)
Definition
ClosedLoopDecision.cs:109
LotSizingDataModel.Solution.LotSizingSolution.FindClosedLoopDecision
ClosedLoopDecision? FindClosedLoopDecision(int returnStreamId)
Definition
LotSizingSolution.ClosedLoop.cs:36
LotSizingDataModel.Solution.LotSizingSolution.ResizeClosedLoopDecisions
void ResizeClosedLoopDecisions()
Definition
LotSizingSolution.ClosedLoop.cs:45
LotSizingDataModel.Solution.LotSizingSolution.ClosedLoopDecisionCount
int ClosedLoopDecisionCount
Definition
LotSizingSolution.ClosedLoop.cs:17
LotSizingDataModel.Solution.LotSizingSolution.LotSizingSolution
LotSizingSolution()
Initializes an empty lot-sizing solution.
Definition
LotSizingSolution.cs:69
LotSizingDataModel.Solution.LotSizingSolution.PlanningHorizon
int PlanningHorizon
Gets or sets the number of planning periods represented by the solution.
Definition
LotSizingSolution.cs:241
LotSizingDataModel.Solution.LotSizingSolution.ClosedLoopDecisions
List< ClosedLoopDecision > ClosedLoopDecisions
Definition
LotSizingSolution.ClosedLoop.cs:12
LotSizingDataModel.Solution.LotSizingSolution.HasValidClosedLoopDecisions
bool HasValidClosedLoopDecisions
Definition
LotSizingSolution.ClosedLoop.cs:21
LotSizingDataModel.Solution.Decisions
Definition
ClosedLoopDecision.cs:6
LotSizingDataModel.Solution
Definition
AlgorithmParameter.cs:4
LotSizingDataModel.Solution
LotSizingSolution.ClosedLoop.cs
Generated by
1.17.0