Reinforcement learning with simulink Index error

1 次查看(过去 30 天)
Hi, i have some problems to run reinforcement learning training algorithm.
i think my model runs good without reinforcement learning block. but with the rl block, i have problem like below..
my battery model is connected with python packages and solver is casadi. i really don't know where does the issues come from.. pls help..
you can contact me psh0814@icloud.com
----error---------------------------------------------------------------------
Error using rl.env.AbstractEnv/simWithPolicy (line 83)
Unable to simulate model 'single_RL_v03' with the agent 'agent'.
Error in rl.task.SeriesTrainTask/runImpl (line 33)
[varargout{1},varargout{2}] = simWithPolicy(this.Env,this.Agent,simOpts);
Error in rl.task.Task/run (line 21)
[varargout{1:nargout}] = runImpl(this);
Error in rl.task.TaskSpec/internal_run (line 166)
[varargout{1:nargout}] = run(task);
Error in rl.task.TaskSpec/runDirect (line 170)
[this.Outputs{1:getNumOutputs(this)}] = internal_run(this);
Error in rl.task.TaskSpec/runScalarTask (line 194)
runDirect(this);
Error in rl.task.TaskSpec/run (line 69)
runScalarTask(task);
Error in rl.train.SeriesTrainer/run (line 24)
run(seriestaskspec);
Error in rl.train.TrainingManager/train (line 423)
run(trainer);
Error in rl.train.TrainingManager/run (line 223)
train(this);
Error in rl.agent.AbstractAgent/train (line 77)
TrainingStatistics = run(trainMgr);
Error in run_pybamm_pack (line 132)
trainingStats = train(agent,env,trainOpts);
Caused by:
Error using rl.env.SimulinkEnvWithAgent>localHandleSimoutErrors (line 668)
Index in position 2 is invalid. Array indices must be positive integers or logical values.

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by