some benchmarks for scheduling
[IRC.git] / Robust / src / Benchmarks / PERT / Mcore / PERT.java
index 1aa9119999cceb49ce42e677c19405cf9d415e05..1d5ff8935306f5b7e5cf607649ed9f0cca6384e5 100644 (file)
@@ -1,5 +1,5 @@
 task t1(StartupObject s{initialstate}) {
-    System.printString("task t1\n");
+    //System.printString("task t1\n");
     int stages = 2;
     Estimator estimator = new Estimator(stages){estimate};
     for(int i = 0; i < stages; ++i) {
@@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) {
 }
 
 task t2(Stage s{sampling}) {
-    System.printString("task t2\n");
+    //System.printString("task t2\n");
 
     s.sampling();
 
@@ -18,7 +18,7 @@ task t2(Stage s{sampling}) {
 }
 
 task t3(Stage s{estimate}) {
-    System.printString("task t3\n");
+    //System.printString("task t3\n");
 
     s.estimate();
 
@@ -26,31 +26,31 @@ task t3(Stage s{estimate}) {
 }
 
 task t4(Estimator e{estimate}, Stage s{merge}) {
-    System.printString("task t4\n");
+    //System.printString("task t4\n");
 
     boolean fake = false;
     boolean finish = e.estimate(s.getAntTime(), s.getAntVariance2());
 
     if(finish) {
-       System.printI(0xff40);
+       //System.printI(0xff40);
        taskexit(e{!estimate, prob}, s{!merge});
     } else {
-       System.printI(0xff41);
+       //System.printI(0xff41);
        taskexit(s{!merge});
     }
 }
 
 task t5(Estimator e{prob}) {
-    System.printString("task t5\n");
+    //System.printString("task t5\n");
 
     int x = 10;
     int y = 20;
-    System.printString("x: " + x + "; y: " + y + "\n");
-    System.printString("The anticipate days need to finish this project is: " + e.getTime() + "\n");
-    System.printString("And the anticipate variance is: " + (int)(e.getVariance()*100) + "(/100)\n");
-    double prob = e.getProbability(x, y);
+    //System.printString("x: " + x + "; y: " + y + "\n");
+    //System.printString("The anticipate days need to finish this project is: " + e.getTime() + "\n");
+    //System.printString("And the anticipate variance is: " + (int)(e.getVariance()*100) + "(/100)\n");
+    float prob = e.getProbability(x, y);
 
-    System.printString("The probability of this project to be finished in " + x + " to " + y + " days is: " + (int)(prob*100) + "%\n");
-       System.printI((int)(prob*100));
+    //System.printString("The probability of this project to be finished in " + x + " to " + y + " days is: " + (int)(prob*100) + "%\n");
+    //System.printI((int)(prob*100));
     taskexit(e{!prob});
 }