LotSizingDataModel.Instance 2.0.1
Lot-sizing instance representation, descriptors and problem characterization.
Loading...
Searching...
No Matches
DirectedSupplyNetworkDescriptor.cs
Go to the documentation of this file.
2
3/// <summary>
4/// Immutable analysis result for one directed physical supply network.
5/// </summary>
7{
8 public IReadOnlyList<SupplyNetworkNodeDescriptor> Nodes { get; init; } =
9 Array.Empty<SupplyNetworkNodeDescriptor>();
10
11 public IReadOnlyList<SupplyNetworkArcDescriptor> Arcs { get; init; } =
12 Array.Empty<SupplyNetworkArcDescriptor>();
13
14 public SupplyNetworkTopologyType Topology { get; init; } =
16
17 public bool HasCycles { get; init; }
18
19 /// <summary>
20 /// Gets the number of facility echelons when the graph is acyclic.
21 /// Null means that a longest-path echelon count is not defined because
22 /// the physical graph contains a directed cycle.
23 /// </summary>
24 public int? EchelonCount { get; init; }
25
26 public int NodeCount => Nodes.Count;
27 public int ArcCount => Arcs.Count;
28 public int SourceCount => Nodes.Count(node => node.IsSource);
29 public int SinkCount => Nodes.Count(node => node.IsSink);
30
31 public IReadOnlyList<string> SourceKeys =>
32 Nodes.Where(node => node.IsSource).Select(node => node.Key).ToArray();
33
34 public IReadOnlyList<string> SinkKeys =>
35 Nodes.Where(node => node.IsSink).Select(node => node.Key).ToArray();
36}
Immutable analysis result for one directed physical supply network.
int? EchelonCount
Gets the number of facility echelons when the graph is acyclic. Null means that a longest-path echelo...
Describes one aggregated physical forward-flow relationship.
SupplyNetworkTopologyType
Classifies the directed physical topology of a supply-flow network.