forked from shado-av/shado-webdev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimulator_test.html
1531 lines (1373 loc) · 89.7 KB
/
simulator_test.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
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Favicon -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<!-- required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap 4.1.1 libraries -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB"
crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
crossorigin="anonymous"></script>
<!-- Vue.js libraries -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<!-- vue tooltip library -->
<script src="script/v-tooltip.min.js"></script>
<!-- axios library for ajax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
<!-- Fontawesome Icons -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<!--D3 Libraries-->
<script src="https://d3js.org/d3.v5.js"></script>
<script src="script/d3pie.js"></script>
<!--Data Table Libraries-->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/dt-1.10.18/b-1.5.2/b-html5-1.5.2/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/v/dt/dt-1.10.18/b-1.5.2/b-html5-1.5.2/datatables.min.js"></script>
<!--nProgress Libraries-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
<!-- custom CSS and JavaScript -->
<link rel="stylesheet" href="css/simulator.css">
<link rel="stylesheet" href="css/print.css">
<script type="text/javascript" src="env.js"></script>
<script type="text/javascript" src="text.js"></script>
<script type="text/javascript" src="vue-component.js"></script>
<script type="text/javascript" src="sim.js" defer></script>
<script type="text/javascript" src="result.js" defer></script>
<script type="text/javascript" src="wait-time.js" defer></script>
<!-- title -->
<title>SHADO</title>
</head>
<body>
<!------------------------------------------------
Alert modal to replace javascript.alert
------------------------------------------------->
<div class="modal fade" id="alert-modal">
<div class="modal-dialog modal-sm modal-dialog-centered">
<div class="modal-content">
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" data-dismiss="modal" class="btn btn-primary mx-auto">Ok</button>
</div>
</div>
</div>
</div>
<!-----------------------------------------
TOP NAVIGATION
------------------------------------------>
<nav class="navbar fixed-top">
<div class="navbar-container">
<div class="d-flex flex-row">
<a class="navbar-brand" href="index.html">
<img src="images/hal_light.png" height="40" alt="HAL Logo">
<span id="brand">Simulator of Humans and Automation in Dispatch Operations</span>
<span id="brand-abbr">SHADO</span>
</a>
</div>
<div class="d-flex flex-row w-100">
<a href="background.html" class="ml-auto btn btn-outline-light" id="background-link">Background</a>
<a href="simulator.html" class="ml-2 btn btn-outline-light" id="simulator-link">Simulator</a>
<a href="help.html" class="ml-2 btn btn-outline-light" id="help-link">Help</a>
<a href="contact-us.html" class="ml-2 btn btn-outline-light" id="contact-us-link">Contact Us</a>
</div>
</div>
</nav>
<!-- navigation spacer -->
<div class="spacer"></div>
<!-- VUE APP MOUNT -->
<div id="shado-sim">
<!-----------------------------------------
SIDEBAR NAVIGATION
------------------------------------------>
<div class="d-flex flex-column justify-content-between" id="sim-sidebar">
<!-- navigation -->
<div id="sim-nav-submenus">
<!-- links to different tabs -->
<ul class="nav nav-pills" id="sim-nav" role="tablist" aria-orientation="vertical">
<li id="settings-menu-toggle" class="nav-link nav-header">
Settings
</li>
<!-- basic settings -->
<li class="nav-item">
<a class="nav-link active" id="basic-settings-tab" data-toggle="tab" href="#basic-settings" role="tab" aria-controls="basic-settings"
selected="true">Shift</a>
</li>
<!-- tasks -->
<li class="nav-item">
<a class="nav-link" id="tasks-settings-tab" data-toggle="tab" href="#tasks-settings" role="tab" aria-controls="tasks-settings"
selected="false">
Tasks
</a>
</li>
<!-- fleets -->
<li class="nav-item">
<a class="nav-link" id="fleets-settings-tab" data-toggle="tab" href="#fleets-settings" role="tab" aria-controls="fleets-settings"
selected="false">
{{textStrings.fleets}}
</a>
</li>
<!-- operators -->
<li class="nav-item">
<a class="nav-link" id="operators-settings-tab" data-toggle="tab" href="#operators-settings" role="tab" aria-controls="operators-settings"
selected="false">
{{textStrings.operators}}
</a>
</li>
<!-- overview -->
<li class="nav-item">
<a class="nav-link" id="review-settings-tab" data-toggle="tab" href="#review-settings" role="tab" aria-controls="review-settings" selected="false" ref="reviewSettingsTab">
Review Settings
</a>
</li>
<div class="nav-link nav-header">
Results
</div>
<li class="nav-item">
<a class="nav-link" :class="[miscSettings.viewResultsClass]" id="view-results-tab" data-toggle="tab" href="#view-results" role="tab" aria-controls="view-results" ref="viewResultsTab"
selected="false" :disabled="miscSettings.viewResultsDisabled">
View Results
</a>
<!-- links to different results tabs -->
</li>
</ul>
</div>
<div class="">
<!-- Download Buttons -->
<div class="form-row justify-content-center">
<div>
<a :href="'data:' + miscSettings.downloadJsonData" download="shadoParams.json" v-show="miscSettings.downloadJsonVisible">Download <br> Server Input</a>
</div>
</div>
<div class="divider"></div>
<div class="form-row justify-content-center">
<a href="sim-test.html" target="_blank">Sim. With<br>Server Input</a>
</div>
</div>
</div>
<!-----------------------------------------
SIMULATOR TAB CONTENT
------------------------------------------>
<div class="tab-content" id="sim-content">
<!-----------------------------------------
BASIC/GLOBAL SETTINGS
(globalSettings)
------------------------------------------>
<div class="tab-pane fade active show" id="basic-settings" role="tabpanel" aria-lablledby="basic-settings-tab">
<h3 class="mb-4">Shift</h3>
<!-- TYPE & HOURS -->
<!-- type of simulation (simType) -->
<div class="modal fade" id="sim-type" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<div class="col-sm">
<h3 id="sim-type-title">Simulation shift & type:</h3>
</div>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<div class="row mb-4">
<div class="col-12 mb-2">
<span>1. Choose shift:</span>
</div>
<div class="col-12">
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" name="simulation-shift" id="task-simulation-shift-morning"
value="Morning" checked v-model="miscSettings.simShift">
<label class="custom-control-label" for="task-simulation-shift-morning">Morning</label>
</div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" name="simulation-shift" id="task-simulation-shift-afternoon"
value="Afternoon" v-model="miscSettings.simShift">
<label class="custom-control-label" for="task-simulation-shift-afternoon">Afternoon</label>
</div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" name="simulation-shift" id="task-simulation-shift-night"
value="Night" v-model="miscSettings.simShift">
<label class="custom-control-label" for="task-simulation-shift-night">Night</label>
</div>
</div>
</div>
<div class="row">
<div class="col-12 mb-2">
<span>2. Choose type:</span>
</div>
<div class="col-12 col-sm-6 col-lg-4 image-card">
<a href="javascript:void(0)" @click="setSimType('Aviation')">
<img src="images/airport.jpg" class="img-responsive" alt="">
<div class="overlay">
<h3 class="image-card-title">Aviation</h3>
</div>
</a>
</div>
<div class="col-12 col-sm-6 col-lg-4 image-card">
<a href="javascript:void(0)" @click="setSimType('Rail')">
<img src="images/railway.jpg" class="img-responsive" alt="">
<div class="overlay">
<h3 class="image-card-title">Rail</h3>
</div>
</a>
</div>
<div class="col-12 col-sm-6 col-lg-4 image-card">
<a href="javascript:void(0)" @click="setSimType('General')">
<img src="images/station.jpg" class="img-responsive" alt="">
<div class="overlay">
<h3 class="image-card-title">General</h3>
</div>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!--
<div class="form-group">
<label class="col-form-label">1. </label>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#sim-type">
Choose Type of Simulation
</button>
{{globalSettings.simType}}
</div>
-->
<!-- hours in shift (numHours) -->
<div class="form-group">
<label for="num-hours">
{{textStrings.questionHours}}
</label>
<div class="mb-3">
<number-input :min=1 :max=12 :step=1
:value.sync="globalSettings.numHours" @change="updateTrafficLvls"
></number-input>
</div>
</div>
<!-- transitioning periods (transfer of duty) -->
<div class="form-group">
<label class="col-form-label">{{textStrings.questionTransition}}
<span v-tooltip.bottom="textStrings.tooltipTransition">
<span class="fas fa-info-circle"></span>
</span>
</label>
<div v-show="globalSettings.isTransition === 'y'">
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" id="transition-beginning" class="custom-control-input" v-model="globalSettings.hasTransition[0]">
<label class="custom-control-label" for="transition-beginning">{{textStrings.optionTransition[0]}}</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" id="transition-ending" class="custom-control-input" v-model="globalSettings.hasTransition[1]">
<label class="custom-control-label" for="transition-ending">{{textStrings.optionTransition[1]}}</label>
</div>
</div>
</div>
<div v-for="n in [0, 1]" :class="{options: globalSettings.hasTransition[n]}">
<distribution-params :dist-label="textStrings.questionTransitionDuration[n]"
:dist.sync=globalSettings.transitionDists[n] :params.sync=globalSettings.transitionPms[n]
v-show="globalSettings.hasTransition[n]"></distribution-params>
</div>
<!-- EXOGENOUS FACTORS -->
<!-- <h5 class="mb-3">Exogenous Factors</h5>-->
<!-- type of exogenous factors (exoFactorsType) -->
<div class="form-group">
<label>{{textStrings.questionExtremeCondition}}</label>
<div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" id="exo-type-1" class="custom-control-input" v-model="globalSettings.exoFactorsType[0]">
<label class="custom-control-label" for="exo-type-1">
{{textStrings.optionExtremeCondition[0]}} <span v-tooltip.bottom="{ content: 'This is an example tooltip for checkbox answer.'}"><span class="fas fa-info-circle"></span></span>
</label>
</div>
<div class="custom-control custom-checkbox custom-control-inline">
<input type="checkbox" id="exo-type-2" class="custom-control-input" v-model="globalSettings.exoFactorsType[1]">
<label class="custom-control-label" for="exo-type-2">
{{textStrings.optionExtremeCondition[1]}} <span v-tooltip.bottom="{ content: 'This is an example tooltip for checkbox answer.'}"><span class="fas fa-info-circle"></span></span>
</label>
</div>
</div>
</div>
</div>
<!-----------------------------------------
TASK SETTINGS
(taskSettings)
------------------------------------------>
<div class="tab-pane fade" id="tasks-settings" role="tabpanel" aria-lablledby="tasks-settings-tab">
<!-- TASK SIDEBAR NAVIGATION -->
<ul class="nav nav-tabs">
<!-- all tasks global settings -->
<li class="nav-item">
<a class="nav-link active" id="tasks-global-settings-tab" data-toggle="tab" href="#tasks-global-settings" role="tab" aria-controls="tasks-global-settings"
selected="true">
Task List
</a>
</li>
<!-- tab for each task -->
<li class="nav-item" v-for="(task, index) in taskSettings.tasks" v-if="task.include">
<a class="nav-link" :id="'tasks-' + index + '-settings-tab'" data-toggle="tab" :href="'#tasks-' + index + '-settings'" role="tab"
:aria-controls="'tasks-' + index + '-settings'" selected="false">
{{ task.name }}
<!-- <span @click="removeCustomTask(task)"><i class="fas fa-minus-square" style="color:red"></i></span>-->
</a>
</li>
<!-- add task -->
<li class="nav-item">
<a class="nav-link" id="tasks-add-tab" href="#" @click="addTask" role="tab" aria-controls="tasks-add">
<i class="fas fa-plus-square"></i> Add
</a>
</li>
</ul>
<!-- TASK TAB CONTENT -->
<div class="tab-content" id="tasks-settings-content">
<!-- TASK GLOBAL SETTINGS -->
<div class="tab-pane fade show active" id="tasks-global-settings" role="tabpanel" aria-labelledby="tasks-global-settings-tab">
<h3 class="mb-4">Task Settings</h3>
<!-- tasks assigned to operators (task.include) -->
<h5>Which tasks are assigned to the operators?</h5>
<p class="text-muted small">Include up to
<b>15</b> task types from the list of provided tasks or add tasks.</p>
<div class="mt-3 alert alert-danger" v-if="noTasksIncluded">
Please include at least one task.
</div>
<!-- LIST OF TASKS -->
<div class="custom-control custom-checkbox mb-4 task" v-for="(task, index) in taskSettings.tasks" v-if="task.leadTask === -1">
<input class="custom-control-input" type="checkbox" :id="'task-type-' + index" v-model="task.include" :disabled="disableAddTask(task)">
<label class="custom-control-label h6" :for="'task-type-' + index">{{ task.name }}</label>
<button type="button" class="delete btn badge badge-danger" @click="removeCustomTask(task)" aria-label="Close">
<i class="fas fa-times"></i>
</button>
<!-- <p class="pr-4">Details about the task and an overview of its default parameters will go here.</p>-->
</div>
<!-- ADD A CUSTOM TASK -->
<button type="button" class="btn btn-secondary btn-sm" @click="addCustomTask" :disabled="maxTasksReached">
<i class="fas fa-plus fa-xs"></i> Add Task</button>
</div>
<!-- INDIVIDUAL TASK SETTINGS -->
<div class="tab-pane fade" v-for="(task, index) in taskSettings.tasks" v-if="task.include" :id="'tasks-' + index + '-settings'"
role="tabpanel" :aria-labelledby="'tasks-' + index + '-settings-tab'">
<!-- DELETE TASK -->
<button type="button" class="delete btn badge badge-danger" @click="removeCustomTask(task)" aria-label="Close">
<i class="fas fa-times"></i>
</button>
<!-- NAME -->
<h3 class="mb-4">{{ task.name }}</h3>
<!-- task name (task.name) -->
<div class="form-group form-row">
<label class="col-md-3 col-lg-2 col-form-label">1. Task Name</label>
<div class="col-md-9 col-lg-10">
<input class="form-control" type="text" v-model="task.name"
@focus="miscSettings.inputString = task.name" @change = "changeInputString('Task', task)">
</div>
</div>
<!-- task affected by type 2 condition (task.exoType2Aff) -->
<div class="form-group">
<label class="col-form-label">2. Is this task affected by weather?</label>
<div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'exo-type2-affects'" :id="'task-' + index + 'exo-type2-affects-y'"
value="y" v-model="task.exoType2Aff">
<label class="custom-control-label" :for="'task-' + index + 'exo-type2-affects-y'">Yes</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'exo-type2-affects'" :id="'task-' + index + 'exo-type2-affects-n'"
value="n" v-model="task.exoType2Aff">
<label class="custom-control-label" :for="'task-' + index + 'exo-type2-affects-n'">No</label>
</div>
</div>
</div>
<!-- TASK TRAFFIC -->
<!-- traffic different (task.affectByIROPS) -->
<div class="form-group">
<label class="col-form-label">3. Is this task affected by traffic?</label>
<div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio"
:id="'task-' + index + 'traffic-y'"
value="1" v-model.number="task.affectByIROPS[0]">
<label class="custom-control-label" :for="'task-' + index + 'traffic-y'">Yes</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio"
:id="'task-' + index + 'traffic-n'"
value="0" v-model.number="task.affectByIROPS[0]">
<label class="custom-control-label" :for="'task-' + index + 'traffic-n'">No</label>
</div>
</div>
</div>
<!-- task affected by team coordination (task.affTeamCoord) -->
<div class="form-group">
<label class="col-form-label">4. Is this task affected by team coordination?</label>
<div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'team-coord-affects'" :id="'task-' + index + 'team-coord-affects-y'"
value="y" v-model="task.affTeamCoord">
<label class="custom-control-label" :for="'task-' + index + 'team-coord-affects-y'">Yes</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'team-coord-affects'" :id="'task-' + index + 'team-coord-affects-n'"
value="n" v-model="task.affTeamCoord">
<label class="custom-control-label" :for="'task-' + index + 'team-coord-affects-n'">No</label>
</div>
</div>
</div>
<div>5. Essential / interruptible</div>
<div class="pt-3 options">
<div class="form-group">
<label class="col-form-label">Is this task essential? <span v-tooltip.bottom="{ content: 'This is a task of the highest priority.'}"><span class="fas fa-info-circle"></span></span></label>
<div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'essential'" :id="'task-' + index + 'essential-y'"
value="y" v-model="task.essential" @change="task.interruptible='n'">
<label class="custom-control-label" :for="'task-' + index + 'essential-y'">Yes</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'essential'" :id="'task-' + index + 'essential-n'"
value="n" v-model="task.essential">
<label class="custom-control-label" :for="'task-' + index + 'essential-n'">No</label>
</div>
</div>
<div class="pt-3" v-show="task.essential==='n'">
<label class="col-form-label">{{textStrings.qInterruptible}} <span v-tooltip.bottom="{ content: textStrings.tooltipInterruptible}"><span class="fas fa-info-circle"></span></span></label>
<div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'interruptible'" :id="'task-' + index + 'interruptible-y'"
value="y" v-model="task.interruptable">
<label class="custom-control-label" :for="'task-' + index + 'interruptible-y'">Yes</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" :name="'task-' + index + 'interruptible'" :id="'task-' + index + 'interruptible-n'"
value="n" v-model="task.interruptable">
<label class="custom-control-label" :for="'task-' + index + 'interruptible-n'">No</label>
</div>
</div>
</div>
</div>
</div>
<!-- DISTRIBUTIONS -->
<!--
<h5 class="mb-0">Distributions</h5>
<small class="form-text text-muted mb-4">Distribution types take different parameters.</small>
-->
<!-- arrival time distribution (task.arrivalDistribution) -->
<div v-if="task.leadTask === - 1">6. How frequently does this task occur for a {{textStrings.operator.toLowerCase()}}?</div>
<div v-else>6. After {{ taskSettings.tasks[task.leadTask].name }} task arrives, when does this task follow?</div>
<div class="options mt-3">
<distribution-params :lead-task=task.leadTask :n-option=0 params-label="Interarrival Time Parameters" :dist.sync=task.arrivalDistribution[0] :params.sync=task.arrivalParam[0]></distribution-params>
</div>
<!-- expiration time distribution (task.expireDistribution) -->
<div>7. When this task appears, how much time can it wait to be completed before it becomes invalid?</div>
<div class="options mt-3">
<distribution-params :n-option=2 params-label="Expiration Time Parameters" :dist.sync=task.expireDistribution[0] :params.sync=task.expireParam[0]></distribution-params>
</div>
<!-- service time distribution (task.serviceDistribution) -->
<div>8. How long does it take a {{textStrings.operator.toLowerCase()}} to complete this task?</div>
<div class="options mt-3">
<distribution-params params-label="Service Time Parameters" :dist.sync=task.serviceDistribution[0] :params.sync=task.serviceParam[0]></distribution-params>
</div>
<!-- HUMAN ERROR PROBABILITY -->
<!--<h5 class="mb-3">Human Error Probability</h5>-->
<!-- human error probability numbers (task.humanErrorProb) -->
<label>9. How would you describe this task?<span v-tooltip.bottom="{ content: 'This determines chance of human error, whether the task generally is more automated and based on skills or more effortful and based on rules or involves thinking outside procedures, based on knowledge.'}"><span class="fas fa-info-circle"></span></span></label>
<div class="form-group">
<select class="custom-select width-small" v-model="task.humanErrorSelect"
@change="updateHumanErrorProb(task)">
<option :value="key" v-for="(value, key) in miscSettings.humanErrorProb">{{value.text}}</option>
</select>
</div>
<div class="form-group" v-if="task.leadTask === -1">
<!-- tasks assigned to operators (task.include) -->
<h5 class="mb-3">Which tasks are following this task?</h5>
<p class="text-muted small">Include up to
<b>10</b> following task types from the list of provided tasks or add following custom tasks.</p>
<!-- LIST OF Following TASKS -->
<div class="custom-control custom-checkbox mb-4 task" v-for="(taskf, indexf) in taskSettings.tasks" v-if="index === taskf.leadTask" >
<input class="custom-control-input" type="checkbox" :id="'taskf-type-' + indexf" v-model="taskf.include" :disabled="disableAddFollowingTasks(taskf,index)">
<label class="custom-control-label h6" :for="'taskf-type-' + indexf">{{ taskf.name }}</label>
</div>
<!-- Add Following Tasks -->
<button type="button" class="btn btn-secondary btn-sm" @click="addFollowingTask(task)" :disabled="maxFollowingTasksReached(index)">
<i class="fas fa-plus fa-xs"></i> Add Following Task</button>
</div>
</div>
</div>
</div>
<!-----------------------------------------
OPERATOR SETTINGS
(operatorSettings)
------------------------------------------>
<div class="tab-pane fade" id="operators-settings" role="tabpanel" aria-lablledby="operators-settings-tab">
<!-- OPERATOR SIDEBAR NAVIGATION -->
<ul class="nav nav-tabs">
<!-- all operator teams global settings -->
<li class="nav-item">
<a class="nav-link active" id="operators-global-settings-tab" data-toggle="tab" href="#operators-global-settings" role="tab"
aria-controls="operators-global-settings" selected="true">
{{textStrings.operatorList}}
</a>
</li>
<!-- tab for each operator team -->
<li class="nav-item" v-for="(team, index) in operatorSettings.teams">
<a class="nav-link" :id="'opteam-' + index + '-settings-tab'" data-toggle="tab" :href="'#opteam-' + index + '-settings'"
role="tab" :aria-controls="'opteam-' + index + '-settings'" selected="false">
{{ team.name }}
</a>
</li>
<!-- add operator -->
<li class="nav-item">
<a class="nav-link" id="operators-add-tab" href="#" @click="addOperatorTeam" role="tab" aria-controls="operators-add">
<i class="fas fa-plus-square"></i> Add
</a>
</li>
</ul>
<!-- OPERATOR TAB CONTENT -->
<div class="tab-content" id="operators-settings-content">
<!-- OPERATOR GLOBAL SETTINGS -->
<div class="tab-pane fade show active" id="operators-global-settings" role="tabpanel" aria-labelledby="operators-global-settings-tab">
<h3 class="mb-4">{{textStrings.operatorSettings}}</h3>
<!-- number of operator teams (numTeams) -->
<div class="form-group">
<div class="mb-3">How many different teams of {{textStrings.operators.toLowerCase()}} are there?</div>
<number-input :min=1 :max=99 :step=1
:value.sync="operatorSettings.numTeams" @change="updateOperatorTeams"
></number-input>
</div>
<!-- Is this operator flexible? -->
<div class="form-group">
<label class="col-form-label">Is there a flex team who can handle any tasks/{{textStrings.fleets.toLowerCase()}}?</label>
<div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" name="opteam-flexible"
id="opteam-flex-y" v-model="operatorSettings.hasFlexPosition" value="y">
<label class="custom-control-label" for="opteam-flex-y">Yes</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" name="opteam-flexible"
id="opteam-flex-n" v-model="operatorSettings.hasFlexPosition" value="n">
<label class="custom-control-label" for="opteam-flex-n">No</label>
</div>
</div>
</div>
<!-- How many operators are in the flex team? -->
<div class="form-group" v-show="operatorSettings.hasFlexPosition === 'y'">
<div class="mb-3">How many {{textStrings.operators.toLowerCase()}} are in the flex team?</div>
<number-input :min=1 :max=99 :step=1
:value.sync="operatorSettings.flexTeamSize"></number-input>
</div>
</div>
<!-- INDIVIDUAL OP TEAM SETTINGS -->
<div class="tab-pane fade" v-for="(team, index) in operatorSettings.teams" :id="'opteam-' + index + '-settings'" role="tabpanel"
:aria-labelledby="'opteam-' + index + '-settings-tab'">
<!-- DELETE TEAM -->
<button type="button" class="delete btn badge badge-danger" v-show="operatorSettings.numTeams > 1" @click="removeOperatorTeam(team)"
aria-label="Close">
<i class="fas fa-times"></i>
</button>
<h3 class="mb-4">{{ team.name }}</h3>
<!-- TEAM SETTINGS-->
<!-- operator team name (team.name) -->
<div class="form-group form-row">
<label class="col-md-3 col-lg-2 col-form-label">1. Team Name</label>
<div class="col-md-9 col-lg-10">
<input class="form-control" type="text" v-model="team.name" @focus="miscSettings.inputString = team.name" @change = "changeInputString('Team', team)">
</div>
</div>
<div class="mb-3">2. Team Size / Communication</div>
<div class="options">
<div class="form-group">
<!-- team size (team.size) -->
<div class="mb-3">How large is the team?</div>
<div>
<number-input :min=1 :max=99 :step=1 :value.sync="team.size"></number-input>
</div>
<!-- team communications (team.comms) -->
<div v-show="team.size>1">
<label class="mt-3 mb-3">Does this team have some level of communications?</label>
<br/>
<select class="custom-select width-small" v-model="team.comms">
<option value="N">None</option>
<option value="S">Some</option>
<option value="F">Full</option>
</select>
</div>
</div>
</div>
<!-- OPERATOR EXPERTISE -->
<!-- <h5 class="mb-3">{{textStrings.operator}} Tasks/{{textStrings.fleets}}</h5>-->
<!-- operator expertise checklist (team.expertise) -->
<div class="form-group">
<label class="mb-3">3. What tasks/{{textStrings.fleets.toLowerCase()}} are these {{textStrings.operators.toLowerCase()}} responsible for?</label>
<!-- adjust task/fleet operators are responsible for (team.expertise) -->
<div class="alert alert-info" v-if="!checkExpertise(team)">
At least one active task/{{textStrings.fleet.toLowerCase()}} combo needs to be selected for this operator.
</div>
<div class="table-responsive">
<table class="form-group table">
<thead class="thead-light">
<th></th>
<th v-for="(fleet, i) in fleetSettings.fleets">
{{fleet.name}}
</th>
<th>{{textStrings.otherSources}}</th>
</thead>
<tbody>
<tr v-for="(task,i) in taskSettings.tasks" v-show="task.include">
<td>{{task.name}}</td>
<td v-for="(fleet, j) in fleetSettings.fleets">
<input type="checkbox" v-model="team.expertise[i][j]" :disabled="!checkOpExpertise(fleet, i)"/>
</td>
<td>
<input type="checkbox" v-model="team.expertiseOS[i]" :disabled="!checkOpExpertiseOS(i)"/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- operator strategies (team.strategy) -->
<div class="form-group">
<label>4. {{textStrings.operator}} Strategies</label>
<select class="custom-select" v-model="team.strategy">
<option value="FIFO">First In First Out</option>
<option value="STF">Shortest Task First</option>
<option value="PRTY">Priority</option>
</select>
</div>
<div class="form-group form-row table-responsive" v-show="team.strategy === 'PRTY'">
<!-- adjust priority task(team.tasks) -->
<table class="form-group table">
<thead class="thead-light">
<th>Task</th>
<th>Priority</th>
</thead>
<tbody>
<tr v-for="(task,i) in taskSettings.tasks" v-show="task.include && checkIfTaskSelected(team,i)">
<td>{{task.name}}</td>
<td>
<select class="custom-select" v-show="task.essential==='y'" disabled='true'>
<option>Essential</option>
</select>
<select class="custom-select" v-model.number="team.priority[0][i]" v-show="task.essential==='n'">
<option value="6">High</option>
<option value="5">Moderate</option>
<option value="4">Neutral</option>
<option value="3">Somewhat</option>
<option value="2">Low</option>
<option value="1">Not a Priority</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Error Catching Chance -->
<!-- <h5 class="mb-3">Error Catching Chance</h5>-->
<!-- fail threshold (team.failThresh) -->
<div class="mb-3">5. For every error, what is the chance that the team will catch it for each task?</div>
<div class="form-group row">
<div class="col">
<div class="item mb-2" v-for="(task, i) in taskSettings.tasks" v-show="taskSettings.tasks[i].include">
<div>{{task.name}}</div>
<number-input :min=0 :max=10 :step=1 text-end="out of every 10" margin :value.sync="team.failThresh[0][i]"></number-input>
</div>
</div>
</div>
<!-- AIDA -->
<!-- <h5 class="mb-3">Artificial Intelligence Decision Aid</h5>-->
<!-- team AIDA (team.AIDA) -->
<label class="mb-3">6. What level of AI does this team have?</label>
<!-- equal operator (AIDA.equalOperator) -->
<div class="mb-3">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" :id="'opteam-' + index + '-AIDA-1'" v-model="team.AIDA.AIDAType[0]">
<label class="custom-control-label" :for="'opteam-' + index + '-AIDA-1'">{{textStrings.AIDATypeStr[0]}}</label>
</div>
</div>
<div :class="{options:team.AIDA.AIDAType[0]}">
<div class="form-group" v-show="team.AIDA.AIDAType[0]">
<div>Is this AI faster or slower than a human {{textStrings.operator.toLowerCase()}} to complete a task?</div>
<select class="mt-3 mb-3 custom-select width-small" v-model="team.AIDA.ETServiceTimeQ">
<option value="F">Faster</option>
<option value="S">Slower</option>
<option value="E">Exactly Same</option>
</select>
<div v-show="team.AIDA.ETServiceTimeQ !== 'E'">
<div class="form-inline">
<span class="mr-2">
<number-input float :min=1.01 :max=100 :step=0.5 text-end="times" :value.sync="team.AIDA.ETServiceTime"></number-input>
</span>
<span v-if="team.AIDA.ETServiceTimeQ === 'F'">faster</span>
<span v-else>slower</span>
</div>
<small class="form-text text-muted mb-3">How many times?</small>
</div>
<hr/>
<div>Does this AI more or less likely fail a task than a human {{textStrings.operator.toLowerCase()}}?</div>
<select class="mt-3 mb-3 custom-select width-small" v-model="team.AIDA.ETErrorRateQ">
<option value="S">More Likely</option>
<option value="F">Less Likely</option>
<option value="E">Exactly Same</option>
</select>
<div v-show="team.AIDA.ETErrorRateQ !== 'E'">
<div class="form-inline">
<span class="mr-2">
<number-input float :min=1.01 :max=100 :step=0.5 text-end="times" :value.sync="team.AIDA.ETErrorRate"></number-input>
</span>
<span v-if="team.AIDA.ETErrorRateQ === 'S'">more likely</span>
<span v-else>less likely</span>
</div>
<small class="form-text text-muted mb-3">How many times?</small>
</div>
<hr/>
<div>Does this AI more or less likely catch an error than a human {{textStrings.operator.toLowerCase()}}?</div>
<select class="mt-3 mb-3 custom-select width-small" v-model="team.AIDA.ETFailThresholdQ">
<option value="S">More Likely</option>
<option value="F">Less Likely</option>
<option value="E">Exactly Same</option>
</select>
<div v-show="team.AIDA.ETFailThresholdQ !== 'E'">
<div class="form-inline">
<span class="mr-2">
<number-input float :min=1.01 :max=100 :step=0.5 text-end="times" :value.sync="team.AIDA.ETFailThreshold"></number-input>
</span>
<span v-if="team.AIDA.ETFailThresholdQ === 'S'">more likely</span>
<span v-else>less likely</span>
</div>
<small class="form-text text-muted mb-3">How many times?</small>
</div>
</div>
</div>
<!-- assisting individuals (AIDA.assistingIndividuals) -->
<div class="mb-3">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" :id="'opteam-' + index + '-AIDA-2'" v-model="team.AIDA.AIDAType[1]">
<label class="custom-control-label" :for="'opteam-' + index + '-AIDA-2'">{{textStrings.AIDATypeStr[1]}}</label>
</div>
</div>
<div :class="{options: team.AIDA.AIDAType[1]}">
<div class="form-group" v-show="team.AIDA.AIDAType[1]">
<div class="mb-3">What tasks are this AI responsible for?</div>
<div class="alert alert-info" v-if="!checkIATask(team)">
At least one task needs to be selected for this AI.
</div>
<div class="custom-control custom-checkbox item mb-2" v-for="(task,i) in taskSettings.tasks" v-show="task.include && checkIfTaskSelected(team,i,true)">
<input class="custom-control-input" type="checkbox" :id="'opteam-ia-' + index + '-task-' + i" :value="i" v-model="team.AIDA.IATasks">
<label class="custom-control-label" :for="'opteam-ia-' + index + '-task-' + i">{{ taskSettings.tasks[i].name }}</label>
</div>
<div class="mb-3 mt-3">What is the level of this AI?</div>
<div class="custom-control custom-control-inline custom-radio"> <input class="custom-control-input" type="radio" :id="'assist-indi-levels-some-' + index" value="S" v-model="team.AIDA.IALevel">
<label class="custom-control-label" :for="'assist-indi-levels-some-'+index">Some</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" :id="'assist-indi-levels-full-' + index" value="F" v-model="team.AIDA.IALevel">
<label class="custom-control-label" :for="'assist-indi-levels-full-'+index">Full</label>
</div>
</div>
</div>
<!-- assisting in team coordinations (AIDA.assistingTeamCoord) -->
<div class="mb-3" v-show="team.comms !== 'N'">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" :id="'opteam-' + index + '-AIDA-3'" v-model="team.AIDA.AIDAType[2]">
<label class="custom-control-label" :for="'opteam-' + index + '-AIDA-3'">{{textStrings.AIDATypeStr[2]}}</label>
</div>
</div>
<div :class="{options:team.AIDA.AIDAType[2]}">
<div class="form-group" v-show="team.AIDA.AIDAType[2]">
<div class="mb-3">What is the level of this AI?</div>
<div class="custom-control custom-control-inline custom-radio">
<input class="custom-control-input" type="radio" :id="'assist-team-levels-some-'+index" value="S" v-model="team.AIDA.TCALevel">
<label class="custom-control-label" :for="'assist-team-levels-some-'+index">Some</label>
</div>
<div class="custom-control custom-control-inline custom-radio mr-0">
<input class="custom-control-input" type="radio" :id="'assist-team-levels-full-'+index" value="F" v-model="team.AIDA.TCALevel">
<label class="custom-control-label" :for="'assist-team-levels-full-'+index">Full</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-----------------------------------------
FLEET SETTINGS
(fleetSettings)
------------------------------------------>
<div class="tab-pane fade" id="fleets-settings" role="tabpanel" aria-lablledby="fleets-settings-tab">
<!-- FLEETS SIDEBAR NAVIGATION -->
<ul class="nav nav-tabs">
<!-- all fleets global settings -->
<li class="nav-item">
<a class="nav-link active" id="fleets-global-settings-tab" data-toggle="tab" href="#fleets-global-settings" role="tab" aria-controls="fleets-global-settings"
selected="true">
{{ textStrings.fleet }} List
</a>
</li>
<!-- tab for each individual fleet -->
<li class="nav-item" v-for="(fleet, index) in fleetSettings.fleets">
<a class="nav-link" :id="'fleet-' + index + '-settings-tab'" data-toggle="tab" :href="'#fleet-' + index + '-settings'" role="tab"
:aria-controls="'fleet-' + index + '-settings'" selected="false">
{{ fleet.name }}
</a>
</li>
<li class="nav-item">
<a class="nav-link" id="fleets-other-sources-settings-tab" data-toggle="tab" href="#fleets-other-sources-settings" role="tab" aria-controls="fleets-other-sources-settings">
{{textStrings.otherSources}}
</a>
</li>
<!-- add fleet -->
<li class="nav-item">
<a class="nav-link" id="fleets-add-tab" href="#" @click="addFleet" role="tab" aria-controls="fleets-add">
<i class="fas fa-plus-square"></i> Add
</a>
</li>
</ul>
<!-- FLEETS TAB CONTENT -->
<div class="tab-content" id="fleets-settings-content">
<!-- FLEET GLOBAL SETTINGS -->
<div class="tab-pane fade show active" id="fleets-global-settings" role="tabpanel" aria-labelledby="fleets-global-settings-tab">
<h3 class="mb-4">{{ textStrings.fleetSettings }}</h3>
<!-- number of fleets (fleetTypes) -->
<div class="form-group">
<div class="mb-3">{{ textStrings.qFleets }}</div>
<number-input :min=1 :max=99 :step=1
:value.sync="fleetSettings.fleetTypes" @change="updateFleets"></number-input>
</div>
</div>
<!-- INDIVIDUAL FLEET SETTINGS -->
<div class="tab-pane fade" v-for="(fleet, index) in fleetSettings.fleets" :id="'fleet-' + index + '-settings'" role="tabpanel"
:aria-labelledby="'fleet-' + index + '-settings-tab'">
<!-- DELETE FLEET -->
<button type="button" class="delete btn badge badge-danger" v-show="fleetSettings.fleetTypes > 1" @click="removeFleet(fleet)"
aria-label="Close">
<i class="fas fa-times"></i>
</button>
<h3 class="mb-4">{{ fleet.name }}</h3>
<!-- FLEET SETTINGS -->
<!-- fleet name (fleet.name) -->
<div class="form-group form-row">
<label class="col-md-3 col-lg-2 col-form-label">1. {{ textStrings.fleet}} Name</label>
<div class="col-md-9 col-lg-10">
<input class="form-control" type="text" v-model="fleet.name"
@focus="miscSettings.inputString = fleet.name" @change = "changeInputString('Fleet', fleet)">
</div>
</div>
<div>2. {{ textStrings.fleet}} Size / Communication</div>
<div class="mt-3 options">
<!-- number of vehicles (fleet.numVehicles) -->
<div class="form-group">
<div class="mb-3">{{ textStrings.qNumVeh }}</div>
<div>
<number-input :min=1 :max=99 :step=1 :value.sync="fleet.numVehicles"></number-input>
</div>
<!-- fleet communications (fleet.comms) -->
<div v-show="fleet.numVehicles > 1">
<label class="mt-3 mb-3">Does this {{ textStrings.fleet.toLowerCase() }} have some level of vehicle-to-vehicle communication?</label>
<br/>
<select class="custom-select width-small" v-model="fleet.comms">
<option value="N">None</option>
<option value="S">Some</option>
<option value="F">Full</option>
</select>
</div>
</div>
</div>
<!-- FLEET TASKS -->
<!-- <h5 class="mb-3">{{ textStrings.fleet}} Tasks</h5>-->
<!-- fleet task checklist (fleet.tasks) -->
<div class="form-group">
<label class="mb-3">3. Which tasks are associated with this {{ textStrings.fleet.toLowerCase() }}?</label>
<div class="alert alert-info" v-if="!checkFleetTask(fleet)">
At least one task needs to be selected for the fleet.
</div>
<div class="custom-control custom-checkbox mb-2" v-for="(task, i) in taskSettings.tasks" v-show="task.include && !fleetSettings.otherSources.tasks.includes(i)">
<input class="custom-control-input" type="checkbox" :id="'fleet-' + index + '-task-' + i" :value="i" v-model="fleet.tasks">
<label class="custom-control-label" :for="'fleet-' + index + '-task-' + i">{{ task.name }}</label>
</div>
</div>
<!-- TRAFFIC -->
<!-- <h5 class="mb-3">Traffic</h5>-->
<!-- different traffic levels (diffTrafficLevels) -->
<div class="form-group">