2020-10-18 18:58:24 +11:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>pyRCV2</title>
|
|
|
|
<style type="text/css">
|
|
|
|
html, body {
|
|
|
|
font-family: 'Liberation Sans', FreeSans, Helvetica, Arial, sans-serif;
|
|
|
|
}
|
|
|
|
table {
|
|
|
|
border-collapse: collapse;
|
|
|
|
}
|
|
|
|
td {
|
|
|
|
padding: 0px 8px;
|
|
|
|
}
|
|
|
|
td.count {
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
tr:first-child td {
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
td.excluded {
|
|
|
|
background-color: #fecfcfff;
|
|
|
|
}
|
|
|
|
td.elected {
|
|
|
|
background-color: #d1fca7ff;
|
|
|
|
}
|
|
|
|
tr.info td {
|
|
|
|
background-color: #edededff;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div>
|
|
|
|
<input type="file" id="bltFile">
|
|
|
|
<button onclick="clickCount()">Count</button>
|
|
|
|
<label>
|
|
|
|
Preset:
|
|
|
|
<select id="selPreset" onchange="changePreset()">
|
|
|
|
<option value="scottish" selected>Scottish STV</option>
|
|
|
|
<option value="stvc">pyRCV STV-C</option>
|
2020-10-19 00:58:06 +11:00
|
|
|
<!--<option value="senate">Australian Senate STV</option>-->
|
2020-10-18 21:47:59 +11:00
|
|
|
<option value="wright">Wright STV</option>
|
2020-10-18 18:58:24 +11:00
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<button id="btnAdvancedOptions" onclick="clickAdvancedOptions()">Show advanced options</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="divAdvancedOptions" style="display: none;">
|
|
|
|
<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>
|
|
|
|
<input type="checkbox" id="chkProgQuota">
|
|
|
|
Progressive quota
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" id="chkBulkExclusion">
|
|
|
|
Bulk exclusion (NYI)
|
|
|
|
</label>
|
|
|
|
<br>
|
|
|
|
<label>
|
|
|
|
Numbers:
|
|
|
|
<select id="selNumbers">
|
|
|
|
<option value="native">Native float</option>
|
|
|
|
<option value="int">Native integer</option>
|
|
|
|
<option value="rational">Rational</option>
|
|
|
|
<option value="fixed" selected>Fixed</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
Decimal places (if Numbers = Fixed):
|
|
|
|
<input type="number" id="txtDP" value="5" style="width: 3em;">
|
|
|
|
</label>
|
|
|
|
<br>
|
|
|
|
<label>
|
|
|
|
Surplus order:
|
|
|
|
<select id="selSurplus">
|
|
|
|
<option value="size" selected>By size</option>
|
|
|
|
<option value="order">By order</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
2020-10-18 21:47:59 +11:00
|
|
|
Method:
|
2020-10-18 18:58:24 +11:00
|
|
|
<select id="selTransfers">
|
|
|
|
<option value="wig" selected>Weighted inclusive Gregory</option>
|
|
|
|
<option value="uig">Unweighted inclusive Gregory</option>
|
2020-10-18 21:47:59 +11:00
|
|
|
<option value="wright">Wright STV</option>
|
2020-10-18 18:58:24 +11:00
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<br>
|
|
|
|
<label>
|
|
|
|
Ties (NYI):
|
|
|
|
<select id="selTies">
|
|
|
|
<option value="backwards_random" selected>Backwards then random</option>
|
|
|
|
<option value="random">Random</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
Random seed:
|
|
|
|
<input type="text" id="txtSeed" value="Not yet implemented">
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table id="result"></table>
|
|
|
|
|
|
|
|
<script src="http://peterolson.github.com/BigRational.js/BigInt_BigRat.min.js"></script>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/big.js@6.0.0/big.min.js"></script>
|
|
|
|
<script src="bundle.js"></script>
|
|
|
|
<script src="index.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|