code: private double getHydrograph( int k, double[][] Qpartial, double localdelay, double delay, int tp )
  
      {
  
          double Qmax = 0;
          double tmin = rainData[0][0]; /* [min] */
          int j = 0;
          double t = tmin;
          double Q;
          double rain;
          int maxRain = 0;
          if (tMax == tpMaxCalibration) {
              maxRain = rainData.length;
          } else {
              maxRain = tp / dt;
          }
          double tMaxApproximate = ModelsEngine.approximate2Multiple(tMax, dt);
  
          for( t = tmin, j = 0; t <= tMaxApproximate; t += dt, ++j ) {
              Q = 0;
  
              for( int i = 0; i <= maxRain - 1; ++i ) {
  
                  // [ l / s ]
  
                  rain = rainData[i][1] * networkPipes[k].getDrainArea() * networkPipes[k].getRunoffCoefficient()
                          * HAOVERH_TO_METEROVERS;
  
                  if (t <= i * dt) {
                      Q += 0;
                  } else if (t <= (i + 1) * dt) {
                      Q += rain * pFunction(k, t - i * dt, localdelay, delay);
                  } else {
                      Q += rain * (pFunction(k, t - i * dt, localdelay, delay) - pFunction(k, t - (i + 1) * dt, localdelay, delay));
                  }
              }
  
              Qpartial[j][k] = Q;
              if (Q >= Qmax) {
                  Qmax = Q;
              }
  
          }
          return Qmax;
  
      }
docs: Restituisce l'idrogramma.
  
  @param k tratto di tubazione.
  @param Qpartial matrice delle portate temporanee necessarie per costriure 'idrogramma.
  @param localdelay  ritardo della tubazione k.
  @param delay ritardo temporale.