diff options
| author | ziejd2 | 2017-09-14 15:39:41 -0500 |
|---|---|---|
| committer | ziejd2 | 2017-09-14 15:57:50 -0500 |
| commit | c4f926438dcb8abe805e910399940f79ff643c4b (patch) | |
| tree | 3146d05ada5cf4b48d9bdd16c1baa498e8df7192 /sourcecodes/executionprogress.php | |
| parent | 57ebf49403b75dcf8482d174b59f7fd2a961d98e (diff) | |
| download | BNW-c4f926438dcb8abe805e910399940f79ff643c4b.tar.gz | |
Add files via upload
Diffstat (limited to 'sourcecodes/executionprogress.php')
| -rw-r--r-- | sourcecodes/executionprogress.php | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/sourcecodes/executionprogress.php b/sourcecodes/executionprogress.php new file mode 100644 index 00000000..99483a02 --- /dev/null +++ b/sourcecodes/executionprogress.php @@ -0,0 +1,76 @@ +<?php +////////////////This code load a data file and creates input file for continuous global optimal search (our modification). execute_bn_gom.php link is for execution of structure learning and create_tiers_gom.php is for adding restrictions/////////////////////////////////// + +include("header_new.inc"); +include("runtime_check.php"); + + +$keyval=$_GET["My_key"]; +$dir="./data/"; + +//number of parents +$pfile=$dir.$keyval."parent.txt"; +$parent_number=file_get_contents("$pfile"); + + +//number of k for model averaging +$kfile=$dir.$keyval."k.txt"; +$k_number=file_get_contents("$kfile"); + + +$parent_number=trim($parent_number); +$k_number=trim($k_number); + +//////////////////Check execution time/////////////////////////////////////////////// +$runtime=exe_time($keyval,$parent_number,$k_number); + +?> + +<div> +<p><h3><?php +print("Estimated run time: $runtime seconds"); +?> +<br><br></h3> +<br> +<table align="center"><tr><td><b></br></br></br>Computing ....</b> +<div style="font-size:20pt;padding:6px;border:solid black 4px"> +<span id="progress1"> </span> +<span id="progress2"> </span> +<span id="progress3"> </span> +<span id="progress4"> </span> +<span id="progress5"> </span> +<span id="progress6"> </span> +<span id="progress7"> </span> +<span id="progress8"> </span> +<span id="progress9"> </span> +<span id="progress10"> </span> +</p> +</div> +</td></tr></table> + +<script language="javascript"> +<!-- Begin Script +var progressEnd = 10; // set to number of progress <span>'s. +var progressColor = 'blue'; // set to progress bar color +var progressInterval = 1000; // set to time between updates (milli-seconds) + +var progressAt = progressEnd; +var progressTimer; +function progress_clear() { +for (var i = 1; i <= progressEnd; i++) document.getElementById('progress'+i).style.backgroundColor = 'transparent'; +progressAt = 0; +} +function progress_update() { +progressAt++; +if (progressAt > progressEnd) progress_clear(); +else document.getElementById('progress'+progressAt).style.backgroundColor = progressColor; +progressTimer = setTimeout('progress_update()',progressInterval); +} +// End --> + +progress_update(); +</script> +</div> +<script> +window.open("execute_bn_gom.php?My_key=<?php print($keyval);?>",'_self',false); +</script> |
