Let me know about any errors in the calculations, disagreements with the theory, or suggestions for improvement. Please compare its findings to the conventional wisdom and experimental results. It's described in the attached PDF, which has expressions for the equations used in the spreadsheet. Here is a first draft of the bit of madness that I call ARCEM. I devised a quantitative way of comparing flank compositions.
I played for quite a while without ever using retinues, and when I finally decided to use them I really went down the metagame rabbit hole.