18 ArgumentNullException.ThrowIfNull(problem);
24 _demandPrefix =
new double[horizon + 1];
25 _holdingPrefix =
new double[horizon + 1];
26 _weightedDemandPrefix =
new double[horizon + 1];
31 for (var period = 0; period < horizon; period++)
33 _demandPrefix[period + 1] = AddFinite(
34 _demandPrefix[period],
38 _weightedDemandPrefix[period + 1] = AddFinite(
39 _weightedDemandPrefix[period],
42 _holdingPrefix[period],
43 "demand-weighted holding prefix"),
44 "demand-weighted holding prefix");
46 _holdingPrefix[period + 1] = AddFinite(
47 _holdingPrefix[period],
49 "cumulative holding cost");
61 if ((uint)start >= (uint)_problem.Horizon ||
62 endInclusive < start ||
63 endInclusive >= _problem.Horizon)
65 throw new ArgumentOutOfRangeException();
68 var endExclusive = endInclusive + 1;
71 _demandPrefix[endExclusive] -
74 if (segmentDemand == 0.0)
79 var transformedUnitCost =
80 _problem.UnitProductionCosts[start] -
81 _holdingPrefix[start];
83 var variableCost = AddFinite(
87 "regeneration variable cost"),
88 _weightedDemandPrefix[endExclusive] -
89 _weightedDemandPrefix[start],
90 "regeneration variable cost");
93 _problem.SetupCosts[start],
95 "regeneration interval cost");