Description
Use a positive whole modulus and whole counters in [0,modulus-1], plus nonnegative whole suppliedCapacity.
A wrapping counter records a position within a finite cycle. Recovering elapsed use requires knowing whether a wrap occurred; a numeric usage remainder is separate from the actual condition or effectiveness of a treatment device.
Use a positive whole modulus and whole counters in [0,modulus-1], plus nonnegative whole suppliedCapacity.
When to use this tool
Use Water Filter Replacement Counter Remainder when reconciling one known counter interval against a supplied use capacity.
How to use the tool and how it works
- Enter counter, previousCounter, reset, modulus, suppliedCapacity. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read elapsed, remaining, due. Inspect due before interpreting the associated values.
Use a positive whole modulus and whole counters in [0,modulus-1], plus nonnegative whole suppliedCapacity. Without reset require counter >= previousCounter and compute elapsed = counter-previousCounter. With reset compute elapsed = counter+modulus-previousCounter, representing exactly one wrap. Return remaining = suppliedCapacity-elapsed and due = elapsed >= suppliedCapacity.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| counter | Counter | Required. Safe integer; minimum 0. |
| previousCounter | Previous Counter | Required. Safe integer; minimum 0. |
| reset | Whether to count exactly one modulus wrap; not arbitrary counter zeroing. | Required. Boolean. |
| modulus | Modulus | Required. Safe integer; minimum 1. |
| suppliedCapacity | Supplied Capacity | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| elapsed | Elapsed | Required. Safe integer. |
| remaining | Supplied capacity minus elapsed use, possibly negative. | Required. Safe integer. |
| due | Due | Required. Boolean. |
{
"input": {
"counter": 20,
"previousCounter": 980,
"reset": true,
"modulus": 1000,
"suppliedCapacity": 50
},
"output": {
"elapsed": 40,
"remaining": 10,
"due": false
}
} Limitations and assumptions
- reset means one counter wrap, not an arbitrary zeroing event. Multiple wraps cannot be inferred; remaining may be negative, and the supplied capacity does not certify filter effectiveness or drinking-water safety.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use complete maintenance and counter histories when resets or multiple wraps cannot be ruled out, and assess treatment performance independently.
References
Similar or alternative tools
- Household Water Filter Throughput Factor
Compute totalVolume = flowPerMinute*minutes, filteredVolume = totalVolume*(1-bypassFraction) and remainingRatedVolume = ratedVolume-priorVolume-filteredVolume.
- Household Water Storage Residual Volume Tool
Calculate household water storage residual volume from explicit caller-supplied inputs.