Auto-Min TransX' function behind the scenes

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,667
Reaction score
19
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
In my recent [ame="http://www.orbithangar.com/searchid.php?ID=6393"]TransX release[/ame], we now have the Auto-Min functionality, available as variables' adjustment setting.

If anybody is interested how the optimal velocities are found - it's thanks to an self invented (reinvented?) algorithm, based on the [ame="http://en.wikipedia.org/wiki/Binary_search_algorithm"]Binary Search[/ame], or more precisely the [ame="http://en.wikipedia.org/wiki/Bisection_method"]Bisection Method[/ame], applied for Optimisation task (finding minimum), instead of finding roots, as for the case of raw bisection method.
My implementations of these methods are available below:
Bisection Method
Binary Search Optimiser
They are abstract classes, requiring only a function to perform the search on. The function is a [ame="http://en.wikipedia.org/wiki/Black_box"]Black Box[/ame], whom an algorithm provides an argument and checks for the output value from the Box. No analytic function luxury here!
For example:
Direct Ascent root finding
TransX minimum finding function
Algorithm preparation


The basis of these methods - the binary search - is by its nature a fast search algorithm, whose time of calculation goes up [ame="http://en.wikipedia.org/wiki/Logarithm"]logarithmic[/ame] with linear increase of required precision. (Remember me making this case here?). It does slow down Orbiter a bit when looking for an optimal solution, but remember that an entire numerical calculation is being performed in each MFD refresh, while you keep the Ejection Date changing. Also another reason is, that for TransX' black box to converge, it's not enough to recalculate the TransX' state once on each optimiser's iteration, but 10 times. I had a similar problem with PEG in the Direct Ascent program, where I have to call the PEG's recalculation function multiple times on each iteration, but 3 times was enough, and PEG is somewhat easier on CPU than TransX. Perhaps some code optimisations could be made there?

Anyway, have fun with your new solution finder!
 
Back
Top