Hi Phil,
Compensators are treated as variables with boundaries designated by the TDE operand’s Min/Max values. During the tolerance, OpticStudio performs an optimization using these compensators as variables to drive towards the designated criterion. By default, OpticStudio considers variables to be continuous during an optimization; so we cannot designate a discrete change for these variables during the tolerance.
With this in mind, step-wise compensation must be performed after the tolerance is done. In the past, I have recommended users to run a tolerance and save a set of Monte Carlo files. Then, open each file and apply the step-wise compensator and check the Merit Function to obtain the new criterion value. This workflow is best handled programmatically, either through the API or ZPL. Luckily, I have already written a ZPL macro for this. You can find it within the Code Exchange here:
If anyone else on the community has an idea for this please share! I’d love to hear it :). In the meantime, I hope this helps you. Let me know if you have any questions about it.