Description
Calculate policy indicator weight residual from explicit caller-supplied inputs.
A policy scenario makes eligibility bases, rates, thresholds, periods, and costs explicit. A calculated share or balance follows those assumptions. It does not select the governing policy or establish what caused an observed program outcome.
Calculate policy indicator weight residual from explicit caller-supplied inputs.
When to use this tool
Use it for policy indicator weight residual when the required inputs and conventions are already available.
How to use the tool and how it works
- Enter weights, included, targetWeight. Keep parallel arrays aligned and use the stated units and conventions.
- Run the calculation. Correct any input error before interpreting a result.
- Read totalWeight, includedWeight, residual. Inspect any known, defined, inclusion, or boundary flags before interpreting numeric values.
Require matching nonnegative weights and inclusion flags and nonnegative targetWeight. Return totalWeight, includedWeight summed only for included entries, and residual=targetWeight-includedWeight.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| weights | Weights | Required. Array of Finite number; minimum 0.; maximum items 256. |
| included | Included | Required. Array of Boolean.; maximum items 256. |
| targetWeight | Target Weight | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| totalWeight | Total Weight | Required. Finite number. |
| includedWeight | Included Weight | Required. Finite number. |
| residual | Residual | Required. Finite number. |
{
"input": {
"weights": [
2,
3
],
"included": [
true,
false
],
"targetWeight": 4
},
"output": {
"totalWeight": 5,
"includedWeight": 2,
"residual": 2
}
} Limitations and assumptions
- Residual may be negative when included weight exceeds the target. The tool does not normalize weights, choose indicators, or validate the construction of a policy index.
- The field tables describe structural bounds; the mechanics also state cross-field requirements. Malformed input shapes, disallowed keys, and invalid domains cause input errors. Results must remain finite and within the declared output contract. A successful false flag or zero placeholder is distinct from an error.
- Numeric arithmetic uses binary floating point. Exact comparisons have no hidden tolerance or decimal rounding; negative zero is exported as zero. Decimal-text integer operations retain the exactness specifically stated above.
Alternative or Complementary methods
For policy indicator weight residual, check the source records and the supplied rule before comparing the result with another method. Consult the applicable authoritative rule when deciding eligibility, legal timing, fees, or obligations.
References
Similar or alternative tools
- Policy Option Cost Weight
Return one supplied option cost contribution under an explicit nonnegative weight.
- Policy Band Boundary Distance
Calculate policy band boundary distance from explicit caller-supplied inputs.