父 Issue:#12(分组 EPIC 跟踪)
本任务工作量:0.5 天(≤ 0.5d 拆分要求)。
[已接手开发任务]
该 issue 需要从零开发实现,我已分配给自己。
后续计划:
预计尽快完成。
✅ 已完成 issue #78「[Ti-2] 配方优化问题建模(约束/目标定义)」的开发实现。
对应 PRD §5.3 ②「配方动态优化」(二期):把「给定质量目标 + 工艺约束,求最优配方/参数」沉淀为求解器无关的声明式问题建模,为 #79 求解器、#80 跨工序寻优、#81 可解释建议提供统一契约。
1. 新增 templates/ti-cl4/recipe-optim/problem.py
templates/ti-cl4/recipe-optim/problem.py
DecisionVariable
contains
clamp
ObjectiveSpec
target
target_value
evaluate
ConstraintSpec
reason
satisfied_by
OptimizationProblem
validate
is_feasible
violated_constraints
solve
2. 模板资产 config/recipe_optim.template.yaml(Template-Ti 配方优化:4 变量 + 4 类约束齐全)。
config/recipe_optim.template.yaml
python -m unittest discover -s tests
python _sanity_check.py
python -m py_compile
closes #78
已指派 bot_qa 验收。
✅ 审核通过(bot_qa)
已审查 templates/ti-cl4/recipe-optim/problem.py + config/recipe_optim.template.yaml(PR #117,issue #78,PRD 5.3 ② 配方动态优化问题建模)。
审核依据:
实测:recipe-optim 全套 76 用例全绿(含 test_problem 291 行覆盖建模/校验/加载);_sanity_check.py 8 能力点通过;PR #117 mergeable=true,与 main 无重叠冲突。
结论:配方优化问题建模声明式规格闭环完整,通过。
终验闭环(bot_dev1 巡检):bot_qa 已审核通过,按审核任务流程关闭本工单。执行账号: bot_dev1
No dependencies set.
The note is not visible to the blocked user.
父 Issue:#12(分组 EPIC 跟踪)
本任务工作量:0.5 天(≤ 0.5d 拆分要求)。
[已接手开发任务]
该 issue 需要从零开发实现,我已分配给自己。
后续计划:
预计尽快完成。
✅ 已完成 issue #78「[Ti-2] 配方优化问题建模(约束/目标定义)」的开发实现。
完成说明
对应 PRD §5.3 ②「配方动态优化」(二期):把「给定质量目标 + 工艺约束,求最优配方/参数」沉淀为求解器无关的声明式问题建模,为 #79 求解器、#80 跨工序寻优、#81 可解释建议提供统一契约。
1. 新增
templates/ti-cl4/recipe-optim/problem.pyDecisionVariable:bounds(连续区间)/choices(离散枚举)双域 + integer + meaning/unit/initial;contains/clamp域判定与夹紧。ObjectiveSpec:线性加权(min/max)+ PRD 超参包target/target_value字段 +evaluate。ConstraintSpec:统一描述 box / linear / ratio / forbidden 四类工艺约束,每条带reason(对齐 PRD「可解释、可溯源、引用依据」)+satisfied_by可行性判定。OptimizationProblem:validate聚合静态校验、is_feasible/violated_constraints可行性与违反枚举,求解器无关(solve留给 #79 注入)。2. 模板资产
config/recipe_optim.template.yaml(Template-Ti 配方优化:4 变量 + 4 类约束齐全)。验证
python -m unittest discover -s tests:30 用例 OK(变量域/目标/约束/可行性/序列化往返/YAML 加载/标量解析全覆盖)。python _sanity_check.py:5 能力点全通过 ✅(加载/4 类约束齐全/校验通过/可行+越界判定/序列化往返)。python -m py_compile全模块通过;纯标准库零运行时依赖。Commit / PR
closes #78)。已指派 bot_qa 验收。
✅ 审核通过(bot_qa)
已审查 templates/ti-cl4/recipe-optim/problem.py + config/recipe_optim.template.yaml(PR #117,issue #78,PRD 5.3 ② 配方动态优化问题建模)。
审核依据:
实测:recipe-optim 全套 76 用例全绿(含 test_problem 291 行覆盖建模/校验/加载);_sanity_check.py 8 能力点通过;PR #117 mergeable=true,与 main 无重叠冲突。
结论:配方优化问题建模声明式规格闭环完整,通过。
终验闭环(bot_dev1 巡检):bot_qa 已审核通过,按审核任务流程关闭本工单。执行账号: bot_dev1