2021-06-02 21:37:47 +10:00
|
|
|
<!--
|
|
|
|
* OpenTally: Open-source election vote counting
|
|
|
|
* Copyright © 2021 Lee Yingtong Li (RunasSudo)
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
-->
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>OpenTally</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" crossorigin="anonymous" />
|
|
|
|
<link rel="stylesheet" type="text/css" href="main.css?v=GITVERSION">
|
|
|
|
</head>
|
|
|
|
<body class="interactive">
|
2021-06-04 15:01:53 +10:00
|
|
|
<div id="divLoading">
|
|
|
|
Loading…
|
2021-06-02 21:37:47 +10:00
|
|
|
</div>
|
|
|
|
|
2021-06-04 15:01:53 +10:00
|
|
|
<div id="divUI" style="display: none;">
|
|
|
|
<div class="menudiv">
|
|
|
|
<input type="file" id="bltFile">
|
|
|
|
<button onclick="clickCount()">Count</button>
|
2021-06-06 00:38:25 +10:00
|
|
|
<label>
|
2021-06-04 15:01:53 +10:00
|
|
|
Preset:
|
|
|
|
<select id="selPreset" onchange="changePreset()">
|
|
|
|
<option value="scottish" selected>Scottish STV</option>
|
|
|
|
<option value="senate">Australian Senate STV</option>
|
2021-06-06 00:38:25 +10:00
|
|
|
<!--<option value="meek">Meek STV</option>
|
|
|
|
<option value="wright">Wright STV</option>-->
|
2021-06-04 15:01:53 +10:00
|
|
|
<option value="prsa77">PRSA 1977</option>
|
2021-06-06 00:38:25 +10:00
|
|
|
<!--<option value="ers97">ERS97</option>-->
|
2021-06-04 15:01:53 +10:00
|
|
|
</select>
|
2021-06-06 00:38:25 +10:00
|
|
|
</label>
|
2021-06-04 15:01:53 +10:00
|
|
|
<button id="btnAdvancedOptions" onclick="clickAdvancedOptions()">Show advanced options</button>
|
|
|
|
OpenTally (revision <span id="spanRevNum"></span>)
|
|
|
|
<!--· <a href="https://yingtongli.me/blog/2020/12/24/pyrcv2.html">Information and instructions</a> ·
|
|
|
|
<a href="blt/">Ballot input/editor</a>-->
|
2021-06-02 21:37:47 +10:00
|
|
|
</div>
|
2021-06-04 15:01:53 +10:00
|
|
|
|
|
|
|
<div id="divAdvancedOptions" class="menudiv cols-12 cols-sm-6" style="display: none;">
|
|
|
|
<div class="col-6" style="align-self: start;">
|
|
|
|
<div class="subheading">
|
|
|
|
Method specification:
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
Quota:
|
|
|
|
<select id="selQuotaCriterion">
|
|
|
|
<option value="geq" selected>>=</option>
|
|
|
|
<option value="gt">></option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<select id="selQuota">
|
|
|
|
<option value="droop" selected>Droop</option>
|
|
|
|
<option value="droop_exact">Droop (exact)</option>
|
|
|
|
<option value="hare">Hare</option>
|
|
|
|
<option value="hare_exact">Hare (exact)</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<!--<label>
|
|
|
|
<select id="selQuotaMode">
|
|
|
|
<option value="static" selected>Static quota</option>
|
|
|
|
<option value="progressive">Progressive quota</option>
|
|
|
|
<option value="ers97">Static with ERS97 rules</option>
|
|
|
|
</select>
|
|
|
|
</label>-->
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
Surplus order:
|
|
|
|
<select id="selSurplus">
|
|
|
|
<option value="by_size" selected>By size</option>
|
|
|
|
<option value="by_order">By order</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
Method:
|
|
|
|
<select id="selTransfers">
|
|
|
|
<option value="wig" selected>Weighted inclusive Gregory</option>
|
|
|
|
<option value="uig">Unweighted inclusive Gregory</option>
|
|
|
|
<option value="eg">Exclusive Gregory (last bundle)</option>
|
|
|
|
<option value="meek">Meek method</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<select id="selPapers">
|
|
|
|
<option value="both" selected>Include non-transferable papers</option>
|
|
|
|
<option value="transferable">Use transferable papers only</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
Exclusion:
|
|
|
|
<select id="selExclusion">
|
2021-06-06 00:38:25 +10:00
|
|
|
<option value="single_stage" selected>Single stage</option>
|
|
|
|
<option value="by_value">By value</option>
|
|
|
|
<option value="parcels_by_order">By parcel (by order)</option>
|
2021-06-04 15:01:53 +10:00
|
|
|
<!--<option value="wright">Wright method (re-iterate)</option>-->
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<!--<div class="subheading">
|
|
|
|
Tie-breaking:
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<label>
|
|
|
|
Ties:
|
|
|
|
<select id="selTies">
|
|
|
|
<option value="backwards_random" selected>Backwards then random</option>
|
|
|
|
<option value="forwards_random">Forwards then random</option>
|
|
|
|
<option value="random">Random</option>
|
|
|
|
<option value="prompt">Prompt</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
Random seed:
|
|
|
|
<input type="text" id="txtSeed" value="">
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="subheading">
|
|
|
|
Constraints:
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<input type="file" id="conFile">
|
|
|
|
</div>-->
|
|
|
|
</div>
|
|
|
|
<div class="col-6 cols-12" style="align-self: start;">
|
|
|
|
<div class="col-12 subheading">
|
|
|
|
Numeric representation:
|
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
2021-06-04 18:59:50 +10:00
|
|
|
<label>
|
2021-06-04 15:01:53 +10:00
|
|
|
Numbers:
|
|
|
|
<select id="selNumbers">
|
|
|
|
<option value="rational">Rational</option>
|
|
|
|
<option value="fixed" selected>Fixed</option>
|
2021-06-04 22:05:48 +10:00
|
|
|
<!--<option value="gfixed">Fixed (guarded)</option>-->
|
2021-06-04 18:59:50 +10:00
|
|
|
<option value="float64">Float (64-bit)</option>
|
2021-06-04 15:01:53 +10:00
|
|
|
</select>
|
|
|
|
</label>
|
2021-06-04 22:05:48 +10:00
|
|
|
<label>
|
|
|
|
Decimal places (if <i>Numbers</i> = <i>Fixed</i>):
|
2021-06-04 15:01:53 +10:00
|
|
|
<input type="number" id="txtDP" value="5" min="0" style="width: 3em;">
|
2021-06-04 22:05:48 +10:00
|
|
|
</label>
|
2021-06-04 15:01:53 +10:00
|
|
|
</div>
|
|
|
|
<div class="col-12">
|
|
|
|
<label>
|
|
|
|
Display up to
|
|
|
|
<input type="number" id="txtPPDP" value="2" min="0" style="width: 3em;">
|
|
|
|
d.p.
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<!--<div class="col-12 subheading">
|
|
|
|
Count optimisations:
|
|
|
|
</div>
|
|
|
|
<label class="col-6">
|
|
|
|
<input type="checkbox" id="chkBulkElection" checked>
|
|
|
|
Bulk election
|
|
|
|
</label>
|
|
|
|
<label class="col-6">
|
|
|
|
<input type="checkbox" id="chkBulkExclusion">
|
|
|
|
Bulk exclusion
|
|
|
|
</label>
|
|
|
|
<label class="col-12">
|
|
|
|
<input type="checkbox" id="chkDeferSurpluses">
|
|
|
|
Defer surpluses
|
2021-06-02 21:37:47 +10:00
|
|
|
</label>-->
|
2021-06-04 15:01:53 +10:00
|
|
|
<div class="col-12 subheading">
|
|
|
|
Rounding:
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" id="chkRoundQuota" checked>
|
|
|
|
Quota:
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="number" id="txtRoundQuota" value="0" min="0" style="width: 3em;">
|
|
|
|
d.p.
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" id="chkRoundVotes">
|
|
|
|
Votes:
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="number" id="txtRoundVotes" value="0" min="0" style="width: 3em;">
|
|
|
|
d.p.
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" id="chkRoundTVs">
|
|
|
|
Transfer values:
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="number" id="txtRoundTVs" value="0" min="0" style="width: 3em;">
|
|
|
|
d.p.
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="col-6">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" id="chkRoundWeights">
|
|
|
|
Ballot weights:
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="number" id="txtRoundWeights" value="0" min="0" style="width: 3em;">
|
|
|
|
d.p.
|
|
|
|
</label>
|
|
|
|
</div>
|
2021-06-02 21:37:47 +10:00
|
|
|
</div>
|
2021-06-04 15:01:53 +10:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="resultLogs1" style="white-space: pre-wrap;"></div>
|
|
|
|
|
|
|
|
<table id="result" class="result"></table>
|
|
|
|
|
|
|
|
<div id="resultLogs2"></div>
|
|
|
|
|
|
|
|
<div id="printPane" style="display: none;">
|
|
|
|
<button onclick="printResult()">Print result</button>
|
|
|
|
<label>
|
|
|
|
Paper size:
|
|
|
|
<select id="selPaperSize">
|
|
|
|
<option value="A4" selected>A4</option>
|
|
|
|
<option value="A3">A3</option>
|
|
|
|
<option value="letter">US Letter</option>
|
|
|
|
</select>
|
2021-06-02 21:37:47 +10:00
|
|
|
</label>
|
|
|
|
</div>
|
2021-06-04 15:01:53 +10:00
|
|
|
|
|
|
|
<div id="printWarning">Printing directly from this page is not supported. Use the ‘Print result’ button to generate a printer-friendly report.</div>
|
2021-06-02 21:37:47 +10:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="opentally.js?v=GITVERSION"></script>
|
|
|
|
<script src="index.js?v=GITVERSION"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|