Hello there,
I’m having an issue with a using a nested parameter sweep to run a fom script in an optimization. I need the parameter sweep to output a variable that is a 750x3 matrix, which I know it does when run on its own outside of the optimization.
However when I run it inside of the optimization, the data that is pulled into the fom script workspace is a 750x1 matrix. I found this out by setting the fom of the optimization of the script to equal the size of the array to figure out its dimensions. The data it does pick up is the first row of the data that should be coming out of the parameter sweep. I figured this all out through playing with making the fom equal to the first element of the array and comparing to a separate sweep using the same parameters. I know it is not an issue with the script itself because it will run properly with a 750x1 matrix to give a scalar fom, it just won’t be the correct result I need.
I think this is similar to the issue being had by Optimization of geometrical parameters for two possible states with different material properties but that solution won’t work for me. There is no way to simplify my data, I need all 750x3 elements from the sweep to do my calculation. I’ve also found How can I access the results of a nested parametersweep in the custom figure of merit script (for optimization)?, but the solution suggested there also won’t work because the data I need is already coming from an analysis group.
So in essence, is there any way I’m missing to get the optimization to actually access (or to use a load command inside of the fom script) all 750x3 points of the variables I need?
Attached is the simulation file I’m trying to work with if you want to actually look at the optimization I’m trying to do.
Thanks!
optimization file.fsp (361.4 KB)