forked from kifj/tsp-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (68 loc) · 3.62 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html>
<head>
<meta name="Description" content="Traveling Salesman in Javascript" />
<meta charset="utf-8" />
<meta name="Author" content="git(at)hobbyelektronik(dot)org" />
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="salesperson.js"></script>
<script type="text/javascript" src="salesperson_presentation.js"></script>
<style>
* {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 10pt;
}
.numfield {
float: right;
text-align: right;
}
h3 {
padding-top: 0px;
font-size: x-large;
}
</style>
</head>
<body style="background-color: black; color: #91807f">
<section id="content" style="width: 1000px; padding-top: 20px">
<canvas id="canvas" style="float: left; border: 1px solid silver; display: block; margin-left: 20px;" width="500" height="500"></canvas>
<form id="parameters" style="float: left; font-size: medium; margin: 0 1em 0 2em">
<fieldset style="width: 300px">
<h3>Parameters</h3>
<label for="points">No. of points</label><input id="points" class="numfield" maxlength="4" name="points" size="4" type="number" step="10" />
<br clear="all" />
<label for="maxCycles">Max. No. of cycles</label>
<input id="maxCycles" class="numfield" maxlength="4" name="maxCycles" size="4" type="number" step="100" />
<br clear="all" />
<label for="gain">Gain</label><input id="gain" class="numfield" maxlength="3" name="gain" size="3" type="number" />
<br clear="all" />
<label for="alpha">α</label><input id="alpha" class="numfield" maxlength="6" name="alpha" size="6" type="number" step="0.01" />
<br clear="all" />
<input id="createPoints" style="margin-right: 5px" type="button" value="Create points" />
<br clear="all" />
<input id="runAsync" style="margin-right: 5px" type="button" value="Run Async" />
<input id="stopAsync" disabled="disabled" type="button" value="Stop" />
<br clear="all" />
<input id="runSync" style="margin-right: 5px" type="button" value="Run Sync" />
</fieldset>
<br clear="all" />
<fieldset style="width: 300px">
<h3>Simulation status</h3>
<label for="cycle">Cycle</label><input id="cycle" class="numfield" disabled="disabled" name="cycle" size="4" type="text" />
<br clear="all" />
<label for="length">Length of tour</label>
<input id="length" class="numfield" disabled="disabled" name="length" size="16" type="text" />
<br clear="all" />
<label for="exectime">Execution time</label>
<span style="float: right">ms</span>
<input id="exectime" class="numfield" disabled="disabled" name="exectime" size="16" type="text" />
<br clear="all" />
<label for="done">Finished?</label><input id="done" style="float: right" disabled="disabled" name="done" type="checkbox" />
<br clear="all" />
<label for="ptorder">Point order:</label>
<br clear="all" />
<textarea id="ptorder" style="font-family: Consolas, 'Courier New', Courier, monospace" disabled="disabled" name="ptorder" rows="6" cols="40"></textarea>
</fieldset>
</form>
</section>
</body>
</html>