Page 1 of 1

Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Posted: 18 Dec 2023, 06:38
by baojw
Hello, I am using V-REP and MATLAB for reinforcement learning. The training process runs smoothly, but when I try to run the trained agent with the following code:

%% Play the game with the trained agent
simOptions = rlSimulationOptions('MaxSteps',3000);
experience = sim(env,agent,simOptions);

I encounter an error:

Error using subscript
Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Error in subscript (line 30)
info = builtin('subsref', self.x__info, S(1:end-1));

Error in trainDDPGWT4 (line 122)
experience = sim(env,agent,simOptions);

The error seems to be occurring in the zmqRemoteApi\clients\matlab\RemoteAPlObject.m file, specifically at line 30. How can I resolve this issue?

Re: Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Posted: 18 Dec 2023, 14:21
by fferri
baojw wrote: 18 Dec 2023, 06:38 Error in trainDDPGWT4 (line 122)
experience = sim(env,agent,simOptions);
What's that?

sim is a name used in the RemoteAPIClient lib.

If that is also the name of a variable in your script, you should use a different name.

Re: Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Posted: 15 Jan 2024, 03:05
by baojw
Hello, thank you for your reply. I also have a question on how to modify the default simulation speed control and visualization on/off for VRP, as I have found that increasing the simulation speed and visualization off would result in better graphics card usage.

Re: Error using subscript Subscript arguments for SUBSREF and SUBSASGN cannot be empty.

Posted: 16 Jan 2024, 17:39
by coppelia
Hello,

various simulation step sizes can be set/adjusted in the simulation dialog. You can turn off rendering during simulation via the appropriate toolbar button (right to the rabbit button).

Cheers