35 "Regeneration-interval shortest-path formulation";
45 ArgumentNullException.ThrowIfNull(problem);
55 ArgumentNullException.ThrowIfNull(problem);
59 throw new NotSupportedException(
60 "ShortestPathFormulationBuilder requires " +
61 "p[t] + h[t] >= p[t+1] for every adjacent period.");
71 new Dictionary<(int From, int To), int>();
74 new List<(
int To,
int Variable)>[horizon + 1];
77 new List<(
int From,
int Variable)>[horizon + 1];
91 if (problem.
Demands[start] == 0.0)
97 $
"skip[{start},{start + 1}]");
100 double segmentDemand = 0.0;
102 for (
int end = start;
110 "shortest-path segment demand");
112 if (segmentDemand == 0.0)
124 $
"z[{start},{end + 1}]");
133 new List<LinearTerm>(
134 outgoing[node].Count +
135 incoming[node].Count);
137 foreach ((
int _,
int variable) in outgoing[node])
145 foreach ((
int _,
int variable) in incoming[node])
169 "Regeneration network formulation; Zangwill (1969), Management " +
170 "Science 15(9), 506-527; Evans (1985), DOI " +
171 "10.1016/0272-6963(85)90009-9; classical formulation taxonomy in " +
172 "Brahimi et al. (2006), DOI 10.1016/j.ejor.2004.01.054.",
174 "ULS-Shortest-Path"),
201 model.AddObjectiveTerm(
Represents a validated classical uncapacitated lot-sizing problem.
int Horizon
Gets the number of planning periods.
ReadOnlySpan< double > Demands
Gets demand by period.
LinearVariableType
Identifies the domain of a variable in a portable linear mathematical model.
LinearConstraintSense
Identifies the sense of a portable linear constraint.
Stores one coefficient of a portable linear expression.