From: yeom Date: Tue, 3 Aug 2010 17:50:30 +0000 (+0000) Subject: last changes to power benchmark X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e5f9c3d62a06e751e1d67f884decc262e55a32ce;p=IRC.git last changes to power benchmark --- diff --git a/Robust/src/Benchmarks/oooJava/power/Root.java b/Robust/src/Benchmarks/oooJava/power/Root.java index 218fdfd3..6e9a08db 100644 --- a/Robust/src/Benchmarks/oooJava/power/Root.java +++ b/Robust/src/Benchmarks/oooJava/power/Root.java @@ -221,19 +221,22 @@ final class Root { double pp=0.0; double qq=0.0; - - for (int i = 0; i < feeders.length; i++) { + int l=feeders.length; + + for (int i = 0; i < l ; i++) { Lateral lateral=feeders[i]; sese parallel{ - DemandResult result=compute(lateral); - } - sese serial{ - pp+=result.P; - qq+=result.Q; + lateral.compute(theta_R, theta_I, theta_R, theta_I); } - } // end of for - D.P=pp; - D.Q=qq; + + } + + for(int i=0;i 35) - i = 35; +// if (i > 35) +// i = 35; + if (i > 34) + i = 34; double d_theta_R = -(theta_R - D.P / 10000.0) / (1 - (map_P[i + 1] - map_P[i]) / (PER_INDEX_R * 10000.0)); i = (int) ((theta_I - MIN_THETA_I) / PER_INDEX_I); if (i < 0) i = 0; - if (i > 35) - i = 35; +// if (i > 35) +// i = 35; + if (i > 34) + i = 34; double d_theta_I = -(theta_I - D.Q / 10000.0) / (1 - (map_Q[i + 1] - map_Q[i]) / (PER_INDEX_I * 10000.0));