11 new double[problem.Horizon + 1];
13 ReadOnlySpan<double> demand =
16 for (
int period = problem.
Horizon - 1;
60 if (productionPeriod < 0 ||
61 demandPeriod < productionPeriod ||
62 demandPeriod >= problem.
Horizon)
64 throw new ArgumentOutOfRangeException();
70 for (
int period = productionPeriod;
71 period < demandPeriod;
78 "delivered unit cost");
89 double quantity = 0.0;
90 double variableCost = 0.0;
92 for (
int demandPeriod = start;
93 demandPeriod <= endInclusive;
103 "regeneration quantity");
114 "regeneration variable cost"),
115 "regeneration variable cost");
118 return quantity == 0.0
123 "regeneration arc cost");
130 period < problem.Horizon - 1;
133 double deliveredNext =
137 if (!
double.IsFinite(deliveredNext) ||
156 if (!
double.IsFinite(value))
158 throw new ArithmeticException(
159 $
"Numerical overflow while computing {operation}.");
173 if (!
double.IsFinite(value))
175 throw new ArithmeticException(
176 $
"Numerical overflow while computing {operation}.");
Represents a validated classical uncapacitated lot-sizing problem.
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.