-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
47 lines (46 loc) · 2.58 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
<!DOCTYPE html>
<html>
<head>
<meta name="Description" content="Traveling Salesman in Javascript" />
<meta charset="utf-8">
<meta name="Author" content="Johannes Beck - [email protected]" />
<script type="text/javascript" src="salesman.js"></script>
<script type="text/javascript" src="jquery-1.9.1.min.js"></script>
</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; background: url('grid-20-20.png') top left; display: block; margin-left: 20px;" width="540" height="480"></canvas>
<form id="parameters" style="float: left; font-size: medium; margin:0 1em 0 2em;">
<fieldset style="width: 300px;">
<h3 style="padding-top: 0px; font-size: x-large;">Parameters</h3>
<label for="cities">No. of cities</label><input id="cities" style="float: right;" maxlength="4" name="cities" size="4" type="number"/>
<br clear="all" />
<label for="maxCycles">Max. No. of cycles</label>
<input id="maxCycles" style="float: right;" maxlength="4" name="maxCycles" size="4" type="number" />
<br clear="all" />
<label for="gain">Gain</label><input id="gain" style="float: right;" maxlength="3" name="gain" size="3" type="number" />
<br clear="all" />
<label for="alpha">α</label><input id="alpha" style="float: right;" maxlength="6" name="alpha" size="6" type="number" />
<br clear="all" />
<input id="run" style="margin-right: 10px;" type="button" value="Run" />
<input id="stop" disabled="disabled" type="button" value="Stop" />
</fieldset>
<br clear="all" />
<fieldset style="width: 300px;">
<h3 style="padding-top: 0px; font-size: x-large;">Simulation status</h3>
<label for="cycle">Cycle</label><input id="cycle" style="float: right;" disabled="disabled" name="cycle" size="4" type="text" />
<br clear="all" />
<label for="length">Length of tour</label>
<input id="length" style="float: right;" disabled="disabled" name="length" size="16" type="text" />
<br clear="all" />
<label for="done">Finished?</label><input id="done" style="float: right;" disabled="disabled" name="done" type="checkbox" />
</fieldset>
</form>
</section>
<script type="text/javascript">$(document).ready(function() {
var tsp = new TravelingSalesman();
tsp.setupForm();
});
</script>
</body>
</html>