@@ -72,7 +72,7 @@ public class WaterBudget{
7272
7373 @ Description ("Smax" )
7474 @ In
75- public double Smax =10 ;
75+ public double Smax_ro =10 ;
7676
7777
7878 @ Description ("ODE solver model: dp853, Eulero " )
@@ -113,7 +113,8 @@ public void process() throws Exception {
113113 if (step ==0 ){
114114 for (Entry <Integer , double []> entry : entrySet ){
115115 Integer ID = entry .getKey ();
116- initialConditionS_i .put (ID ,new double []{Smax /2 });
116+ initialConditionS_i .put (ID ,new double []{Smax_ro /2 });
117+ System .out .println ("ro" +a_ro +"-" +b_ro +"-" +Smax_ro );
117118 }
118119 }
119120
@@ -156,10 +157,10 @@ public double computeS(double recharge, double S_i) throws IOException {
156157
157158
158159 /** Creation of the differential equation*/
159- FirstOrderDifferentialEquations ode =new waterBudgetODE (recharge ,a_ro ,b_ro );
160+ FirstOrderDifferentialEquations ode =new waterBudgetODE (recharge ,a_ro ,b_ro , Smax_ro );
160161
161162 /** Boundaries conditions*/
162- double [] y = new double [] { S_i , Smax };
163+ double [] y = new double [] { S_i , Smax_ro };
163164
164165 /** Choice of the ODE solver */
165166 SolverODE solver ;
@@ -171,7 +172,7 @@ public double computeS(double recharge, double S_i) throws IOException {
171172 /** Check of the Storage values: they cannot be negative*/
172173 if (S_i <0 ) S_i =0 ;
173174
174- //if(S_i<1)System.out.println("ro"+a_ro+"-"+b_ro+"-"+Smax );
175+ //if(S_i<1)System.out.println("ro"+a_ro+"-"+b_ro+"-"+Smax_ro );
175176
176177
177178 return S_i ;
@@ -185,7 +186,7 @@ public double computeS(double recharge, double S_i) throws IOException {
185186 * @throws IOException Signals that an I/O exception has occurred.
186187 */
187188 public double computeQ (double S_i ) throws IOException {
188- double Q =a_ro *Math .pow (S_i ,b_ro );
189+ double Q =a_ro *Math .pow (S_i / Smax_ro ,b_ro );
189190 return Q ;
190191 }
191192
0 commit comments