Skip to content

fix(pv/neuro-matrix): 加两处除零守卫并归正光伏 input 基准 - #163

Open
KujouShiori wants to merge 1 commit into
CTNH-Team:devfrom
KujouShiori:fix/pv-neuro-matrix-zero-divide
Open

KujouShiori wants to merge 1 commit into
CTNH-Team:devfrom
KujouShiori:fix/pv-neuro-matrix-zero-divide

Conversation

@KujouShiori

Copy link
Copy Markdown

摘要

  • 基站的 PHOTOVOLTAIC_ASSEMBER 分支按 recipe.data 的 input 求并行比值,input 缺失时 getInt 返回 0,浮点除零得 +Infinity,(int) 收窄成 Integer.MAX_VALUE,并行基数取到上限且时长倍率压成约 4.6e-10;现在 input 不大于 0 时 parallel 固定 1.0,配方按原样跑一次
  • 编译室 CalculateEquation 与 CalculateEquationNoise 直接除以 true_answer,range 缺失或过小时其为 0,比值成 NaN 或 Infinity,0.9 到 1.1 的成败判定恒假且非有限值经 putDouble("muti") 进 NBT;现在 true_answer 为 0 时返回 0.0
  • 光伏装配三条配方的 input 取 131072 的 1、2、16 倍,与机器里 true_eut 的基准同一,1 : 2 : 16 的比率不变
  • 现存 5 条 PHOTOVOLTAIC_ASSEMBER 配方 input 均大于 0,两条 COMPILER_RECIPE 的 range 均为 120,本 PR 只补守卫,不改既有配方行为

测试计划

  • 改动 3 个文件、8 增 4 删;本地检出没有 gradlew,也没有 modules/ 里的 GregTech-Modern、CTPP 等源码,未做编译与 datagen,请在 CI 或本地跑一次确认
  • 预期 runData 产物无差异:守卫只在缺失或为 0 的数据上生效,现有配方数据齐全
  • 预期三条光伏装配配方的 parallel 与时长倍率变化在 0.3% 以内,pv_coil_2 的 (int) 结果仍为 1
  • 编译室在 range 缺失或很小的配方下 eff 与 eff_fake 返回 0.0,MachineData 里 muti 为有限值,IDataItem 的 %.2f 提示可正常格式化

- 基站的 PHOTOVOLTAIC_ASSEMBER 分支按 recipe.data 的 input 求并行比值,input 缺失时 getInt 返回 0,浮点除零得 +Infinity,(int) 收窄成 Integer.MAX_VALUE,并行基数取到上限且时长倍率压成约 4.6e-10;现在 input 不大于 0 时 parallel 固定 1.0,配方按原样跑一次
- 编译室 CalculateEquation 与 CalculateEquationNoise 直接除以 true_answer,range 缺失或过小时其为 0,比值成 NaN 或 Infinity,0.9 到 1.1 的成败判定恒假且非有限值经 putDouble("muti") 进 NBT;现在 true_answer 为 0 时返回 0.0
- 光伏装配三条配方的 input 取 131072 的 1、2、16 倍,与机器里 true_eut 的基准同一,1 : 2 : 16 的比率不变
- 现存 5 条 PHOTOVOLTAIC_ASSEMBER 配方 input 均大于 0,两条 COMPILER_RECIPE 的 range 均为 120,本提交只补守卫,不改既有配方行为
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