38 "Wagner-Whitin (l,S) separator";
48 ArgumentNullException.ThrowIfNull(problem);
58 IReadOnlyDictionary<int, double> variableValues)
60 ArgumentNullException.ThrowIfNull(problem);
61 ArgumentNullException.ThrowIfNull(formulation);
62 ArgumentNullException.ThrowIfNull(variableValues);
66 throw new NotSupportedException(
67 "The Wagner-Whitin separator requires " +
68 "p[t] + h[t] >= p[t+1] for every adjacent period.");
74 double[] cumulativeDemand =
103 var prefixProduction =
104 new double[problem.Horizon + 1];
110 prefixProduction[period + 1] =
111 prefixProduction[period] +
116 new List<LsSeparatedCut>(
121 var suffixWeightedSetup =
122 new double[problem.Horizon + 1];
136 suffixWeightedSetup[l + 1] =
149 suffixWeightedSetup[period] =
150 suffixWeightedSetup[period + 1] +
160 prefixProduction[k] +
161 suffixWeightedSetup[k];
174 new List<CutCoefficient>(
201 if (demandToL == 0.0)
216 if (coefficients.Count == 0)
Solver-independent definition of one ULS (l,S) inequality.
static double[] BuildCumulativeDemand(UlsProblem problem)
static void RequireAggregateVariables(UlsFormulation formulation)
static string GetVariableName(UlsFormulation formulation, IReadOnlyDictionary< int, int > semanticMap, int period, string family)
static double GetSemanticValue(IReadOnlyDictionary< int, int > semanticMap, int period, IReadOnlyDictionary< int, double > values, string family)
static double Efficacy(double violation, IEnumerable< CutCoefficient > coefficients)
static bool HasWagnerWhitinCosts(UlsProblem problem)
static double IntervalDemand(double[] cumulativeDemand, int first, int last)
One candidate (l,S) inequality produced by a separation procedure.
Separates the O(T^2) Wagner-Whitin specialization of the classical ULS (l,S) inequalities.
bool IsApplicable(UlsProblem problem)
Tests whether the separator is applicable to the problem.
IReadOnlyList< LsSeparatedCut > Separate(UlsProblem problem, UlsFormulation formulation, IReadOnlyDictionary< int, double > variableValues)
Generates the separator's candidate inequalities at one LP point.
string Name
Gets the stable separator name.
CutSeparationMethod Method
Gets the traceability method identifier.
Represents a validated classical uncapacitated lot-sizing problem.
int Horizon
Gets the number of planning periods.
Separates classical ULS (l,S) inequalities from a fractional aggregate lot-sizing solution.
LinearConstraintSense
Identifies the sense of a generated linear inequality.
CutSeparationMethod
Identifies the separation procedure that generated a cut.
Stores one nonzero coefficient of a generated linear inequality.