Hi,

I am trying to limit the step size of an optimization variable between optimization steps for a nonlinear constrained optimization problem using JuMP and Ipopt.

In case this goal or the motivation behind it is unclear, here is some background information to clarify: I’m trying to solve for currents I1, I2, …, I18 that minimize their squared sum under certain constraints, in order to minimize power consumption for a medical imaging modality. However, I can’t allow for these currents to change too drastically within a fixed amount of time, as this results in excess heat which can damage human tissue. As such, I need to limit the slew rate, i.e., the change in current per second, which equates to limiting the step size of my optimization variables.

Somehow, I haven’t found any solution for this issue. Ideally, what I would like to do most is simply set an attribute of my optimizer for the step size as follows:

```
using JuMP, Ipopt
optimizer = Model(Ipopt.Optimizer)
set_attribute(optimizer, "max_step_size", 0.1)
```

However, I can’t find such an option in the list of Ipopt options.

Another approach could involve defining my optimization variables as time-series variables and adding a constraint on the difference between any two successive values. However, what I’m dealing with is categorically not a time-series optimization problem. I am not trying to optimize the trajectory of my currents, only their minimal squared sum under the given constraints.

A final approach which seemed feasible involves using a global variable defining the previous values of each optimization variable and applying a constraint on the differences between these values and the latest values. The global variable for previous values could be iteratively updated during each optimization step via a callback. However, I neither found a way to access the values of my optimization variables through Ipopt callbacks, nor do I find this approach particularly promising, since the optimizer doesn’t have prior information regarding this constraint, effectively making the size of each optimization step a shot in the dark.

I would appreciate any relevant references I may have missed or help of any kind.