Still not certain that it
is doable; I'll find out soon
.
Given that there are unmodellable elements (how many first preference votes for Charles Kennedy and how many for Danny Alexander in the combined Ross, Skye, Cromarty, Inverness, Nairn, Badenoch & Strathspey constituency (and yes, that's one of them and a contender for longest name) if all voters across both constituency could freely choose?, for example), and given that there will be inaccuracies (split-ticket voting will mean that simply summing the votes for a party and assuming they'd split between the two candidates as 1-2 will be inaccurate; in Ireland, you get about a 30% non-party-transfer level) ... and so on, it's always going to be an approximation (also, second and third preferences will vary not only region to region, but constituency to constituency).
What I've done is assume that splits away will approximately balance splits in (an oversimplification, but, hey), and added the votes together for the two constituencies. If Party A gets past the threshold for one seat, we'll assume that they'll pick one seat up at least and look at the surplus as the vote for member 2.
Then start knocking out people (usually "Other" first). I've got to the stage of successfully doing that regardless of party and getting the outcome from the first knockout stage (ie after surplus and first elimination) by using If statements and having every possibility in a separate column, which is zeroed "if" that column is not the one to be used and the correct output if it is; with those columns added together to get the result from that step. The next step will have, however, a multiple of those possibilities in the possibility tree, so that might make it implausible to model.
(ie, there are seven or eight potential outcomes for "first knocked out"; there are 42-56 options for "1st and second knocked out" and 210-336 options for "1st, 2nd and 3rd knocked out". If I assume that "Other" will be first knocked out each time, however (and manually intervene in the very few cases where this isn't the case), it becomes more manageable, with 7-8 options for 1st and 2nd knocked out and 42-56 options for 1st,2nd and 3rd knocked out.
If that makes any sense at all ....