FA-68871 / Tide and marine navigation tables / Open access
Harmonic tide prediction: Nodal factor is omitted from the amplitude · case 01
Predicted ranges are too small in years of strong lunar declination.
ROOT CAUSE
The amplitude uses H alone, ignoring the nodal modulation factor f.
VERIFIED REPAIR
Scale each constituent amplitude by f.
Unsuccessful approach: Applying f only when it exceeds one leaves reduced-amplitude years wrong.
Case contract
Input [t_minutes, z0, constituents]; each constituent is [H metres, g phase lag deg, speed deg/hour, nodal factor f, nodal phase u deg, equilibrium argument V0 deg]. Height above chart datum is z0 + sum f*H*cos(V0+u+speed*t_hours-g). Return rounded to 4 decimals.
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):
t,z0,cons=x
hours=t/60
h=z0
for H,g,spd,f,u,v0 in cons:
arg=(v0+u+spd*hours-g)%360
h+=H*math.cos(math.radians(arg))
return round(h,4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113)], [('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
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 |
|---|---|---|---|
| harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8835 | 1.8751 | Failed |
| harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]] | 0.2019 | 0.2259 | Failed |
| harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.3625 | 2.3585 | Failed |
| harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.2372 | 3.2364 | Failed |
| harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9728 | 1.9476 | Failed |
| harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9082 | 1.9225 | Failed |
| harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.5704 | 3.6113 | Failed |
SHA-256 / f6d8e790d7087602be86cfff69b6ee0812db6cb24bdcc3169d16f31aff914260
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
t,z0,cons=x
hours=t/60
h=z0
for H,g,spd,f,u,v0 in cons:
arg=(v0+u+spd*hours-g)%360
h+=(f if f>1 else 1)*H*math.cos(math.radians(arg))
return round(h,4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113)], [('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
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 |
|---|---|---|---|
| harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8751 | 1.8751 | Passed |
| harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]] | 0.2019 | 0.2259 | Failed |
| harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.3585 | 2.3585 | Passed |
| harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.2364 | 3.2364 | Passed |
| harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9476 | 1.9476 | Passed |
| harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9225 | 1.9225 | Passed |
| harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.6113 | 3.6113 | Passed |
SHA-256 / e644fa039a82b2979687224c5140c266432c62321f2428d973fa9dae3a4dcdb0
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
t,z0,cons=x
hours=t/60
h=z0
for H,g,spd,f,u,v0 in cons:
arg=(v0+u+spd*hours-g)%360
h+=f*H*math.cos(math.radians(arg))
return round(h,4)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113)], [('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.6113), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733)], [('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [1440, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.3542), ('harmonic tide prediction [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [0, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2733), ('harmonic tide prediction [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [200, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 4.1537), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071)], [('harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9476), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]]', [745, 3.0, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0]]], 3.2709), ('harmonic tide prediction [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]]', [90, 0.0, [[1.0, 0.0, 30.0, 1.0, 0.0, 0.0]]], 0.7071), ('harmonic tide prediction [0, 1.5, []]', [0, 1.5, []], 1.5), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277)], [('harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.9225), ('harmonic tide prediction [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [300, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 1.6646), ('harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.2259), ('harmonic tide prediction [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]]', [610, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]], 0.6277), ('harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 1.8751), ('harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 2.3585), ('harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]]', [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]], 3.2364)]]
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 |
|---|---|---|---|
| harmonic tide prediction [0, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.8751 | 1.8751 | Passed |
| harmonic tide prediction [0, 1.0, [[0.8, 270.0, 28.9841042, 0.97, 4.0, 90.0]]] | 0.2259 | 0.2259 | Passed |
| harmonic tide prediction [45, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 2.3585 | 2.3585 | Passed |
| harmonic tide prediction [180, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.2364 | 3.2364 | Passed |
| harmonic tide prediction [371, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9476 | 1.9476 | Passed |
| harmonic tide prediction [720, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 1.9225 | 1.9225 | Passed |
| harmonic tide prediction [1000, 2.1, [[1.2, 110.0, 28.9841042, 1.02, -2.1, 35.0], [0.4, 150.0, 30.0, 1.0, 0.0, 0.0], [0.25, 95.0, 15.0410686, 1.1, 8.5, 210.0]]] | 3.6113 | 3.6113 | Passed |
SHA-256 / 4459ecec59d87342cfe3bc32efa560469fd89139cb2f026c44f1c73fe9604c07
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:06.260145+00:00.
Case digest / 9493392157e09a02b10b1048fded20aa50d69da147496357bcca0fb472f65987