Skip to content

Add atomic Floor batch enqueue support - #3

Open
sun-tribunal wants to merge 7 commits into
abbccdd:mainfrom
sun-tribunal:A
Open

Add atomic Floor batch enqueue support#3
sun-tribunal wants to merge 7 commits into
abbccdd:mainfrom
sun-tribunal:A

Conversation

@sun-tribunal

Copy link
Copy Markdown

改动概述

  1. 代码改动(纯增量,零破坏)
    Core/Floor.h/.cpp:新增两个公有接口,diff 为 31 行纯新增、0 行删除,既有 8 个公共接口逐字未改:
    EnqueueBatch(ids, direction):原子整组 FIFO 入队,仅修改本层队列,无副作用
    Contains(id) noexcept:去重/一致性校验,只读不抛异常
    Core/Passenger.*:零改动,仅随套件回归
    Core/CommonTypes.h:零改动,未重复定义任何类型
  2. 测试与登记
    Tests/FloorTests.cpp:新增测试文件,10 场景 / 35 断言
    Tests/RunCoreTests.cmd、ElevatorSimulation.vcxproj/.filters:登记新测试
  3. 验证结果
    双架构(x64/x86)全量通过:160 场景 / 2715 断言 + 406 项冒烟基线,0 失败
    命名规则、接口完整性、公约合规(14/15 条)全部通过
  4. 遗留事项(需授权)
    README 未同步更新:接口行为表未补充 EnqueueBatch/Contains

Adds EnqueueBatch and Contains to Floor for atomic FIFO batch waiting-room inserts and duplicate checks. This keeps Floor queue semantics consistent across direction-specific queues, prevents partial batch inserts, and supports grouped passenger arrivals without changing existing APIs. Includes a focused Floor regression suite, project registration updates, and a test report documenting the A-part compliance and validation results.
Statistics: add FormatSummary, per-elevator full-load count and working time as pure increments (existing methods and snapshot unchanged)

Tests: add Statistics, System and Reliability suites; extend dispatch comparison harness to 8 scenarios (evening_peak/interfloor/saturation)

Register new suites in RunCoreTests.cmd and project filters; add PartF and reliability verification reports with measured results
Add docs/F_TestData.md with 13-scenario measured dataset; update PartF report to include Reliability suite (7 suites, 214 scenarios / 2888 checks) and today's change summary
合并 upstream 楼层客流统计后,Statistics::Reset 需要楼层数,PassengerCreated/PassengerBoarded 携带楼层与方向;更新 F 部分 Statistics 单元测试事件调用,断言口径不变。

@sun-tribunal sun-tribunal left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

模拟系统检验流程(Verification Process)说明

@sun-tribunal sun-tribunal reopened this Sep 6, 2026

@sun-tribunal sun-tribunal left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A部分conflict修改

@sun-tribunal sun-tribunal left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

合并 upstream 楼层客流统计后,Statistics::Reset 需要楼层数,PassengerCreated/携带楼层与方向;更新 F 部分 Statistics 单元测试事件调用,断言口径不变。

@sun-tribunal sun-tribunal left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F部分代码测试及Statistic

@sun-tribunal sun-tribunal left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds EnqueueBatch and Contains to Floor for atomic FIFO batch waiting-room inserts and duplicate checks. This keeps Floor queue semantics consistent across direction-specific queues, prevents partial batch inserts, and supports grouped passenger arrivals without changing existing APIs. Includes a focused Floor regression suite, project registration updates, and a test report documenting the A-part compliance and validation results.

@sun-tribunal sun-tribunal left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Statistics: add FormatSummary, per-elevator full-load count and working time as pure increments (existing methods and snapshot unchanged)

Tests: add Statistics, System and Reliability suites; extend dispatch comparison harness to 8 scenarios (evening_peak/interfloor/saturation)

Register new suites in RunCoreTests.cmd and project filters; add PartF and reliability verification reports with measured results

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.

1 participant