aps-agent/server/engines/__init__.py

16 lines
919 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================================
# 排产引擎包(moduleId: server-engines, 可重生 ✅)
# M1:RULE 引擎真实现;CP/GA/HYBRID 为占位(M5 落地,plan.md §9.1)
# ============================================================
from server.engines.base import EngineParams, ISchedulingEngine # 引擎接口与入参
from server.engines.rule_engine import RuleEngine # 规则引擎实现
# 显式导出清单
__all__ = ["EngineParams", "ISchedulingEngine", "RuleEngine", "get_engine"]
def get_engine(engine_type: str) -> ISchedulingEngine:
"""引擎工厂:按类型取引擎实例(M1 一律返回 RULE,其余类型仅作标注)。"""
# M1 决策:CP/GA/HYBRID 尚未落地(M5 范围),统一由 RULE 承接并在结果中如实标注
return RuleEngine(requested_type=engine_type) # 传入请求类型以便结果中留痕