FA-69061 / Tide and marine navigation tables / Open access
High and low water extraction: Plateau midpoint is floored to a whole sample · case 01
Even-length stands are timed half an interval early.
ROOT CAUSE
Integer division is used on the index sum before scaling by dt.
THE FAILURE
Integer division is used on the index sum before scaling by dt.
Unsuccessful approach: Rounding the midpoint index uses bankers rounding and moves alternate stands.
Case contract
Input [h, dt, minr]: equally spaced heights every dt minutes. Interior extrema (plateaus collapse to their midpoint time) are candidates; series endpoints never are. A candidate of the same type as the last accepted event replaces it only if more extreme; otherwise a candidate whose height differs from the last accepted event by less than minr is ignored. Return [[type, minutes, height], ...].
Why this case matters
Tide tables and passage plans turn published predictions into go/no-go decisions about depth, clearance and timing.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
h,dt,minr=x
n=len(h)
ev=[]
i=1
while i<n-1:
j=i
while j+1<n-1 and h[j+1]==h[i]: j+=1
if h[i]>h[i-1] and h[i]>h[j+1]: ev.append(['HW',(i+j)*dt/2,h[i]])
elif h[i]<h[i-1] and h[i]<h[j+1]: ev.append(['LW',(i+j)//2*dt,h[i]])
i=j+1
out=[]
for e in ev:
if out and out[-1][0]==e[0]:
if (e[2]>out[-1][2])==(e[0]=='HW'): out[-1]=e
continue
if out and abs(e[2]-out[-1][2])<minr: continue
out.append(e)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2]', [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2], [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]]), ('high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2]', [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2], [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]]), ('high and low water extraction [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3]', [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3], [['LW', 40.0, 1.0], ['HW', 100.0, 3.0], ['LW', 180.0, 0.4]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 90.0, 4.6], ['HW', 120.0, 4.9], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3], [['HW', 120.0, 4.9], ['LW', 210.0, 0.8]])], [('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 90.0, 4.6], ['HW', 120.0, 4.9], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3], [['HW', 120.0, 4.9], ['LW', 210.0, 0.8]]), ('high and low water extraction [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1]', [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1], []), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]]), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]])], [('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1]', [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1], []), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]]), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]]), ('high and low water extraction [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05]', [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05], [['HW', 30.0, 3.0], ['LW', 210.0, 0.4]]), ('high and low water extraction [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2]', [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2], [['HW', 30.0, 3.0], ['LW', 60.0, 2.8], ['HW', 90.0, 3.2], ['LW', 210.0, 0.4]]), ('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]])], [('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]]), ('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05]', [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05], [['HW', 30.0, 3.0], ['LW', 210.0, 0.4]]), ('high and low water extraction [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2]', [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2], [['HW', 30.0, 3.0], ['LW', 60.0, 2.8], ['HW', 90.0, 3.2], ['LW', 210.0, 0.4]]), ('high and low water extraction [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3]', [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3], [['HW', 30.0, 2.5], ['LW', 150.0, 0.2]]), ('high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2]', [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2], [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]]), ('high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2]', [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2], [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]])], [('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]]), ('high and low water extraction [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3]', [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3], [['HW', 30.0, 2.5], ['LW', 150.0, 0.2]]), ('high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2]', [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2], [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]]), ('high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2]', [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2], [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]]), ('high and low water extraction [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3]', [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3], [['LW', 40.0, 1.0], ['HW', 100.0, 3.0], ['LW', 180.0, 0.4]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5] | [['HW', 37.5, 5.0], ['LW', 90, 1.0]] | [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]] | Failed |
| high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2] | [['HW', 90.0, 4.1], ['LW', 210, 0.5]] | [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]] | Passed |
| high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2] | [['HW', 150.0, 4.0], ['LW', 360, 1.0]] | [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]] | Passed |
| high and low water extraction [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3] | [['LW', 40, 1.0], ['HW', 100.0, 3.0], ['LW', 180, 0.4]] | [['LW', 40.0, 1.0], ['HW', 100.0, 3.0], ['LW', 180.0, 0.4]] | Passed |
| high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2] | [['HW', 60.0, 4.8], ['LW', 210, 0.8]] | [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]] | Passed |
| high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2] | [['HW', 60.0, 4.8], ['LW', 90, 4.6], ['HW', 120.0, 4.9], ['LW', 210, 0.8]] | [['HW', 60.0, 4.8], ['LW', 90.0, 4.6], ['HW', 120.0, 4.9], ['LW', 210.0, 0.8]] | Passed |
| high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3] | [['HW', 120.0, 4.9], ['LW', 210, 0.8]] | [['HW', 120.0, 4.9], ['LW', 210.0, 0.8]] | Passed |
SHA-256 / 5592676a3c50a0b45edd39c898a7fe868015a325ec13e45bb8f8702025e716a2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
h,dt,minr=x
n=len(h)
ev=[]
i=1
while i<n-1:
j=i
while j+1<n-1 and h[j+1]==h[i]: j+=1
if h[i]>h[i-1] and h[i]>h[j+1]: ev.append(['HW',(i+j)*dt/2,h[i]])
elif h[i]<h[i-1] and h[i]<h[j+1]: ev.append(['LW',round((i+j)/2)*dt,h[i]])
i=j+1
out=[]
for e in ev:
if out and out[-1][0]==e[0]:
if (e[2]>out[-1][2])==(e[0]=='HW'): out[-1]=e
continue
if out and abs(e[2]-out[-1][2])<minr: continue
out.append(e)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2]', [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2], [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]]), ('high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2]', [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2], [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]]), ('high and low water extraction [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3]', [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3], [['LW', 40.0, 1.0], ['HW', 100.0, 3.0], ['LW', 180.0, 0.4]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 90.0, 4.6], ['HW', 120.0, 4.9], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3], [['HW', 120.0, 4.9], ['LW', 210.0, 0.8]])], [('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 90.0, 4.6], ['HW', 120.0, 4.9], ['LW', 210.0, 0.8]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3]', [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3], [['HW', 120.0, 4.9], ['LW', 210.0, 0.8]]), ('high and low water extraction [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1]', [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1], []), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]]), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]])], [('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1]', [[5.0, 4.0, 3.0, 2.0, 1.0], 60, 0.1], []), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 0.5], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]]), ('high and low water extraction [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0]', [[2.0, 1.0, 2.0, 1.0, 2.0, 1.0], 10, 1.0], [['LW', 10.0, 1.0], ['HW', 20.0, 2.0], ['LW', 30.0, 1.0], ['HW', 40.0, 2.0]]), ('high and low water extraction [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05]', [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05], [['HW', 30.0, 3.0], ['LW', 210.0, 0.4]]), ('high and low water extraction [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2]', [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2], [['HW', 30.0, 3.0], ['LW', 60.0, 2.8], ['HW', 90.0, 3.2], ['LW', 210.0, 0.4]]), ('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]])], [('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]]), ('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05]', [[1.0, 3.0, 2.99, 3.0, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.05], [['HW', 30.0, 3.0], ['LW', 210.0, 0.4]]), ('high and low water extraction [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2]', [[1.0, 3.0, 2.8, 3.2, 1.0, 0.5, 0.52, 0.4, 2.0], 30, 0.2], [['HW', 30.0, 3.0], ['LW', 60.0, 2.8], ['HW', 90.0, 3.2], ['LW', 210.0, 0.4]]), ('high and low water extraction [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3]', [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3], [['HW', 30.0, 2.5], ['LW', 150.0, 0.2]]), ('high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2]', [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2], [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]]), ('high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2]', [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2], [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]])], [('high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5]', [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5], [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]]), ('high and low water extraction [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1]', [[3.0, 1.0, 1.0, 3.0, 3.5, 3.5, 2.0], 45, 0.1], [['LW', 67.5, 1.0], ['HW', 202.5, 3.5]]), ('high and low water extraction [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3]', [[1.0, 2.5, 2.2, 2.5, 1.0, 0.2, 1.0], 30, 0.3], [['HW', 30.0, 2.5], ['LW', 150.0, 0.2]]), ('high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2]', [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2], [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]]), ('high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2]', [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2], [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]]), ('high and low water extraction [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3]', [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3], [['LW', 40.0, 1.0], ['HW', 100.0, 3.0], ['LW', 180.0, 0.4]]), ('high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2]', [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2], [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| high and low water extraction [[4.0, 5.0, 5.0, 5.0, 5.0, 4.0, 1.0, 1.0, 2.0], 15, 0.5] | [['HW', 37.5, 5.0], ['LW', 90, 1.0]] | [['HW', 37.5, 5.0], ['LW', 97.5, 1.0]] | Failed |
| high and low water extraction [[1.0, 2.0, 3.5, 4.1, 3.6, 2.0, 0.9, 0.5, 1.1, 2.4], 30, 0.2] | [['HW', 90.0, 4.1], ['LW', 210, 0.5]] | [['HW', 90.0, 4.1], ['LW', 210.0, 0.5]] | Passed |
| high and low water extraction [[1.0, 2.0, 4.0, 4.0, 3.0, 1.0, 1.0, 1.0, 2.0], 60, 0.2] | [['HW', 150.0, 4.0], ['LW', 360, 1.0]] | [['HW', 150.0, 4.0], ['LW', 360.0, 1.0]] | Passed |
| high and low water extraction [[3.0, 2.0, 1.0, 2.0, 3.0, 3.0, 3.0, 2.5, 1.2, 0.4, 1.5], 20, 0.3] | [['LW', 40, 1.0], ['HW', 100.0, 3.0], ['LW', 180, 0.4]] | [['LW', 40.0, 1.0], ['HW', 100.0, 3.0], ['LW', 180.0, 0.4]] | Passed |
| high and low water extraction [[0.5, 2.0, 4.8, 4.7, 4.75, 3.0, 1.0, 0.8, 1.5], 30, 0.2] | [['HW', 60.0, 4.8], ['LW', 210, 0.8]] | [['HW', 60.0, 4.8], ['LW', 210.0, 0.8]] | Passed |
| high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.2] | [['HW', 60.0, 4.8], ['LW', 90, 4.6], ['HW', 120.0, 4.9], ['LW', 210, 0.8]] | [['HW', 60.0, 4.8], ['LW', 90.0, 4.6], ['HW', 120.0, 4.9], ['LW', 210.0, 0.8]] | Passed |
| high and low water extraction [[0.5, 2.0, 4.8, 4.6, 4.9, 3.0, 1.0, 0.8, 1.5], 30, 0.3] | [['HW', 120.0, 4.9], ['LW', 210, 0.8]] | [['HW', 120.0, 4.9], ['LW', 210.0, 0.8]] | Passed |
SHA-256 / baf25fd071153542ac189b2bb9dc86eaba5c8cc4cac3480d7b551b01864b6586
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic toy model with stipulated rules and constants; not certified hydrographic software or a substitute for official tide tables. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:48:08.026536+00:00.
Case digest / 3915bdc6b7bbc6c4fddcb953f09d35c7d35fedc593725a9d68e64f02433b0f30