cmower / optas

OpTaS: An optimization-based task specification library for trajectory optimization and model predictive control.
https://cmower.github.io/optas/
Other
105 stars 14 forks source link

Suggestion: deprecate optimize_time #84

Closed cmower closed 1 year ago

cmower commented 1 year ago

The goal of the optimize_time flag in the OptimizationBuilder interface was originally meant as a helper for when the user wanted to make dt part of the decision variables. In reality, this doesn't happen very much and in the case that it does, it is not such a big ask for the user to add this manually. Furthermore, because of optimize_time, it convolutes the methods below, making it very difficult to follow the logic (these methods are useful).

https://github.com/cmower/optas/blob/3eeeaf3309f75d6ffbc3b158055f651005b0e1d6/optas/builder.py#L563-L623

@joaomoura24, unless you have any major objections, I will deprecate this feature as part of the #37 PR. I am guessing you probably aren't using this flag in your code?

joaomoura24 commented 1 year ago

I agree. Yes, I am not using it in any of my examples, and there are many other ways of optimising time, so I think that specifying one is won't be that useful in general.

cmower commented 1 year ago

Closing, this will be fixed when #37 is merged.