|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0012 |
| Class | BUG |
| Severity | 2 |
| Status | blocked |
| Models | Seine/Operation |
| Found | 2026-09-15 audit (a7d080d) |
| Decision needed | Is 0.7 m/s the intended winch rate that WinchHaulSpeed should default to? Then replace the literal with the parameter; land with FISH-0011. |
The towing phase is sized from the WinchHaulSpeed parameter, src/seine/SeineOperation.cpp:87 (with m_winchHaulSpeed read at :36, default 0.5):
The hauling itself runs at a literal 0.7, src/seine/SeineOperation.cpp:257:
m_winchHaulSpeed appears nowhere else — grep -n m_winchHaulSpeed src/seine/SeineOperation.cpp returns lines 36 and 87 only. The documented meaning of WinchHaulSpeed is "The winch speed during hauling (m/s)" (src/seine/SeineOperation.h:23), which is what line 257 implements with a different number. The class documentation and the OpenWiki page both read the towing phase as "towing
lasts as long as hauling the warps will take" — an intent that only holds if the two rates are the same.
With the defaults the winch hauls 40 % faster (0.7 m/s) than the schedule assumes (0.5 m/s), so the warps reach the floor well before the hauling phase is scheduled to end, and the vessel keeps running at HaulSpeed with the gear already fully in. Changing WinchHaulSpeed moves the phase boundaries but not the winch, so the two drift further apart in either direction — the parameter appears to work (timings change) while the physical rate never does. This is the same class of defect as FISH-0011 and in the same statement: line 257's two constants — the rate 0.7 and the floor m_minWarpLength, itself clobbered to 20 — are both disconnected from their parameters.
At src/seine/SeineOperation.cpp:257:
which makes the parameter mean what it is documented to mean and restores the invariant that the towing phase lasts exactly as long as hauling will take — the invariant line 87 is written to express. The starboard warp then copies the port warp, as it already does, so only the one line changes. If instead 0.7 is the gear's true rate, the honest fix is to default WinchHaulSpeed to 0.7 and still use it at line 257, rather than keeping two numbers.
Owner question: is 0.7 m/s the real winch capability, or a forgotten test value? Not decidable from the code. Land together with FISH-0011: same statement, same test; fixing one without the other leaves the schedule and the winch inconsistent.
Depends on FISH-0001 and shares its scenario with FISH-0011. In tests/in/SimObj-SeineOperation/, set WarpLength = "500", MinWarpLength = "50", WinchHaulSpeed = "0.5" and log PWarpLength against time through the hauling phase. Assert the slope of the logged warp length is −0.5 m/s, and that the length reaches its floor at the same time the phase changes to Phase_Finished. Today the slope is −0.7 and the floor is reached early — two independent red assertions, one per item.
Changes the hauling trajectory of every seine model, and with it the gear geometry over the whole hauling phase. Nothing in-repo uses Seine/Operation.
Re-confirmed at HEAD: warps are hauled at the literal 0.7 m/s (SeineOperation.cpp:257) while the schedule is computed from m_winchHaulSpeed (line 87), so the two are inconsistent whenever WinchHaulSpeed is not 0.7. Replacing the literal with the parameter changes results for every seine model, and whether 0.7 m/s is the real winch rate that the parameter should default to is model knowledge. Owner question: is 0.7 m/s the intended rate? Land with FISH-0011.