Skip to content

[Application] Route guidance periods + compliance model#196

Merged
learncold merged 4 commits into
mainfrom
codex/route-guidance-periods
May 8, 2026
Merged

[Application] Route guidance periods + compliance model#196
learncold merged 4 commits into
mainfrom
codex/route-guidance-periods

Conversation

@95x8x9
Copy link
Copy Markdown
Collaborator

@95x8x9 95x8x9 commented May 5, 2026

Summary

  • Add Route guidance authoring tool (installable on exit zones and doors) + overlay marker.
  • Support multiple active time ranges via periods[]; empty periods => Always active.
  • Persist periods in project JSON (backward compatible with legacy startSeconds/endSeconds).
  • Apply guidance compliance using a logistic probability model driven by:
    • baseComplianceRate (0~1)
    • guidanceStrength (0~1)
    • maxDetourMeters (>=0)
    • per-agent guidancePropensity ~ Beta(2,2)
  • Improve tooltips and settings dialog copy/formatting; tooltip now shows all configured periods with line breaks.
  • Fix door-installed guidance “not working” cases by auto-selecting a valid guidedExitZoneId (adjacent exit or nearest exit).

Related Issue

Area

  • Engine
  • Domain
  • Application
  • Docs
  • Build
  • Analysis
  • Chore

Architecture Check

  • I kept the dependency direction application -> domain -> engine.
  • I did not add Qt UI code to src/domain.
  • I did not add domain or application dependencies to src/engine.
  • I used src/ as the include root.

Verification

  • cmake --preset windows-debug
  • cmake --build --preset build-debug
  • ctest --preset test-debug
  • Not run (reason below)

Additionally ran (CI no-app path):

  • cmake --build --preset build-no-app-debug
  • ctest --preset test-no-app-debug

Risks / Follow-up

  • The compliance model weights are heuristic defaults and may need calibration:
    • kStrengthBaseline = 0.55, kStrengthWeight = 4.0, kDetourWeight = 2.0, kPropensityWeight = 1.0
  • Tooltip and authoring currently list all configured periods; run-time view could be extended later to highlight the currently active period.

Compliance model details

Let:

  • detourMeters = max(0, guidedDistance - originalDistance) where distances are zone-route shortest path distances.
  • detourRatio = detourMeters / max(1e-6, maxDetourMeters)

Then:

  • `pFollow = sigmoid( logit(baseComplianceRate)
    • 4.0 * (guidanceStrength - 0.55)
    • 2.0 * detourRatio
    • 1.0 * logit(guidancePropensity) )`

pFollow is clamped to [0,1].

Agents sample follow/not-follow when the active guidance/period changes (active id includes :p<periodIndex>).

@95x8x9 95x8x9 requested a review from learncold as a code owner May 5, 2026 18:57
Copy link
Copy Markdown
Collaborator Author

95x8x9 commented May 7, 2026

추가 커밋 반영: [Domain] Reduce guidance toggle hitch

  • Route guidance 이벤트/period 전환 시 모든 에이전트를 한 프레임에 재경로 계산하던 부분을 per-frame budget으로 분산 처리해서 hitch를 줄였습니다.
  • 불필요한 재경로 계산 스킵(이미 같은 목적지/waypoints 유지 시) 및 detour(준수 확률용) 거리 계산 비용을 낮추는 최적화가 포함됩니다.
  • 현재 budget: kGuidanceReplanBudgetPerFrame = 50 (필요 시 튜닝 가능)

@learncold learncold merged commit 4bc5890 into main May 8, 2026
@learncold learncold deleted the codex/route-guidance-periods branch May 8, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Application/Domain] Route guidance: period(다중 구간) + door 설치 + tooltip/UI 개선

2 participants