Commits

Anonymous committed 03fc7f6

自己間引きモデルを定義

Comments (0)

Files changed (2)

build/built-jar.properties

-#Fri, 30 Mar 2012 11:52:53 +0900
+#Fri, 30 Mar 2012 14:11:11 +0900
 
 
 D\:\\yamamon=

src/YaMaMon/VolumeGraph.java

         double paramA = height / Math.pow( (1 - exp(paramB * age)), paramC);
         int thinFlag = 0;
         double Ry;
+        double diffRy;
+        double ratioDead;
         
         for (double incAge = age ; incAge < 100; incAge++) {
 
+            Ry =(0.068509 
+                    * Math.pow(height,-1.347464)
+                    + 2658.2 * Math.pow(height, -2.814651)
+                    / Math.pow(10, 5.3083) * Math.pow(height, -1.4672))
+                    / (0.068509 * Math.pow(height, -1.347464) + 2658.2
+                    * Math.pow(height, -2.814651) / density);
+            
             //System.out.println(ageArray[thinFlag]);
             //System.out.println((int)incAge);
             //System.out.println(ageArray.length >= thinFlag + 1);
             
             height = paramA * Math.pow((1 - exp(paramB * incAge)), paramC);
             
-            Ry =(0.068509 
-                    * Math.pow(height,-1.347464)
-                    + 2658.2 * Math.pow(height, -2.814651)
-                    / Math.pow(10, 5.3083) * Math.pow(height, -1.4672))
-                    / (0.068509 * Math.pow(height, -1.347464) + 2658.2
-                    * Math.pow(height, -2.814651) / density);
+
             
             estVolume = density 
                     * Math.pow(10d, (-4.203818 + 1.819629 * Math.log10(dbh)
             xySeries.add(incAge, estVolume);
             //            age = 1.00d + age ;
             
+            diffRy =((0.068509 
+                    * Math.pow(height,-1.347464)
+                    + 2658.2 * Math.pow(height, -2.814651)
+                    / Math.pow(10, 5.3083) * Math.pow(height, -1.4672))
+                    / (0.068509 * Math.pow(height, -1.347464) + 2658.2
+                    * Math.pow(height, -2.814651) / density)) - Ry;
             
-            
+            if(diffRy > 0){
+                ratioDead = 0.0793 * Math.pow(Math.E, 6.0454 *Ry);
+                System.out.println("diffRy: " + diffRy);
+                System.out.println("ratioDead: " + ratioDead);
+                density = density - density * ratioDead/100 * diffRy /0.1;
+            }
             
             dbh = dbh
                     + (3.06915 * exp(-1 * 0.022311 * incAge)
                     - 1.3136 * Math.log10(dbh)));
           //  System.out.println(estVolume);
           //  System.out.println(height);
-           // System.out.println(dbh);        
+            System.out.println(density);        
         }
 
         xySeriesCollection.addSeries(xySeries);
     XYPlot xyPlot = chart.getXYPlot();
     ValueAxis yAxis = xyPlot.getRangeAxis();
     yAxis.setAutoRange(false);
-    yAxis.setRange(0.0, 2500);
+    yAxis.setRange(0.0, 1500);
     ValueAxis xAxis = xyPlot.getDomainAxis();
     xAxis.setAutoRange(false);
     xAxis.setRange(0,100);