-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulations.html
304 lines (258 loc) · 8.76 KB
/
simulations.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
<!--A Design by W3layouts
Author: W3layout
Author URL: http://w3layouts.com
License: Creative Commons Attribution 3.0 Unported
License URL: http://creativecommons.org/licenses/by/3.0/
-->
<!DOCTYPE html>
<html>
<head>
{{ headContent() }}
<title>Tribute model-Simulations: abelgabel</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Coffee Break Responsive web template, Bootstrap Web Templates, Flat Web Templates, Andriod Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<link href="css/mystyle.css" rel='stylesheet' type='text/css' />
<link href="css/bootstrap.css" rel='stylesheet' type='text/css' />
<link href="css/style.css" rel='stylesheet' type='text/css' />
<script src="js/jquery.min.js"></script>
<!---- start-smoth-scrolling---->
<script type="text/javascript" src="js/move-top.js"></script>
<script type="text/javascript" src="js/easing.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".scroll").click(function(event){
event.preventDefault();
$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
});
});
</script>
<!--start-smoth-scrolling-->
</head>
<body>
<!--header-top-starts-->
<div class="header-top">
<div class="container">
<div class="head-main">
</div>
</div>
</div>
<!--header-top-end-->
<div class="banner">
<div class="container">
<div class="banner-top">
<!--start-header-->
<div class="header">
<div class="container">
<div class="head">
<div class="navigation">
<span class="menu"></span>
<ul class="navig">
<li><a href="http://www.abelgabel.com" class="active">
<img src="images/book_apple.png" class="b-radius-top" style="height:30px">
Home</a></li>
<li><a href="http://www.abelgabel.com/tribute_game/index.html"> <img src="images/books.png" class="b-radius-top" style="height:30px">
Introduction</a></li>
<li href="http://www.abelgabel.com/tribute_game/case_study.html"><a >
<img src="images/books.png" class="b-radius-top" style="height:30px">
Case Sutdy</a></li>
<li><a >
<img src="images/pencil.png" class="b-radius-top" style="height:30px">
Simulations</a></li>
<li><a href="http://www.abelgabel.com/tribute_game/r_code.html">
<img src="images/pencil.png" class="b-radius-top" style="height:30px">
R code</a></li>
</ul>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- script-for-menu -->
<!-- script-for-menu -->
<script>
$("span.menu").click(function(){
$(" ul.navig").slideToggle("slow" , function(){
});
});
</script>
<!-- script-for-menu -->
<!--banner-starts-->
<div class="banner-text">
<h1>Tribute model</h1>
<h2>abelgabel</h2>
<div class="banner-btn">
</div>
</div>
</div>
</div>
</div>
<!--banner-end-->
<div class="about">
<div class="container">
<div class="bread-crumbs">
<ol class="breadcrumb">
<li> Parameters: </li>
<li> Number of actors: {{size_chosen}}</li>
<li > Number of Periods: {{time_chosen}} </li>
<li> Cost of War: {{costwar_chosen}} </li>
<li > <span onclick="displayinfo()"> How to run the model? <img src="images/questionmark.png" style="height:25px"> </span> </li>
<li>
<div id="info1" class="information">
<p> If you would like to see the dynamic of the model for the first time, choose: </p>
<p> The number of actors=10, the number of periods=100 and cost of war 0.25. </p>
<p> You can save your result by clicking the button download: <a href="#download"> Click</a> </p>
<p>The cost of war goes from 0 (no cost) to 1 (total loss). </p>
<p> If you want to see the dynamics of the tribute model without running an entering simulation, we have a video for you <a href="https://www.youtube.com/edit?o=U&video_id=MLF3ffVJ0kY" target="_blank">Click me! </a> </p>
</div>
</li>
</ol>
<script>
function displayinfo() {
var x = document.getElementById('info1');
if (x.style.display === 'none') {
x.style.display = 'block';
} else {
x.style.display = 'none';
}
}
</script>
<ol class="breadcrumb">
<li>Run simulation:
<button onclick="simulationfun()" class="buttons">Simulations</button> </li>
</li>
<li > <span onclick="()"> Where can I see the simulations? <img src="images/questionmark.png" style="height:25px"> </span> </li>
<li>
<div id="infodownload" class="information">
<p> Plots are shown after running a simulation. </p>
<p> The time to finish a simulation depends on the number of actors and number of periods.</p>
<p> We recommend choosing between 10 and 15 actors, and between 100 and 1000 periods.</p>
</div>
</li>
</ol>
<script>
var input2=1;
function simulationfun() {
input2=input2+1;
Shiny.onInputChange("simulation", input2);
};
var t_periods_var = document.getElementById('t_periods').value;
number=1;
function videofun() {
number=1;
var sequinterval=setInterval(function () {
Shiny.onInputChange("mydata", number);
number=number+1;
} ,300);
};
function displayinfoDownload() {
var x = document.getElementById('infodownload');
if (x.style.display === 'none') {
x.style.display = 'block';
} else {
x.style.display = 'none';
}
}
</script>
</div>
</div>
</div>
</div>
<!--about-starts-->
<div class="about">
<div class="container">
<div class="about-main">
<div class="col-md-8 about-left">
<div class="about-one">
<h3>Compare wealth between two actors.</h3>
</div>
<div class="about-two">
{{plot_trends}}
<div class="breadcrumb">
<ol class="breadcrumb">
<li> Choose actors: </li>
<li>First actor: {{actor_1}} </li >
<li>Second actor: {{actor_2}}
</li>
</ol>
</div>
</div>
<div class="about-tre">
<div class="a-1">
<div class="col-md-6 abt-left">
<h3> Plot alliance Network: </h3>
<div class="topics">
{{alliance_network2}}
</div>
<div class="information"> Size of nodes is proportional to their wealth.</div>
<div align="left">
</div>
</div>
<div class="col-md-6 abt-left">
<h3>Plot Alliance Network</h3>
{{wealth_histrogram}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--about-end-->
<div class="about">
<div class="container">
<div class="bread-crumbs">
<ol class="breadcrumb">
<li> Plot's parameter: </li>
<li> Threshold: {{threshold_chosen}} </li >
<li> Period: {{alliance_period}} </li>
<li> Fight: {{fight_chosen}} </li>
<li > <span onclick="displayinfo2()">
What does the network represent? <img src="images/questionmark.png" style="height:25px"> </span>
<div id="info2" class="information">
<p>The size of a node is proportional to the wealth of the actor it represents.</p>
<p>There is a link between actors when their commitment is higher than Threshold.
</p>
<p> The color of a node represents in which alliance the actor is.
<p>
Each period there are three potential Wars, Fight takes the values 1,2 and 3.
<p></div>
</li>
</ol>
</div>
</div>
</div>
<script>
function displayinfo2() {
var x = document.getElementById('info2');
if (x.style.display === 'none') {
x.style.display = 'block';
} else {
x.style.display = 'none';
}
}
</script>
<!--footer-starts-->
<div style="background-color:#D9D9D9">
<div class="footer">
<div class="container">
<div class="footer-text" id="download">
{{downloadlink}}
</div> </div>
</div>
</div>
<!--footer-end-->
<!-- Google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-92225624-1', 'auto');
ga('send', 'pageview');
</script>
<!-- Google Analytics -->
</body>
</html>