FA-93441 / Solar tracker geometry / Open access
Dual-axis azimuth cable-wrap slew: equal-distance tie-break · case 01
At exactly half a turn the drive winds toward the cable limit instead of the centre.
ROOT CAUSE
Ties between equally distant wraps ignore the range centre.
VERIFIED REPAIR
Break ties by distance to the range centre.
Unsuccessful approach: Preferring the wrap farthest from the centre winds the cable further.
Case contract
The azimuth drive has a continuous mechanical range [min_az, max_az] (may exceed 360 span). target_az is 0..359. Candidates are target + 360k inside the range; pick the smallest |move| from cur_az, ties to the candidate nearest the range centre, then the smaller. If none is in range, go to the limit with the smaller angular distance (mod 360) to the target, ties to min_az, status 'limit'. Return [position, move, status].
Why this case matters
Single-axis and dual-axis solar trackers turn a sun direction into actuator commands; a sign, frame or limit mistake points a whole plant away from the sun or into a mechanical stop.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(cur_az, target_az, min_az, max_az):
cands = []
k0 = math.floor((min_az - target_az) / 360)
for k in range(k0, k0 + 4):
c = target_az + 360 * k
if min_az <= c <= max_az:
cands.append(c)
center = (min_az + max_az) / 2
if not cands:
def ang(a):
d = (a - target_az) % 360
return min(d, 360 - d)
lim = min_az if ang(min_az) <= ang(max_az) else max_az
return [lim, lim - cur_az, 'limit']
best = min(cands, key=lambda c: (abs(c - cur_az), c))
return [best, best - cur_az, 'ok']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [180, 0, -90, 450], [0, -180, 'ok']],
['control 2', [180, 315, 0, 360], [315, 135, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [45, 225, -90, 450], [225, 180, 'ok']],
['control 2', [180, 180, -90, 450], [180, 0, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [45, 225, -270, 270],
[-135, -180, 'ok']],
['control 1', [0, 45, -90, 450], [45, 45, 'ok']],
['control 2', [360, 45, 0, 360], [45, -315, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [315, 135, 45, 315], [135, -180, 'ok']],
['control 2', [45, 135, 45, 315], [135, 90, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [45, 315, 0, 180], [0, -45, 'limit']],
['control 2', [315, 180, 0, 360], [180, -135, 'ok']]]]
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 |
|---|---|---|---|
| boundary: target exactly at max stop | [-90, -90, 'ok'] | [-90, -90, 'ok'] | Passed |
| normal: short way through north | [10, -340, 'ok'] | [10, -340, 'ok'] | Passed |
| boundary: target outside narrow range | [90, -90, 'limit'] | [90, -90, 'limit'] | Passed |
| regression: half-turn tie between wraps | [-270, -180, 'ok'] | [90, 180, 'ok'] | Failed |
| regression: equal-distance tie-break (partial repair) | [90, -180, 'ok'] | [90, -180, 'ok'] | Passed |
| control 1 | [0, -180, 'ok'] | [0, -180, 'ok'] | Passed |
| control 2 | [315, 135, 'ok'] | [315, 135, 'ok'] | Passed |
SHA-256 / acb66361f0ad5152060c79a921a2b4a6fc43f9006feea22f1172b27c17eb58f9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(cur_az, target_az, min_az, max_az):
cands = []
k0 = math.floor((min_az - target_az) / 360)
for k in range(k0, k0 + 4):
c = target_az + 360 * k
if min_az <= c <= max_az:
cands.append(c)
center = (min_az + max_az) / 2
if not cands:
def ang(a):
d = (a - target_az) % 360
return min(d, 360 - d)
lim = min_az if ang(min_az) <= ang(max_az) else max_az
return [lim, lim - cur_az, 'limit']
best = min(cands, key=lambda c: (abs(c - cur_az), -abs(c - center), c))
return [best, best - cur_az, 'ok']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [180, 0, -90, 450], [0, -180, 'ok']],
['control 2', [180, 315, 0, 360], [315, 135, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [45, 225, -90, 450], [225, 180, 'ok']],
['control 2', [180, 180, -90, 450], [180, 0, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [45, 225, -270, 270],
[-135, -180, 'ok']],
['control 1', [0, 45, -90, 450], [45, 45, 'ok']],
['control 2', [360, 45, 0, 360], [45, -315, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [315, 135, 45, 315], [135, -180, 'ok']],
['control 2', [45, 135, 45, 315], [135, 90, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [45, 315, 0, 180], [0, -45, 'limit']],
['control 2', [315, 180, 0, 360], [180, -135, 'ok']]]]
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 |
|---|---|---|---|
| boundary: target exactly at max stop | [-90, -90, 'ok'] | [-90, -90, 'ok'] | Passed |
| normal: short way through north | [10, -340, 'ok'] | [10, -340, 'ok'] | Passed |
| boundary: target outside narrow range | [90, -90, 'limit'] | [90, -90, 'limit'] | Passed |
| regression: half-turn tie between wraps | [-270, -180, 'ok'] | [90, 180, 'ok'] | Failed |
| regression: equal-distance tie-break (partial repair) | [450, 180, 'ok'] | [90, -180, 'ok'] | Failed |
| control 1 | [0, -180, 'ok'] | [0, -180, 'ok'] | Passed |
| control 2 | [315, 135, 'ok'] | [315, 135, 'ok'] | Passed |
SHA-256 / 05da87cbabbeb34286e8d5fabbfc871e62648a406d4dda8ae1c72aa2097d87a1
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(cur_az, target_az, min_az, max_az):
cands = []
k0 = math.floor((min_az - target_az) / 360)
for k in range(k0, k0 + 4):
c = target_az + 360 * k
if min_az <= c <= max_az:
cands.append(c)
center = (min_az + max_az) / 2
if not cands:
def ang(a):
d = (a - target_az) % 360
return min(d, 360 - d)
lim = min_az if ang(min_az) <= ang(max_az) else max_az
return [lim, lim - cur_az, 'limit']
best = min(cands, key=lambda c: (abs(c - cur_az), abs(c - center), c))
return [best, best - cur_az, 'ok']
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [180, 0, -90, 450], [0, -180, 'ok']],
['control 2', [180, 315, 0, 360], [315, 135, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [45, 225, -90, 450], [225, 180, 'ok']],
['control 2', [180, 180, -90, 450], [180, 0, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [45, 225, -270, 270],
[-135, -180, 'ok']],
['control 1', [0, 45, -90, 450], [45, 45, 'ok']],
['control 2', [360, 45, 0, 360], [45, -315, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [315, 135, 45, 315], [135, -180, 'ok']],
['control 2', [45, 135, 45, 315], [135, 90, 'ok']]],
[['boundary: target exactly at max stop', [0, 270, -270, 270], [-90, -90, 'ok']],
['normal: short way through north', [350, 10, -270, 270], [10, -340, 'ok']],
['boundary: target outside narrow range', [180, 0, 90, 270], [90, -90, 'limit']],
['regression: half-turn tie between wraps', [-90, 90, -270, 270], [90, 180, 'ok']],
['regression: equal-distance tie-break (partial repair)', [270, 90, -90, 450], [90, -180, 'ok']],
['control 1', [45, 315, 0, 180], [0, -45, 'limit']],
['control 2', [315, 180, 0, 360], [180, -135, 'ok']]]]
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 |
|---|---|---|---|
| boundary: target exactly at max stop | [-90, -90, 'ok'] | [-90, -90, 'ok'] | Passed |
| normal: short way through north | [10, -340, 'ok'] | [10, -340, 'ok'] | Passed |
| boundary: target outside narrow range | [90, -90, 'limit'] | [90, -90, 'limit'] | Passed |
| regression: half-turn tie between wraps | [90, 180, 'ok'] | [90, 180, 'ok'] | Passed |
| regression: equal-distance tie-break (partial repair) | [90, -180, 'ok'] | [90, -180, 'ok'] | Passed |
| control 1 | [0, -180, 'ok'] | [0, -180, 'ok'] | Passed |
| control 2 | [315, 135, 'ok'] | [315, 135, 'ok'] | Passed |
SHA-256 / 9ab13af02fe99130ed453b7ffeb3c6562391aed7c59d62cb0d1a556d2b25370b
Verification & scope
Deterministic stipulated toy contract for teaching; no claim of conformance with any standard, vendor protocol or production controller. 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:51:55.114795+00:00.
Case digest / 7ca269e7fd88f512c07eda59a35df5a898c6909ead8651d053e28e7efcf2e734