fix T-ALNS-RRD reproduction fidelity
This commit is contained in:
@@ -147,7 +147,12 @@ class ProblemContext:
|
||||
return (self.op_end - self.op_start) / self.n_intervals
|
||||
|
||||
def time_to_interval(self, minutes: float) -> int:
|
||||
"""Map time in minutes to interval index h ∈ [0, n_intervals-1]."""
|
||||
"""Map time to interval h.
|
||||
|
||||
The paper discretizes traffic feeds for 6:00-18:00. Customer windows may
|
||||
extend to 20:00, so departures after the final traffic bucket use
|
||||
hold-last-value semantics instead of extrapolating unobserved traffic.
|
||||
"""
|
||||
minutes = max(self.op_start, min(minutes, self.op_end - 1))
|
||||
return int((minutes - self.op_start) / self.interval_duration)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user