You'll need to do a few things.
First, in FlexSim, you'll probably want to use a Custom parameter. In FlexScript, you can then set that parameter to some value such as:
Model.parameters.MyCustomParameter = [[1, 2], [3, 4], [5, 6]]
Next, set the RL tool to use a custom parameter space. Set the space string to whatever you want, including nothing. Use the Get Observation trigger to send whatever string you want, but I strongly recommend you use JSON. For example:
Object current = ownerobject(c);
Map observation;
// Assuming all your observations are in a table called "Observations"
Array names = Model.parameters.names("Observations");
for (int i = 1; i <= names.length; i++) {
observation[names] = Model.parameters[names].value;
}
return JSON.stringify(observation);
Finally, you'll need to update flexsim_env.py. You'll need to modify the _get_observation_space() function and the _convert_to_observation() functions. The first function must return a valid space for whatever RL tool you are using. The second function must parse the text FlexSim sent back for the observation (which is easy if you use JSON) and the set the values in the observation space to whatever the model reports.
.
Jordan Johnson
Principal Software Engineer
>