17 int PositiveDemandPeriods,
18 bool HasNoSpeculativeMotiveCosts,
19 bool HasConstantSetupCosts,
20 bool HasConstantUnitProductionCosts,
21 bool HasConstantHoldingCosts)
27 Horizon == 0 ? 0.0 : (double)PositiveDemandPeriods / Horizon;
57 ArgumentNullException.ThrowIfNull(problem);
65 var positiveDemandPeriods = 0;
66 var constantSetup =
true;
67 var constantProduction =
true;
68 var constantHolding =
true;
70 var firstSetup = setupCosts[0];
71 var firstProduction = productionCosts[0];
72 var firstHolding = holdingCosts[0];
74 for (var period = 0; period < horizon; period++)
76 if (demands[period] > 0.0)
78 positiveDemandPeriods++;
81 if (setupCosts[period] != firstSetup)
83 constantSetup =
false;
86 if (productionCosts[period] != firstProduction)
88 constantProduction =
false;
91 if (holdingCosts[period] != firstHolding)
93 constantHolding =
false;
100 positiveDemandPeriods,
Represents a validated classical uncapacitated lot-sizing problem.
double TotalDemand
Gets the total demand over the complete planning horizon.
bool HasNoSpeculativeMotiveCosts
Gets whether the immutable problem satisfies the no-speculative-motive cost condition used by the lin...
ReadOnlySpan< double > UnitProductionCosts
Gets unit production costs by period.
int Horizon
Gets the number of planning periods.
ReadOnlySpan< double > HoldingCosts
Gets end-of-period unit holding costs by period.
ReadOnlySpan< double > Demands
Gets demand by period.
ReadOnlySpan< double > SetupCosts
Gets fixed setup costs by period.
Computes solver-selection characteristics for a validated ULS problem.
static UlsProblemCharacteristics Analyze(UlsProblem problem)
Analyzes the problem in one linear pass.
Describes inexpensive structural and cost characteristics used to select an exact ULS solution strate...
double DemandDensity
Gets the fraction of periods carrying strictly positive demand.