egg changed the topic of #principia to: Logs: https://esper.irclog.whitequark.org/principia | <scott_manley> anyone that doubts the wisdom of retrograde bop needs to get the hell out | https://xkcd.com/323/ | <egg> calculating the influence of lamont on Pluto is a bit silly…
<queqiao--> Reply to "e​gg​: I would think automatic differentiation cannot even begin to be applied to the function a..."
<queqiao--> <l​am​on​t> You can't do AD on an IVP problem integrated with an ODE solver, but you can numerically integrate the gradient/jacobian with the ODE solver.
<queqiao--> <l​am​on​t> I did it here for the kepler two body problem:
<queqiao--> <l​am​on​t> I don't seem to have the bv78.m integrator kicking around any more so that'll fail, but I think the rest of it should be there. The stm2.m file is the analytic precise solution to the problem which should be "ground truth". Jacobianest is a matlab library for precise numerical finite differentiation (but it is super slow). I've forgotten what all the incantations in jacobian_matlab() are doing...
<queqiao--> <l​am​on​t> Of course I just started at PVG for 2 years after figuring that out and never bothered to implemented it, and just went with collocation instead
raptop has quit [Ping timeout: 201 seconds]
raptop has joined #principia
raptop has quit [Ping timeout: 190 seconds]
raptop has joined #principia
<queqiao--> Reply to "l​am​on​t: You can't do AD on an IVP problem integrated with an ODE solver, but you can numerically ..."
<queqiao--> <I​SO​> Just to clarify here, I am pretty sure both are possible (I use AD on an ODE solver all the time), s... https://paste.gg/p/anonymous/492785ccce3f41aebee1c681a3f95be0
<queqiao--> <l​am​on​t> Ah, so you need something like ForwardDiff.jl and then need to be able to ram it all the way through your ODE solver...
<queqiao--> <I​SO​> Exactly. The above example shows a couple ways of doing it with different AD libraries and also a Differential Algebra (DA) one.
<queqiao--> <l​am​on​t> I would love a ForwardDiff.jl for C#
<queqiao--> <l​am​on​t> it is definitely getting to the point where I could use one:
<queqiao--> <I​SO​> In all honesty it is really not too much code to write an AD library. I see this one at least in C# https://github.com/naasking/AutoDiffSharp
<queqiao--> <I​SO​> Whether its efficient is another story though..
<queqiao--> <l​am​on​t> Yeah i've got dual numbers and operator overloading in C# implemented in MJ already, but getting more 'transparent' ForwardDiff.jl functionality with automatically running through all the variables with chunking, etc would take some more effort and that's where the better payoff is.
<queqiao--> <l​am​on​t> So, @ISO i've got the collocation solver working fairly well in MJ so far, but it is at least 10x as slow as PVG. I'm definitely going to have to switch to SCP at some point.
<queqiao--> <I​SO​> Hmm. I have a little bit of code I can share for SCP in Julia but it's quite entangled with other things (I typically work with low thrust trajectories once in space). Just a small question here, what solver do you use for the collocation? Is it an SQP problem?