FA-68886 / Tide and marine navigation tables / Open access
Harmonic tide prediction: Prediction is referenced to mean sea level instead of chart datum · case 01
All heights are low by the datum offset and many are negative.
ROOT CAUSE
The mean level z0 above chart datum is never added.
VERIFIED REPAIR
Start the sum from z0.
Unsuccessful approach: Starting from -z0 applies the datum shift in the wrong direction.
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=0
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 [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 [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 [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 [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 [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 [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 [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 [0, 1.5, []]', [0, 1.5, []], 1.5)], [('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 [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 [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 [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 [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 [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 [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]]] | -0.2249 | 1.8751 | 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]]] | 0.2585 | 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]]] | 1.1364 | 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]]] | -0.1524 | 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]]] | -0.1775 | 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]]] | 1.5113 | 3.6113 | Failed |
| 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]]] | -0.7458 | 1.3542 | Failed |
SHA-256 / 8509264af310367ef8e8cc2b7f840cb1df693ec00ad36334b7c423693faaf3db
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*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 [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 [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 [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 [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 [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 [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 [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 [0, 1.5, []]', [0, 1.5, []], 1.5)], [('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 [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 [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 [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 [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 [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 [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]]] | -2.3249 | 1.8751 | 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]]] | -1.8415 | 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]]] | -0.9636 | 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]]] | -2.2524 | 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]]] | -2.2775 | 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]]] | -0.5887 | 3.6113 | Failed |
| 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]]] | -2.8458 | 1.3542 | Failed |
SHA-256 / a46de993d0c0099732dfa8926ed99e48088e976db12cb3c9a6f1514fa583914f
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 [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 [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 [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 [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 [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 [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 [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 [0, 1.5, []]', [0, 1.5, []], 1.5)], [('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 [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 [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 [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 [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 [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 [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 [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 |
| 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]]] | 1.3542 | 1.3542 | Passed |
SHA-256 / 76428624c2c2da11d3646dced55f0417084f9e371384c52be46abd30140a3dbd
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.386826+00:00.
Case digest / a86a3cee6b316d3ccbd8566f96b7fde767a6bb46136d188df25fdb31d5cb635e