I have moved the repo over to github in order to help with maintenance/issue tracking: https://github.com/matt-weinstein/adigator These forums may still be used for discussion, but for bug reports/issues, it is probably best to use the github issue tracking.
I never quite figured out an elegant way to mix vectorized and non-vectorized derivatives. The quick and dirty way is to write your code as if the time-invariant parameter is time variant, set all elements equal to the single value, and then just pick off a single column from the Jacobian. In terms of the optimal control problem, the quickest/dirtiest way is to consider this as a state with theta_dot = 0, theta(t0) = theta(tFinal). Assuming you are using a direct collocation method, you can further...
Hi, Sorry for the delay on this. I think the issue is that you are using adigatorGenInterp2pp inside of the function to be differentiated. The routine is meant to be called outside of the function to be differentiated, and the resulting 2d poly passed in as auxiliary data. Matt
Roger, The issue is that adigator doesn't have fnval overloaded. You should, however, be able to represent your spline as a piece wise polygon and use ppval which adigator supports. Matt
Hi, Sorry I wrote this awhile back but it appears it never sent! The link errors out for me, but I think you are referring to this paper: http://www.anilvrao.com/Publications/ConferencePublications/AIAA-GNC-ADiGator-GPOPS-II.pdf It is true that the vectorized mode doesn't allow you to sum over the vectorized dimension, but in the collocation framework we use ADiGator only to differentiate the portions of the problem which are unique to individual problems (discretization separation). That is, the...
Is it that adigator is building too big of a matrix when computing the Hessian or is the Hessian just too big to bring into memory? Did you try using first derivatives only? Assuming everything is dense, adigator will attempt to build a MxNxN matrix where M is the constraint dimension and N is the variable dimension.. it should be doing this sparsely so it would seem to be a very large/dense problem to take up 32GB.
Hi Mark, That is a bummer with not being able to replicate error - I don't know why a different version of OS/Matlab would cause that. Regarding the RLV problem, ADiGator gets finicky about structure arrays - best practice is that if you are going to have a structure array, initialize it to an array. If the structure is going to be a scalar, don't use structure(1).field to assign to it. The lines of code that caused issue: In rlvEntryEndpoint: output.eventgroup(1).event = [x02-xf1, t02-tf1]; and...
Hi Saeed, ADiGator works based off of operator overloading and can thus only differentiate matlab functions that have been overloaded (or whose source code it can read). The issue is that I never overloaded trapz(). A workaround is to just write out the math for trapz. This, however, will not work with vectorization as it violates the vectorization assumption that dF(X(i))/dX(j) = 0 forall i~=j. That is, your code sums over the vectorized dimension. So, in your case you would need to fix the vectorized...