Update documentation
This commit is contained in:
parent
384dde9c52
commit
82e90a0e10
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,6 +2,8 @@
|
||||
/html/opentally.js
|
||||
/html/opentally_*.wasm
|
||||
|
||||
/homepage/_news.html
|
||||
|
||||
# Jekyll
|
||||
/homepage/_site
|
||||
/homepage/.sass-cache
|
||||
|
@ -29,7 +29,7 @@ The preset dropdown allows you to choose from a hardcoded list of preloaded STV
|
||||
Exceptions:
|
||||
|
||||
* [E1] When generating random numbers, OpenTally uses a [deterministic random number generator based on SHA-256](https://yingtongli.me/git/OpenTally/about/docs/rng.md), rather than the Wichmann–Hill(-based) algorithm.
|
||||
* [E2] When breaking ties backwards, OpenTally selects the candidate who had more/fewer votes at the last stage when *any* tied candidate had more/fewer votes, rather than the method described in the legislation (when each all had unequal votes). The OpenTally developers regard the method described in the legislation as a defect. For an independent discussion, see <a href="https://dl.acm.org/doi/10.1145/3014812.3014837">Conway et al.</a>
|
||||
* [E2] When breaking ties backwards, OpenTally applies a recursive method rather than the method described in the legislation. The OpenTally developers regard the method described in the legislation as a defect. For an independent discussion, see <a href="https://dl.acm.org/doi/10.1145/3014812.3014837">Conway et al.</a>
|
||||
* [E3] A tie between 2 candidates for the final vacancy will be broken backwards then at random, rather than the method described in the legislation.
|
||||
* [E4] Bulk exclusion is not performed, as the prescribed rules are more conservative than OpenTally's. See also the section on *Bulk exclusion* for further discussion.
|
||||
* [E5] The legislation is drafted such that a consistent interpretation is impossible – see <a href="https://github.com/AndrewConway/ConcreteSTV/blob/main/nsw/NSWLocalCouncilLegislation2021Commentary.md">Conway</a> for a discussion. In practice, the New South Wales Electoral Commission has applied the ‘by parcel’ method of rounding subtransfers, which OpenTally follows.
|
||||
@ -174,7 +174,7 @@ This dropdown allows you to select how constraints are applied. The options are:
|
||||
|
||||
*Guard/doom* (default):
|
||||
|
||||
When this option is selected, OpenTally applies constraints using the Grey–Fitzgerald method. Whenever a candidate is declared elected or excluded, any candidate who must be elected to secure a conformant result is deemed *guarded*, and any candidate who must not be elected to secure a conformant result is deemed *doomed*. Any candidate who is doomed is excluded at the next opportunity. Any candidate who is guarded is prevented from being excluded.
|
||||
When this option is selected, OpenTally applies constraints using the Gray–Fitzgerald method. Whenever a candidate is declared elected or excluded, any candidate who must be elected to secure a conformant result is deemed *guarded*, and any candidate who must not be elected to secure a conformant result is deemed *doomed*. Any candidate who is doomed is excluded at the next opportunity. Any candidate who is guarded is prevented from being excluded.
|
||||
|
||||
Multiple constraints are supported using the method described by Hill ([*Voting Matters* 1998;(9):2–4](http://www.votingmatters.org.uk/ISSUE9/P1.HTM)) and Otten ([*Voting Matters* 2001;(13):4–7](http://www.votingmatters.org.uk/ISSUE13/P3.HTM)).
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
||||
<footer class="bg-dark py-4 mt-auto">
|
||||
<div class="container px-5">
|
||||
<div class="row align-items-center justify-content-between flex-column flex-sm-row">
|
||||
<div class="col-auto"><div class="small m-0 text-white">Copyright © <a href="{{ site.url }}" style="color:inherit;">Lee Yingtong Li</a> (RunasSudo) 2021</div></div>
|
||||
<div class="col-auto"><div class="small m-0 text-white">Copyright © <a href="{{ site.url }}" style="color:inherit;">Lee Yingtong Li</a> (RunasSudo) 2021–2022</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -63,45 +63,7 @@ title: "OpenTally: Advanced online election counting"
|
||||
</div>
|
||||
</div>
|
||||
<div class="row gx-5">
|
||||
<div class="col-lg-4 mb-5">
|
||||
<div class="card h-100 shadow border-0">
|
||||
<div class="card-body p-4">
|
||||
<div class="badge bg-primary bg-gradient rounded-pill mb-2">Dev Log</div>
|
||||
<a class="text-decoration-none link-dark stretched-link" href="{{ site.url }}/blog/2021/08/21/stv-parcels.html"><h5 class="card-title mb-3">Parcels? Subparcels? Not just for STV hand counts!</h5></a>
|
||||
<p class="card-text mb-0">Single transferable vote rules designed for hand-counting often contain references to ‘parcels’ (or ‘bundles’ or ‘batches’), ‘further parcels’ and sometimes even ‘subparcels’.</p>
|
||||
<p>For example, consider the <a href="#">4th stage of the ERS97 model election</a>. 107 of Glazier's and Wright's ballot papers are aggregated according to…</p>
|
||||
</div>
|
||||
<div class="card-footer p-4 pt-0 bg-transparent border-top-0">
|
||||
<div class="small text-muted">21 August 2021</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-5">
|
||||
<div class="card h-100 shadow border-0">
|
||||
<div class="card-body p-4">
|
||||
<div class="badge bg-primary bg-gradient rounded-pill mb-2">Dev Log</div>
|
||||
<a class="text-decoration-none link-dark stretched-link" href="{{ site.url }}/blog/2021/07/30/blt-parser.html"><h5 class="card-title mb-3">Implementing a BLT parser by hand in Rust (vs pest and combine)</h5></a>
|
||||
<p class="card-text"><a href="#">OpenTally</a> is open-source software which can count single transferable vote elections specified using the <a href="#">BLT file format</a>.</p>
|
||||
<p class="card-text mb-0">Earlier this month, I <a href="#">replaced</a> OpenTally's previous naive <a href="#">string-manipulation-based BLT parser</a> with one using <a href="#">pest</a>. A new parser was necessary to support <a href="#">extensions to the BLT</a>…</p>
|
||||
</div>
|
||||
<div class="card-footer p-4 pt-0 bg-transparent border-top-0">
|
||||
<div class="small text-muted">30 July 2021</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 mb-5">
|
||||
<div class="card h-100 shadow border-0">
|
||||
<div class="card-body p-4">
|
||||
<div class="badge bg-primary bg-gradient rounded-pill mb-2">Dev Log</div>
|
||||
<a class="text-decoration-none link-dark stretched-link" href="{{ site.url }}/blog/2021/07/28/asyncify-vanilla.html"><h5 class="card-title mb-3">Asyncify with vanilla JS/<wbr>WebAssembly (wasm-bindgen compatible)</h5></a>
|
||||
<p class="card-text">WebAssembly is a technology for executing compiled programs in the web browser at near-native speeds. However, it has a number of current limitations, including that it does not support coroutines/<wbr>asynchronicity.</p>
|
||||
<p class="card-text mb-0">In <a href="#">OpenTally</a>, WebAssembly is used to run code for counting an election. This…</p>
|
||||
</div>
|
||||
<div class="card-footer p-4 pt-0 bg-transparent border-top-0">
|
||||
<div class="small text-muted">28 July 2021</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include_relative _news.html %}
|
||||
</div>
|
||||
<div class="row gx-5 justify-content-center">
|
||||
<div class="col-8 text-center">
|
||||
|
@ -209,7 +209,7 @@ impl STVOptions {
|
||||
return flags.join(" ");
|
||||
}
|
||||
|
||||
/// Validate the combination of [STVOptions] and panic if invalid
|
||||
/// Validate the combination of [STVOptions] and error if invalid
|
||||
pub fn validate(&self) -> Result<(), STVError> {
|
||||
if self.surplus == SurplusMethod::Meek {
|
||||
if self.quota_mode != QuotaMode::DynamicByTotal { return Err(STVError::InvalidOptions("--surplus meek requires --quota-mode dynamic_by_total")); }
|
||||
|
Loading…
Reference in New Issue
Block a user