1.8 KiB
Goal: Solar + Wind 25-year generation simulation working as a pure Python module with CLI driver. Validated against one Excel scenario. Tasks:
S1-T01 Schema: SolarConfig, WindConfig, GenerationResult in engine/schemas/generation.py. S1-T02 Catalog: 3 solar 8760 profiles (RJ, KA, GJ) as CSV in engine/catalog/profiles/solar/. 3 wind profiles. Add loader. S1-T03 generation/solar.py: function simulate_solar(config: SolarConfig) -> pd.DataFrame returning 25y × 8760 rows with columns year, hour, dc_power_mw, ac_power_mw_pre_clip, ac_power_mw, degradation_factor. S1-T04 Solar logic: scaling, DC losses, inverter η, AC losses, clipping at MW_AC, availability, soiling (monthly profile or flat), Y1 + 0.7%, Y2-25 + 0.5% degradation. S1-T05 Tests: CUF reasonable (15-25% range for solar), clipping captures DC excess correctly, degradation factors monotonic. S1-T06 generation/wind.py: power curve lookup, wind shear correction, wake losses, electrical, availability, degradation. S1-T07 Wind tests: PLF reasonable (25-40%), edge cases (zero wind, gale wind = power=0). S1-T08 generation/bess_state.py: function simulate_bess_capacity(config: BessConfig, cum_cycles_per_year: list[float]) -> pd.Series returning usable MWh per year. Note: dispatch happens elsewhere; this module only models physical capacity. Augmentation as input list of (year, additional_mwh). S1-T09 CLI: remodel simulate-gen --input scenario.json --output gen.parquet. S1-T10 Parity test: load tests/fixtures/nagasamudra_inputs.json, run, compare year-1 generation against Excel value (within 0.1%). User to provide expected output. S1-T11 Documentation: packages/engine/docs/generation.md explaining the module and how to extend.
Definition of Done: CLI generates 25y output for the user's reference scenario. Year-1 CUF matches Excel within 0.1%. All tests pass.