-
-
Notifications
You must be signed in to change notification settings - Fork 7
DiffEq Optimal Control #4
Comments
I was going to do that, but soon I started helping NLOptControl and didn't do much here. But the most recent work is probably with DiffEqFlux.jl which makes it easy to define the optimization setups to solve in a fast way. SciML/DiffEqFlux.jl#174 is a fairly clear example of how to solve a classic nonlinear control problem for example. Work in SciML/DiffEqFlux.jl#173 would be necessary to make it "good". I think that when that is all built up, we will return back to this effort and build a high level interface that makes it easy to describe and solve a standard nonlinear optimal control problem by interfacing with that library and BoundaryValueDiffEq.jl for you. |
Hey Chris, as you know, I finally got around to updating NLOptControl JuliaMPC/NLOptControl.jl#30. Should be working on Julia 1.5. But, I think that NLOptControl was removed from the official Julia package database, because I did not update to Julia 1.0 fast enough;/ |
Yes, @huckl3b3rry87 glad to see you're back! I definitely would point people over to there for now. I'm still planning to do this package out, and if you'd like to be a part of the process that would be incredibly helpful. Basically, what I want to do is merge the different ways of tackling the same optimization problem in different ways all into one unified interface. I want to do direct, indirect, and variational methods all in one line of code. My approach is going to be to have an For the direct methods, we can have a direct shooting method that transforms into an OptimizationProblem in the style of DiffEqFlux where you just have to choose a universal function approximator. For direct discretize-then-optimize, we can trace DifferentialEquations.jl tableaus to have it spit out the code for the discretization (which I just mentioned to someone on the Slack today), and this would give high order discretizations. This would then build the symbolic form and output an GalacticOptim.jl is being built to unify the Julia optimization libraries so that OptimizationProblem works globally and all of the AD comes for free, which is why we are targeting that. GalacticOptim.jl is planned to interface with MOI. If anyone wants to join in on this effort, let me know. I think I can lay down the |
And I plan to probably rename this OptimalControl.jl |
Chris,
Thank you for the detailed response! It sounds like you have an exciting
problem to tackle, I will definitely help it I can:)
It is nice to look at Julia code again:)
…On Wed, Aug 12, 2020, 9:51 PM Christopher Rackauckas < ***@***.***> wrote:
And I plan to probably rename this OptimalControl.jl
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB6TAWSTE6TM7GSWQB3Q6HDSANWOBANCNFSM4K75NF6Q>
.chri
|
@ChrisRackauckas I noticed that while I am passing tests on both Linux and mac, they are failing due to a precompilation issue on Windows. Unfortunately, I do not have access to a Windows machine and some of my colleges are wanting to use NLOptControl on Windows, but don't have any delving experience. Do you mind taking a quick look to see if there is something simple that is going wrong here? If not,I totally understand, I know that everyone is very busy:) |
I would be interested in helping but i am currently very busy with exams |
I'd also be interested in helping out here wherever possible, although I'm pretty new |
Alright, I got the basics implemented in SciML/ModelingToolkit.jl#562 . I think most of the work that's needed right now is that we need GalacticOptim to be much better to really do much with the current transformation. I'll create another transformation tomorrow or this weekend that doesn't require constrained optimization, but this should be the standard one. |
From implementing it, I think it's best to do this in ModelingToolkit itself, so I'll close this and if you're interested in this then you should watch ModelingToolkit.jl |
FYI, |
Yeah, but that's all discretize-then-optimize. The issue is building a method-independent format so that it can be optimal in many different ways. |
To clarify, InfiniteOpt.jl does provide a general interface for modeling infinite-dimensional optimization problems (e.g., optimal control problems) that is independent of the transformation approach used to solve it. We currently only provide discretization methods, but we do feature an API for adding on additional methods that need not be discretization based as described here. Admittedly, the decoupling between the infinite model and the solution approach isn't perfectly decoupled, but we are working on fixing that (infiniteopt/InfiniteOpt.jl#105). Of course the key distinguishing difference is that InfiniteOpt.jl is intended as an interface for general infinite-dimensional optimization problems (i.e., problems with decision functions) and is not a tailored tool for optimal control. Moreover, it is built upon JuMP.jl's API and thus follows a different modeling paradigm than that of ModelingTookit.jl. I look forward to seeing what comes of this project, it looks pretty cool! |
@pulsipher Just a short question on what you mean with "additional methods that need not be discretization based". Do you mean "methods that do not discretize in state \cross time space" when saying "additional methods that need not be discretization based"? For example a vector basis based method like composition of sinosoids such that the system (Fourier basis) is not discretized in state or time but discretized (due to finite RAM and life time of the universe) in frequency space in all practical applicatons. |
@freemin7 To be more precise InfiniteOpt.jl supports the addition of arbitrary methods to solve infinite-dimensional optimization problems. It provides a modeling abstraction to express general infinite-dimensional models (stored in Currently, we only natively provide direct transcription techniques to create a So yes, one could extend InfiniteOpt.jl to employ a vector basis method that is discretized in frequency space. In principle, we could even extend it to employ a general method of weighted residuals technique to transform and solve problems (though that would be a bit of work to implement for arbitrary infinite-dimensional optimization problems which is why we haven't done that yet). However, a particular transformation method could be restricted to a certain sub-group of infinite-dimensional problem classes (e.g., optimal control). I hope that helps. |
Dear all, I just came across this discussion. Fully agree that it is better to gather efforts than reinventing stuff, although there is of course some trade off between what one wants and what one gets on the shelf. Given the tremendous amount of ongoing developments in Since AD is now easily available in |
DiffEqFlux is probably the most developed in that sense, with some tutorials describing cases like PDE-constrained optimization with high order adaptive implicit methods. That's the numerical side, and then on the interface side there's some pretty clear advantages to the ModelingToolkit.jl interface so that's the only one it really makes sense to consider there. That said, the MTK control interface isn't quite complete, mostly because of the interaction of nonlinear tearing with symbolic arrays which are being sorted out. We're probably about 6-9 months away from having something that auto-generates sparse parallel adjoints in both direct and indirect methods from one source. |
@jbcaillau thanks for posting!
The world would be a much better place if engineers, economists, mathematicians, physicists & everyone else collaborated. One issue may (or may not) be whether you wanna work on a package that extends an optimization DSL like |
I think you have to do both and separate them. The numerical pieces are already put together:
On the DSL side, there are quite a few reasons to not use JuMP for this:
So I would say that InfiniteOpt.jl is probably the best DSL you could write on JuMP, but the fundamental limitations of JuMP are the impetus to putting together a wholly new system here built on Symbolics.jl and ModelingToolkit.jl. It's been a fairly long process though, but we're starting to get some results in control finally. One of the last pieces that are making this come together is by not splitting |
Hey, is this package intended to solve general optimal control problems?
I really wish I could use NLOptControl.jl but it hasn't been updated to Julia 1.0
The text was updated successfully, but these errors were encountered: