Chains pre-built rankers: the first provides the primary ranking, each subsequent one breaks remaining ties.
new Election({ rankers: [ new InstantRunoff({ ballots, candidates, tieBreakers: [tb(Copeland)] }), new Schulze(matrixFromBallots(ballots, candidates)), new RandomCandidates({ candidates, rng: myRng }), ],}) Copy
new Election({ rankers: [ new InstantRunoff({ ballots, candidates, tieBreakers: [tb(Copeland)] }), new Schulze(matrixFromBallots(ballots, candidates)), new RandomCandidates({ candidates, rng: myRng }), ],})
Ranking built by repeated wins: run the full election, record the winning tier, then re-run the whole election restricted to the remaining candidates for the next place, and so on. See Method#iteratedRanking.
Method#iteratedRanking
A new Election with every ranker restricted to a subset of candidates. Requires every ranker to support restrict() (all built-in methods do).
restrict()
Chains pre-built rankers: the first provides the primary ranking, each subsequent one breaks remaining ties.
Example