2using System.Xml.Serialization;
3using LotSizingDataModel.Core.Common;
4using LotSizingDataModel.Core.DecisionModel.Objectives;
5using LotSizingDataModel.Core.DecisionModel.Scheduling;
21[XmlType(TypeName =
"lotSizingProblemFeatures")]
24 private int _itemCount;
25 private int _planningHorizon;
26 private int _plantCount;
27 private int _workCenterCount;
28 private int _warehouseCount;
29 private int _supplierCount;
30 private int _distributionCenterCount;
31 private int _transportResourceCount;
33 private int _productStructureRelationshipCount;
34 private int _maximumProductStructureDepth;
39 private bool _hasDemand;
40 private bool _hasDeterministicDemand;
41 private bool _hasTimeVaryingDemand;
43 private bool _hasInitialInventory;
44 private bool _hasSafetyStockRequirements;
45 private bool _hasBacklogging;
46 private bool _hasLostSales;
48 private bool _hasProduction;
49 private bool _hasProductionCapacityConstraints;
50 private bool _hasSharedProductionCapacity;
51 private bool _hasTimeVaryingProductionCapacity;
53 private bool _hasSetupCosts;
54 private bool _hasSetupTimes;
55 private bool _hasStartUpCosts;
56 private bool _hasStartUpTimes;
58 private bool _hasProductionLeadTimes;
59 private bool _hasMinimumLotSizes;
60 private bool _hasMaximumLotSizes;
61 private bool _hasLotSizeMultiples;
62 private bool _hasGroupingConstraints;
64 private bool _hasAdditionalProductionCapacity;
65 private bool _hasAdditionalWarehouseCapacity;
66 private bool _hasAdditionalTransportCapacity;
68 private bool _hasPurchasing;
69 private bool _hasSupplierCapacityConstraints;
70 private bool _hasSupplierLeadTimes;
72 private bool _hasTransportation;
73 private bool _hasTransportCapacityConstraints;
74 private bool _hasTransportLeadTimes;
76 private bool _hasDistribution;
77 private bool _hasWarehouseCapacityConstraints;
79 private bool _isMultiSite;
80 private bool _hasFinancialConstraints;
81 private bool _hasMultipleObjectives;
82 private int _objectiveCriterionCount = 1;
83 private OptimizationObjectiveKind _primaryObjectiveKind =
84 OptimizationObjectiveKind.Economic;
87 private bool _hasIntegratedScheduling;
89 private bool _hasInitialSetupState;
90 private bool _hasSetupCarryOver;
92 private bool _hasSequenceDependentChangeoverTimes;
93 private bool _hasSequenceDependentChangeoverCosts;
94 private bool _hasMaximumSetupCountConstraints;
96 private int _schedulingResourceCount;
97 private bool _hasMaximumProducedItemCountConstraint;
98 private int _maximumProducedItemCountPerBucket;
99 private int _maximumSetupTransitionsPerBucket;
102 private bool _hasExplicitMicroPeriodGrid;
103 private int _totalMicroPeriodCount;
104 private int _maximumMicroPeriodCountPerMacroPeriod;
105 private bool _hasVariableMicroPeriodCount;
117 [XmlAttribute(
"itemCount")]
121 set => SetNonNegativeCount(
130 [XmlAttribute(
"planningHorizon")]
133 get => _planningHorizon;
134 set => SetNonNegativeCount(
135 ref _planningHorizon,
143 [XmlAttribute(
"plantCount")]
147 set => SetNonNegativeCount(
156 [XmlAttribute(
"workCenterCount")]
159 get => _workCenterCount;
160 set => SetNonNegativeCount(
161 ref _workCenterCount,
173 [XmlAttribute(
"warehouseCount")]
176 get => _warehouseCount;
177 set => SetNonNegativeCount(
186 [XmlAttribute(
"supplierCount")]
189 get => _supplierCount;
190 set => SetNonNegativeCount(
199 [XmlAttribute(
"distributionCenterCount")]
202 get => _distributionCenterCount;
203 set => SetNonNegativeCount(
204 ref _distributionCenterCount,
212 [XmlAttribute(
"transportResourceCount")]
215 get => _transportResourceCount;
216 set => SetNonNegativeCount(
217 ref _transportResourceCount,
226 [XmlAttribute(
"productStructureRelationshipCount")]
229 get => _productStructureRelationshipCount;
230 set => SetNonNegativeCount(
231 ref _productStructureRelationshipCount,
240 [XmlAttribute(
"maximumProductStructureDepth")]
243 get => _maximumProductStructureDepth;
244 set => SetNonNegativeCount(
245 ref _maximumProductStructureDepth,
253 [XmlAttribute(
"productStructureType")]
256 get => _productStructureType;
260 ref _productStructureType,
263 NotifyDerivedProperties();
272 [XmlAttribute(
"hasDemand")]
282 NotifyDerivedProperties();
291 [XmlAttribute(
"hasDeterministicDemand")]
294 get => _hasDeterministicDemand;
296 ref _hasDeterministicDemand,
304 [XmlAttribute(
"hasTimeVaryingDemand")]
307 get => _hasTimeVaryingDemand;
311 ref _hasTimeVaryingDemand,
314 NotifyDerivedProperties();
323 [XmlAttribute(
"hasInitialInventory")]
326 get => _hasInitialInventory;
328 ref _hasInitialInventory,
336 [XmlAttribute(
"hasSafetyStockRequirements")]
339 get => _hasSafetyStockRequirements;
341 ref _hasSafetyStockRequirements,
349 [XmlAttribute(
"hasBacklogging")]
352 get => _hasBacklogging;
362 [XmlAttribute(
"hasLostSales")]
365 get => _hasLostSales;
375 [XmlAttribute(
"hasProduction")]
378 get => _hasProduction;
388 [XmlAttribute(
"hasProductionCapacityConstraints")]
391 get => _hasProductionCapacityConstraints;
395 ref _hasProductionCapacityConstraints,
398 NotifyDerivedProperties();
407 [XmlAttribute(
"hasSharedProductionCapacity")]
410 get => _hasSharedProductionCapacity;
412 ref _hasSharedProductionCapacity,
420 [XmlAttribute(
"hasTimeVaryingProductionCapacity")]
423 get => _hasTimeVaryingProductionCapacity;
427 ref _hasTimeVaryingProductionCapacity,
430 NotifyDerivedProperties();
439 [XmlAttribute(
"hasSetupCosts")]
442 get => _hasSetupCosts;
452 [XmlAttribute(
"hasSetupTimes")]
455 get => _hasSetupTimes;
465 [XmlAttribute(
"hasStartUpCosts")]
468 get => _hasStartUpCosts;
470 ref _hasStartUpCosts,
478 [XmlAttribute(
"hasStartUpTimes")]
481 get => _hasStartUpTimes;
483 ref _hasStartUpTimes,
491 [XmlAttribute(
"hasProductionLeadTimes")]
494 get => _hasProductionLeadTimes;
496 ref _hasProductionLeadTimes,
504 [XmlAttribute(
"hasMinimumLotSizes")]
507 get => _hasMinimumLotSizes;
511 ref _hasMinimumLotSizes,
514 NotifyDerivedProperties();
523 [XmlAttribute(
"hasMaximumLotSizes")]
526 get => _hasMaximumLotSizes;
530 ref _hasMaximumLotSizes,
533 NotifyDerivedProperties();
542 [XmlAttribute(
"hasLotSizeMultiples")]
545 get => _hasLotSizeMultiples;
549 ref _hasLotSizeMultiples,
552 NotifyDerivedProperties();
561 [XmlAttribute(
"hasAdditionalProductionCapacity")]
564 get => _hasAdditionalProductionCapacity;
566 ref _hasAdditionalProductionCapacity,
574 [XmlAttribute(
"hasAdditionalWarehouseCapacity")]
577 get => _hasAdditionalWarehouseCapacity;
579 ref _hasAdditionalWarehouseCapacity,
587 [XmlAttribute(
"hasAdditionalTransportCapacity")]
590 get => _hasAdditionalTransportCapacity;
592 ref _hasAdditionalTransportCapacity,
600 [XmlAttribute(
"hasPurchasing")]
603 get => _hasPurchasing;
610 NotifyDerivedProperties();
619 [XmlAttribute(
"hasSupplierCapacityConstraints")]
622 get => _hasSupplierCapacityConstraints;
624 ref _hasSupplierCapacityConstraints,
632 [XmlAttribute(
"hasSupplierLeadTimes")]
635 get => _hasSupplierLeadTimes;
637 ref _hasSupplierLeadTimes,
645 [XmlAttribute(
"hasTransportation")]
648 get => _hasTransportation;
652 ref _hasTransportation,
655 NotifyDerivedProperties();
664 [XmlAttribute(
"hasTransportCapacityConstraints")]
667 get => _hasTransportCapacityConstraints;
669 ref _hasTransportCapacityConstraints,
677 [XmlAttribute(
"hasTransportLeadTimes")]
680 get => _hasTransportLeadTimes;
682 ref _hasTransportLeadTimes,
690 [XmlAttribute(
"hasDistribution")]
693 get => _hasDistribution;
697 ref _hasDistribution,
700 NotifyDerivedProperties();
709 [XmlAttribute(
"hasWarehouseCapacityConstraints")]
712 get => _hasWarehouseCapacityConstraints;
714 ref _hasWarehouseCapacityConstraints,
722 [XmlAttribute(
"isMultiSite")]
732 NotifyDerivedProperties();
741 [XmlAttribute(
"hasFinancialConstraints")]
744 get => _hasFinancialConstraints;
746 ref _hasFinancialConstraints,
754 [XmlAttribute(
"hasMultipleObjectives")]
757 get => _hasMultipleObjectives;
759 ref _hasMultipleObjectives,
901 string levelDescription =
906 string capacityDescription =
912 $
"{ItemCount} item(s), " +
913 $
"{PlanningHorizon} period(s), " +
914 $
"{levelDescription}, " +
915 $
"{capacityDescription}, " +
916 $
"{ProductStructureType}";
919 private void SetNonNegativeCount(
926 throw new ArgumentOutOfRangeException(
929 "The value cannot be negative.");
937 NotifyDerivedProperties();
942 [XmlAttribute(
"objectiveCriterionCount")]
945 get => _objectiveCriterionCount;
946 set => SetNonNegativeCount(
947 ref _objectiveCriterionCount,
952 [XmlAttribute(
"primaryObjectiveKind")]
955 get => _primaryObjectiveKind;
957 ref _primaryObjectiveKind,
961 [XmlAttribute(
"objectiveAggregationMode")]
964 get => _objectiveAggregationMode;
966 ref _objectiveAggregationMode,
970 [XmlAttribute(
"hasIntegratedScheduling")]
973 get => _hasIntegratedScheduling;
974 set => SetProperty(ref _hasIntegratedScheduling, value);
977 [XmlAttribute(
"schedulingBucketMode")]
980 get => _schedulingBucketMode;
981 set => SetProperty(ref _schedulingBucketMode, value);
984 [XmlAttribute(
"hasInitialSetupState")]
987 get => _hasInitialSetupState;
988 set => SetProperty(ref _hasInitialSetupState, value);
991 [XmlAttribute(
"hasSetupCarryOver")]
994 get => _hasSetupCarryOver;
995 set => SetProperty(ref _hasSetupCarryOver, value);
998 [XmlAttribute(
"hasSequenceDependentChangeoverTimes")]
1001 get => _hasSequenceDependentChangeoverTimes;
1003 ref _hasSequenceDependentChangeoverTimes,
1007 [XmlAttribute(
"hasSequenceDependentChangeoverCosts")]
1010 get => _hasSequenceDependentChangeoverCosts;
1012 ref _hasSequenceDependentChangeoverCosts,
1016 [XmlAttribute(
"hasMaximumSetupCountConstraints")]
1019 get => _hasMaximumSetupCountConstraints;
1021 ref _hasMaximumSetupCountConstraints,
1025 [XmlAttribute(
"smallBucketProductionMode")]
1028 get => _smallBucketProductionMode;
1029 set => SetProperty(ref _smallBucketProductionMode, value);
1032 [XmlAttribute(
"schedulingResourceCount")]
1035 get => _schedulingResourceCount;
1036 set => SetNonNegativeCount(
1037 ref _schedulingResourceCount,
1042 [XmlAttribute(
"hasMaximumProducedItemCountConstraint")]
1045 get => _hasMaximumProducedItemCountConstraint;
1047 ref _hasMaximumProducedItemCountConstraint,
1051 [XmlAttribute(
"maximumProducedItemCountPerBucket")]
1054 get => _maximumProducedItemCountPerBucket;
1055 set => SetNonNegativeCount(
1056 ref _maximumProducedItemCountPerBucket,
1061 [XmlAttribute(
"maximumSetupTransitionsPerBucket")]
1064 get => _maximumSetupTransitionsPerBucket;
1065 set => SetNonNegativeCount(
1066 ref _maximumSetupTransitionsPerBucket,
1071 [XmlAttribute(
"microPeriodLengthMode")]
1074 get => _microPeriodLengthMode;
1075 set => SetProperty(ref _microPeriodLengthMode, value);
1078 [XmlAttribute(
"microPeriodAssignmentMode")]
1081 get => _microPeriodAssignmentMode;
1082 set => SetProperty(ref _microPeriodAssignmentMode, value);
1085 [XmlAttribute(
"hasExplicitMicroPeriodGrid")]
1088 get => _hasExplicitMicroPeriodGrid;
1089 set => SetProperty(ref _hasExplicitMicroPeriodGrid, value);
1092 [XmlAttribute(
"totalMicroPeriodCount")]
1095 get => _totalMicroPeriodCount;
1099 [XmlAttribute(
"maximumMicroPeriodCountPerMacroPeriod")]
1102 get => _maximumMicroPeriodCountPerMacroPeriod;
1106 [XmlAttribute(
"hasVariableMicroPeriodCount")]
1109 get => _hasVariableMicroPeriodCount;
1110 set => SetProperty(ref _hasVariableMicroPeriodCount, value);
1113 [XmlAttribute(
"hasGroupingConstraints")]
1116 get => _hasGroupingConstraints;
1117 set => SetProperty(ref _hasGroupingConstraints, value);
1120 [XmlAttribute(
"setupCarryOverPolicy")]
1123 get => _setupCarryOverPolicy;
1124 set => SetProperty(ref _setupCarryOverPolicy, value);
1127 private void NotifyDerivedProperties()
bool HasDistribution
Gets or sets a value indicating whether distribution decisions are represented.
bool HasDemand
Gets or sets a value indicating whether the instance contains demand data.
bool HasMultipleObjectives
Gets or sets a value indicating whether several objective criteria are represented.
bool HasFinancialConstraints
Gets or sets a value indicating whether explicit financial constraints are represented.
bool HasProductionLeadTimes
Gets or sets a value indicating whether production lead times are represented.
bool HasBacklogging
Gets or sets a value indicating whether unmet demand may be carried to later periods.
bool HasTransportCapacityConstraints
Gets or sets a value indicating whether transportation is subject to capacity constraints.
bool IsStructurallyUsable
Gets a value indicating whether the extracted feature profile contains the minimum structural informa...
bool HasTransportation
Gets or sets a value indicating whether transportation decisions are represented.
bool HasSupplierCapacityConstraints
Gets or sets a value indicating whether suppliers are subject to capacity constraints.
bool IsSingleLevel
Gets a value indicating whether the items are independent from a bill-of-materials perspective.
override string ToString()
int ItemCount
Gets or sets the number of items in the instance.
bool IsMultiLevel
Gets a value indicating whether the instance contains component-to-parent relationships.
MicroPeriodAssignmentMode MicroPeriodAssignmentMode
int SchedulingResourceCount
bool HasMaximumLotSizes
Gets or sets a value indicating whether at least one explicit maximum lot size is imposed.
bool IsSingleItem
Gets a value indicating whether the instance contains exactly one item.
bool IsCapacitated
Gets a value indicating whether at least one capacity family constrains the problem.
bool HasMinimumLotSizes
Gets or sets a value indicating whether at least one positive minimum lot size is imposed.
int DistributionCenterCount
Gets or sets the number of distribution centers.
SchedulingBucketMode SchedulingBucketMode
bool HasVariableMicroPeriodCount
bool HasInitialSetupState
bool HasStartUpCosts
Gets or sets a value indicating whether the model contains start-up costs distinct from setup costs.
int TotalMicroPeriodCount
bool HasLotSizeMultiples
Gets or sets a value indicating whether at least one lot size must be an integer multiple of a base s...
bool HasStartUpTimes
Gets or sets a value indicating whether the model contains start-up times distinct from setup times.
bool IsMultiPeriod
Gets a value indicating whether the planning horizon contains several periods.
int SupplierCount
Gets or sets the number of suppliers.
bool HasInitialInventory
Gets or sets a value indicating whether at least one positive initial-inventory value exists.
bool HasIntegratedScheduling
bool HasProduction
Gets or sets a value indicating whether the instance contains production decisions.
bool IsMultiItem
Gets a value indicating whether the instance contains several items.
bool HasMaximumProducedItemCountConstraint
bool HasAdditionalTransportCapacity
Gets or sets a value indicating whether additional transport capacity can be acquired or activated.
bool HasStationaryDemand
Gets a value indicating whether demand is constant across periods.
bool HasSupplierLeadTimes
Gets or sets a value indicating whether supplier delivery lead times are represented.
bool HasSetupTimes
Gets or sets a value indicating whether setups consume production-resource capacity.
bool IsSinglePeriod
Gets a value indicating whether the planning horizon contains exactly one period.
bool HasSupplyChainNetworkDecisions
Gets a value indicating whether the problem contains purchasing, transport or distribution decisions.
LotSizingProblemFeatures()
Initializes an empty lot-sizing problem-feature profile.
SetupCarryOverPolicy SetupCarryOverPolicy
bool HasExplicitMicroPeriodGrid
bool HasLostSales
Gets or sets a value indicating whether demand may be permanently lost.
bool HasSequenceDependentChangeoverCosts
ObjectiveAggregationMode ObjectiveAggregationMode
bool HasWarehouseCapacityConstraints
Gets or sets a value indicating whether storage is subject to warehouse-capacity constraints.
bool HasConstantProductionCapacity
Gets a value indicating whether production capacity is constant over time.
int MaximumProducedItemCountPerBucket
SmallBucketProductionMode SmallBucketProductionMode
bool HasSetupCosts
Gets or sets a value indicating whether at least one setup or fixed production cost exists.
int TransportResourceCount
Gets or sets the number of transport resources.
int PlantCount
Gets or sets the number of production plants.
ProductStructureType ProductStructureType
Gets or sets the detected product-structure category.
bool HasAdditionalProductionCapacity
Gets or sets a value indicating whether additional production capacity can be acquired or activated.
bool HasProductStructure
Gets a value indicating whether at least one bill-of-materials relationship exists.
bool HasSharedProductionCapacity
Gets or sets a value indicating whether several production activities share at least one capacity.
int WorkCenterCount
Gets or sets the total number of work centers.
bool IsMultiSite
Gets or sets a value indicating whether the instance contains several physical decision sites.
int ProductStructureRelationshipCount
Gets or sets the number of distinct bill-of-materials relationships.
int ObjectiveCriterionCount
Gets or sets the number of enabled objective criteria.
bool HasAdditionalCapacity
Gets a value indicating whether at least one form of additional capacity is available.
bool HasGroupingConstraints
bool HasSequenceDependentChangeoverTimes
int MaximumSetupTransitionsPerBucket
MicroPeriodLengthMode MicroPeriodLengthMode
int WarehouseCount
Gets or sets the total number of warehouses.
int PlanningHorizon
Gets or sets the number of planning periods.
bool HasAdditionalWarehouseCapacity
Gets or sets a value indicating whether additional warehouse capacity can be acquired or activated.
bool HasProductionCapacityConstraints
Gets or sets a value indicating whether production is subject to capacity constraints.
int MaximumMicroPeriodCountPerMacroPeriod
bool HasTimeVaryingProductionCapacity
Gets or sets a value indicating whether at least one production capacity varies between periods.
bool HasSafetyStockRequirements
Gets or sets a value indicating whether the instance contains safety-stock requirements.
bool HasLotSizeRestrictions
Gets a value indicating whether at least one special lot-size restriction is present.
bool HasDeterministicDemand
Gets or sets a value indicating whether demand is deterministic.
bool HasPurchasing
Gets or sets a value indicating whether external purchasing decisions are represented.
bool HasTransportLeadTimes
Gets or sets a value indicating whether transport lead times are represented.
bool HasMaximumSetupCountConstraints
bool HasTimeVaryingDemand
Gets or sets a value indicating whether demand varies between planning periods.
OptimizationObjectiveKind PrimaryObjectiveKind
int MaximumProductStructureDepth
Gets or sets the maximum number of bill-of-materials relationships on a directed product-structure pa...