double create(double a, double b, double c)

Computes a Priority level by combining three numbers in the range 0..1000.

The first number is a multiple of strong.

The second number is a multiple of medium.

The third number is a multiple of weak.

By convention, at least one of these numbers should be equal to or greater than 1.

Source

static double create(double a, double b, double c) {
  double result = 0.0;
  result += max(0.0, min(1e3, a)) * 1e6;
  result += max(0.0, min(1e3, b)) * 1e3;
  result += max(0.0, min(1e3, c));
  return result;
}