MPCPlannerBase¶
- class torchrl.modules.MPCPlannerBase(*args, **kwargs)[source]¶
MPCPlannerBase 抽象模块。
此类继承自
SafeModule
。在给定TensorDict
的情况下,此模块将执行模型预测控制 (MPC) 规划步骤。在规划步骤结束时,MPCPlanner
将返回一个建议的动作。- 参数:
env (EnvBase) – 用于执行规划步骤的环境(可以是
ModelBasedEnvBase
或EnvBase
)。action_key (str, optional) – 将指向已计算动作的键。