KatInterview

Calculate Power Plant Economics and Renewable Breakeven

Math & Bit ManipulationAuto-graded · 15 test cases
MediumAuto-gradedMath & Bit Manipulationbreak-even analysisprofit calculationbusiness metrics

Last updated

Tests break-even analysis, contribution margin calculations, capacity constraints, and financial comparison of energy generation alternatives.

A power generation company operates a conventional plant and is evaluating renewable alternatives. You must calculate the production volume needed to meet profit targets, assess policy constraints, and compare two renewable test facilities.

Write a function that takes the financial parameters of a conventional power plant and two renewable test plants (solar and ethanol), then returns:

  1. Required production volume: How many MWh the conventional plant must generate annually to achieve a target profit equal to a specified fraction of its initial capital investment.

  2. Capacity checks: Whether the required volume fits within the plant's maximum capacity and within a regulatory generation cap.

  3. Solar test plant metrics: Expected annual output (accounting for weather variability), annual profit, and payback period in years.

  4. Ethanol test plant metrics: Annual profit and payback period in years.

  5. Recommendation: Which test plant to pursue if capital is unlimited, based on annual profit.

Conventional Plant Economics

The plant has:

  • Maximum annual capacity (MWh)
  • Monthly lease payment (millions of dollars)
  • Annual fixed operating costs (millions of dollars)
  • Variable cost per MWh generated
  • Revenue per MWh sold
  • Initial capital investment (millions of dollars)

The target annual profit is a fraction of the initial investment (e.g., 0.1 means 10% return).

To find required volume, solve:

Volume × (Revenue - Variable Cost) = Annual Lease + Annual Fixed Costs + Target Profit

Annual lease cost = Monthly lease × 12

Solar Test Plant

The solar facility has:

  • Capital expenditure (millions of dollars)
  • Probability of sunny conditions
  • Annual output during sunny conditions (MWh)
  • Annual output during cloudy conditions (MWh)
  • Revenue per MWh (no variable costs)

Expected annual output = (Sunny Probability × Sunny Output) + ((1 - Sunny Probability) × Cloudy Output)

Annual profit = Expected Output × Revenue per MWh (converted to millions)

Payback period = Capital expenditure / Annual profit

Ethanol Test Plant

The ethanol facility has:

  • Capital expenditure (millions of dollars)
  • Fixed annual output capacity (MWh)
  • Variable cost per MWh
  • Revenue per MWh

Annual profit = Output × (Revenue - Variable Cost) (converted to millions)

Payback period = Capital expenditure / Annual profit

Recommendation Logic

Choose the test plant with higher annual profit. If profits are equal, prefer solar.

Constraints

  • All monetary inputs in millions except per-MWh costs/revenues (in dollars)
  • 0 < capacity ≤ 10,000,000 MWh
  • 0 < investment_recovery_fraction ≤ 1
  • 0 ≤ solar_sunny_probability ≤ 1
  • All costs, revenues, and outputs are positive
  • Payback periods are computed assuming profits remain constant

Examples

Example 1

Input: calculate_power_economics(8800000, 5, 25, 20, 40, 400, 0.1, 5000000, 12.5, 0.75, 150000, 50000, 40, 2.5, 100000, 30, 40)

Output: {'required_fossil_mwh': 6250000, 'within_capacity': True, 'within_policy_cap': False, 'solar_expected_annual_output_mwh': 125000, 'solar_annual_profit_m': 5, 'solar_payback_years': 2.5, 'ethanol_annual_profit_m': 1, 'ethanol_payback_years': 2.5, 'recommended_test_plant': 'solar'}

Hints

Hint 1

Calculate total annual fixed costs by combining the annualized lease with other fixed costs

Hint 2

Use contribution margin (revenue minus variable cost) to find the volume needed for target profit

Hint 3

Compare renewable options on annual profit, not just payback period, when capital is unlimited