createIntegratedEnv
Create environment object from a Simulink environment model that does not contain an agent block
Syntax
Description
Given a Simulink® environment model that does not include your agent block, the
createIntegratedEnv
function generates a new closed-loop Simulink model that contains an agent block and references your original environment
model from its environment block. The function also returns an environment object that you can
use for training and simulation. The environment object acts as an interface so that when you
call sim
or train
, these
functions in turn call the created (and compiled) Simulink model to generate experiences for the agents.
To create an environment object from a Simulink model that already includes an agent block, use rlSimulinkEnv
instead. For more information on Simulink reinforcement learning environments, see Create Custom Simulink Environments.
creates a Simulink model with the name specified by env
= createIntegratedEnv(refModel
,newModel
)newModel
and returns a
reinforcement learning environment object, env
, for this model. The
new model contains an RL Agent block and references
refModel
within its Environment block. For more
information on model referencing, see Model Reference Behavior and Capabilities (Simulink).
[
returns the block path to the RL Agent block in the new model and the
observation and action data specifications for the reference model,
env
,agentBlock
,obsInfo
,actInfo
] = createIntegratedEnv(___)obsInfo
and actInfo
, respectively.
[___] = createIntegratedEnv(___,
creates a model and environment interface using port, observation, and action sets
specified using one or more Name=Value
)Name=Value
arguments.
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Version History
Introduced in R2019a