calculate_repair_or_replace
Decide repair vs replace for home appliances using the 50% rule: weigh cumulative repair costs, age, expected lifespan, and proposed repair cost against replacement cost for a clear recommendation.
Instructions
Run the standard repair-or-replace decision math for a home appliance. Returns a recommendation based on: cumulative repair cost vs. replacement cost, age vs. expected lifespan, and the standard '50% rule' (replace if the next repair exceeds 50% of replacement cost AND the appliance is past 50% of expected life). Use this when a user is weighing whether to fix or replace an appliance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| age_years | Yes | Current age of the appliance in years. | |
| appliance_type | Yes | Appliance type. Supported values: refrigerator, freezer, dishwasher, washer, dryer, oven, range, microwave, garbage_disposal, hvac, furnace, ac_central, water_heater_tank, water_heater_tankless, dehumidifier, water_softener. | |
| replacement_cost_usd | Yes | Cost to buy a new equivalent appliance (USD). | |
| proposed_repair_cost_usd | Yes | Cost of the proposed next repair (USD). | |
| cumulative_repair_cost_usd | No | Total amount spent on past repairs for this appliance (USD). |