They understandably don't publish much. The best clues I have found are in their lead landing engineer's pre-spacex publications. This one a good one for example: http://www.larsblackmore.com/BlackmoreEtAlJGCD10.pdf
The tldr is that they find a convex approximation to the problem and use standard convex solvers to find the right inputs.
This paper[1] says that they use cvxgen[2] to generate the on-board solver code.