optimiseposition is not a valid function or variable name

Dear all,

I am modeling a bent waveguide and using the command optimizeposition to optimize the modes in straight waveguide and in bent waveguide, but Mode solutions gives the error “optimiseposition is not a valid function or variable name”, strange thing is, there is a page on Lumerical website explaining how to use this exact command (https://kb.lumerical.com/en/ref_scripts_optimizeposition.html).

anybody has an idea how to solve this?

Thanks alot

Dear @xiaoning.jia

Can you please upload your simulation file and the script that you use?

In the mean time, please go to this page:

and follow the instructions. After you calculated the modes of a straight waveguide and saving the desired mode on d-card, run the simulation for bent waveguide. Then run this simple script:

setanalysis("shift d-card center",1);
shift = optimizeposition(1,1); # find x, y, z shift resulting in optimal overlap between
                             # the 4th mode in the mode list and the 1st mode in the deck
?"x shift:"+num2str(shift(1));
?"y shift:"+num2str(shift(2));
?"z shift:"+num2str(shift(3));

I did it again with the latest version of the software and it works fine.



The error message indicates that you are likely using an older version of the software which did not support the optimizeposition script function since this function was added in MODE Solutions version 7.7.786. If you haven’t already, I would recommend downloading and installing the latest version from here:

1 Like

Thank you Nancy!
yes indeed the error is due to the software version, and it was solved when I update the software.

Thanks again

1 Like