直骨架的研究

这是本文档旧的修订版!


I’m going to do three things to move this forward: • Inspect the tail of your latest debug log to see where time stalls happen and whether our time “kick” is taking effect. • Search the codebase for places that may be re-enqueuing edges with stale/zero times. • Patch those spots to enforce strictly monotonic event times.

What I did just now: 1) Read the latest log tail • Observations: the stall-kick worked at the beginning (events at 1e-6 and 2e-6 processed), then a SPLIT_EVENT at t=6.909897 fired. Immediately after, I still see many Vertex.MovedPosition logs at “当前时间: 0”, which suggests some recomputation paths still call MovedPosition with 0 or re-enqueue events near or at the current time.

2) Searched the code for MovedPosition and direct heap updates • I searched all MovedPosition call sites and the event re-queue/update paths. • I found several direct calls to eventQueue.HeapUpdateKey(…) inside: ◦ Skeleton.handleMultiStartEvent.cs ◦ Skeleton.handleMultiSplitEvent.cs • These were re-queueing edges using raw Graph.calcEdgeVanishTime(e) without clamping to the current algorithm time. That can reintroduce near-current or back-in-time events and cause micro-step loops.

3) Applied patches to enforce monotonic event times in MultiStart/MultiSplit • Replaced all direct eventQueue.HeapUpdateKey(…) in MultiStart/MultiSplit with our monotonic helper, which clamps event time to be at least _dbgCurTime + 1e-9: ◦ __RecomputeAndUpdateEdge(e) • For new edges inserted during MultiStart, I also clamp the initial vanish time before insertion: ◦ t = Graph.calcEdgeVanishTime(e) ◦ if (double.IsNaN(t) || t < _dbgCurTime + 1e-9) t = _dbgCurTime + 1e-9 ◦ e.VanishTime = t; eventQueue.minHeapInsert(e) • These changes ensure any event times after MultiStart/MultiSplit strictly advance beyond the current event time, aligning with the stall-kick we already added at extraction time.

What I propose next • Please rerun the star/concave polygon case with the updated code. • If it still appears stuck, share the last ~200 lines of the updated log again so I can confirm whether: ◦ Any remaining direct re-queues with stale times exist. ◦ The “kick” is firing repeatedly. ◦ Any adjacency violations or iteration-cap warnings are printed.

If the issue persists, my next steps will be: • Audit any remaining places that compute vanish times (e.g., Graph code that sets initial vanish times when building motorcycle/split edges and then adds them to the queue) to ensure they are clamped appropriately when inserted. • Consider increasing the stall “kick” magnitude slightly if the geometry scale demands it, but I’d prefer to keep it minimal unless the logs indicate repeated re-kicks at the same time.

Would you like me to tail the new log once you run it again? If so, I can open the last 200–1000 lines to verify event progression.

该主题尚不存在

您访问的页面并不存在。如果允许,您可以使用创建该页面按钮来创建它。

  • 直骨架的研究.1758795433.txt.gz
  • 最后更改: 2025/09/25 18:17
  • 张叶安