code: public Double net(String node, Double last, Double max, Double overloaded) {
          double r = Math.random() - 0.5;
          if (overloadedNodes.contains(node)) {
              if (last == null) {
                  return max + 100 * r;
              } else {
                  double v = last + 100 * r;
                  if (v > max) return max;
                  if (v < overloaded) return overloaded;
                  return v;
              }
          }
          if (last == null) {
              return 1000 + 100 * r;
          } else {
              double v = last + 100 * r;
              if (v > max) return max;
              if (v < 0) return 0d;
              return v;
          }
      }
docs: Network (kbps)