Optim callback function -- how to use optimization variable

A bit late to the party, but I’ve replied to the same question here. (Adding a cross-ref in case somebody searches for the question online and ends up here.)

2 Likes