Realignment Proposal

For tunnels where the final lining has been cast with locally-deficient thickness, the Realignment Proposal tool computes a corrected alignment that, when used, would shift the design template enough to restore the required thickness across all measured points.

The original tunnel is never modified. The tool clones the active tunnel into a new sibling tunnel under the project tree, with the computed horizontal/vertical offset profile baked into its alignment engine. You review by switching active tunnel between the original and the proposal — DR, clearance, and tolerance reports work against either. You keep what you want, delete the rest.

When to use

  • The final lining survey shows points inside the design template (negative DR — the lining is too thin).

  • You want to know whether shifting the alignment would let the design template “lean into” the deficient region and recover the required thickness, without re-pouring the lining.

How to use

  1. Right-click the tunnel in the project tree → Realignment Proposal….

  2. Measured line: pick the line that represents the as-built inner face of the final lining (e.g. MeasuredFinalLiningInside).

  3. Template line: pick the design template line that represents the theoretical inner face (e.g. FinalLiningInside).

  4. Required thickness (m): the minimum allowable clearance between the measured polyline and the (shifted) template at every point. E.g. 0.300 for 30 cm minimum.

  5. Bounds — |dh|, |dv|: the maximum lateral / vertical shift you allow per station. Caps the LP search range. E.g. 0.200 m.

  6. Smoothing — Window: rolling-mean window length in metres. 0 disables smoothing. E.g. 50.0 m.

  7. Smoothing — Max gradient: maximum gradient (%) of the offset profile. The constructibility safety net. E.g. 0.500 % = 5 mm/m.

  8. The preview charts update live. The top chart is dh (horizontal shift in metres) vs station; the bottom chart is dv. Grey = raw per-section LP output; blue = smoothed and gradient-capped (this is what gets baked into the proposal). Red dashed lines mark the ±bounds. Red triangle markers mark residual-deficit stations.

  9. Review the warnings list. Each row is one of:

    • Sta X — residual deficit Y mm at Z° — LP couldn’t fully satisfy the required thickness with the available shift bounds.

    • Sta X — gradient clip dh: Y mm -> Z mm — smoothing pass clipped a section’s shift to enforce the constructibility limit.

    • Sta X — skipped (no measured points / template missing) — section excluded from the LP entirely.

  10. Generate Proposal: clones the tunnel + applies the smoothed offset profile + appends to the project’s alignment list + activity log + Modified flag, then closes. The new tunnel becomes active so you immediately see the canvas re-render against it.

  11. Cancel: discards everything; no project mutation.

Reading the result

The proposal tunnel appears in the project tree with the suffix (Realignment proposal). Toggle between the original and the proposal via the tree popup Set Active; the canvas, DR column, clearance report, and tolerance report all switch between them. To accept the proposal, delete the original (or rename the proposal). To reject it, just delete the proposal. The project file isn’t saved until you save it — until then everything is in memory and discardable.

What happens behind the scenes

For each cross-section the tool resolves the measured polyline + the template polyline (template-line first, then a measured-line fallback matching DeviationLine) and runs Engine.ComputePointInfos to derive the per-point clearance + outward unit normal. It then solves a small LP per section:

maximise z
subject to c_i - dh*nx_i - dv*ny_i >= z + RequiredThickness
           |dh| <= DhMax, |dv| <= DvMax

z >= 0 means the section is satisfied; z < 0 means residual deficit |z| (warning). The per-section (dh, dv) series is then smoothed (rolling mean) and clipped (forward + backward gradient cap) and written as one piecewise-linear segment per pair of adjacent valid sections into the new alignment’s HorizontalOffset / VerticalOffset chainage collections.

Limitations

  • One (measured, template) line pair per run.

  • The math is one-shot: it does not iteratively re-project measured points onto the proposal alignment. For cm-scale shifts on realistic tunnel curvature, the second-order projection error is sub-mm and well below survey noise; if you ever see evidence the second-order effect matters, run the tool a second time against the proposal — each round corrects relative to its current state.

  • A section that is wildly inside the design (deficit > available bounds) cannot be fixed by any (dh, dv); the LP returns the bound-corner solution and flags a residual-deficit warning. The user decides whether to proceed.

Save Report

The Save Report… button on the Realignment Proposal dialog exports a PDF deliverable showing the full realignment analysis without having to first commit the proposal. The report can be emailed to a senior reviewer; once they approve, you come back to the dialog and click Generate Proposal (or pick different inputs and try again).

The report contains:

  1. Cover page — project, tunnel, proposal name, generation date.

  2. Parameters & headline stats — every input that drove the math (lines, threshold, bounds, smoothing knobs) plus aggregated counts (sections analysed, satisfied, residual, skipped, gradient clips, max residual mm, max applied dh/dv mm). One paragraph explains the LP and smoothing pipeline.

  3. Longitudinal charts — separate full-page charts of dh and dv versus station. Raw per-section LP output (grey, thin) is overlaid by the smoothed series (blue, thicker). Red dashed lines mark ±DhMax / ±DvMax. Red triangles at the top axis mark sections that ended up with residual deficits.

  4. Per-section adjustments table — every analysed section, with raw and smoothed dh/dv (mm), residual mm if any, and a status badge (precedence: skipped > residual > clipped > satisfied).

  5. Offset profile segments table — the (StartSta, EndSta, dh start, dh end, dv start, dv end) tuples being written to the new alignment’s HOffset / VOffset chainage collections.

  6. Warnings list — grouped by kind: residual deficits, gradient clips, skipped sections.

  7. Per-deficient-section pages — for each section with residual deficit > 0, a page showing:

    • The section sketch: original template (dashed grey), shifted template (solid blue), measured polyline (orange), the worst 10 deficient measured points (red filled circles, 1-based index labels), the shift vector arrow from origin to (dh, dv) with its mm label, and origin crosshatch.

    • A constraint table with the same 10 points: angle, original clearance (mm), c after shift (mm), and a per-point status (deficient / ok).

Save Report does not modify the project — it is a read-only export. You can run it any number of times with different inputs without losing the option to Cancel or Generate the proposal.