Compare commits
2 commits
35cfc409e2
...
5098bf86f4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5098bf86f4 | ||
|
|
f224e98e0a |
2 changed files with 28 additions and 13 deletions
|
|
@ -683,7 +683,13 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) {
|
||||||
const solarTotalCr = computeCostWithTax(costItems, "SolarOnly");
|
const solarTotalCr = computeCostWithTax(costItems, "SolarOnly");
|
||||||
const windTotalCr = computeCostWithTax(costItems, "WindOnly");
|
const windTotalCr = computeCostWithTax(costItems, "WindOnly");
|
||||||
const bessTotalCr = computeCostWithTax(costItems, "BESSOnly");
|
const bessTotalCr = computeCostWithTax(costItems, "BESSOnly");
|
||||||
const totalCostCr = solarTotalCr + windTotalCr + bessTotalCr;
|
|
||||||
|
// Calculate upfront lease cost based on user inputs (acres * rate * years)
|
||||||
|
const leaseRate = gv(inputs, "project", "land_lease_rate", 0.4);
|
||||||
|
const leaseYears = gv(inputs, "project", "land_lease_years", 5);
|
||||||
|
const upfrontLeaseCostCr = effectiveLandAcres * leaseRate * leaseYears;
|
||||||
|
|
||||||
|
const totalCostCr = solarTotalCr + windTotalCr + bessTotalCr + upfrontLeaseCostCr;
|
||||||
|
|
||||||
// COD sync helper
|
// COD sync helper
|
||||||
function handlePlantCodChange(v: string) {
|
function handlePlantCodChange(v: string) {
|
||||||
|
|
@ -967,7 +973,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) {
|
||||||
</div>
|
</div>
|
||||||
</ToggleCard>
|
</ToggleCard>
|
||||||
|
|
||||||
{/* ── Land & Common ────────────────────────────────────── */}
|
{/* ── Land & Common ────────────────────────────────────── */}
|
||||||
<CollapsibleCard title="Land & Common Costs" cols={3}>
|
<CollapsibleCard title="Land & Common Costs" cols={3}>
|
||||||
<NumField
|
<NumField
|
||||||
label="Total Land Area"
|
label="Total Land Area"
|
||||||
|
|
@ -981,7 +987,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) {
|
||||||
<NumField
|
<NumField
|
||||||
label="Lease Rate"
|
label="Lease Rate"
|
||||||
sub="Lakh/acre/year"
|
sub="Lakh/acre/year"
|
||||||
value={gv(inputs, "project", "land_lease_rate", 0.4)}
|
value={leaseRate}
|
||||||
onChange={(v) => upd("project", "land_lease_rate", v)}
|
onChange={(v) => upd("project", "land_lease_rate", v)}
|
||||||
step={0.05}
|
step={0.05}
|
||||||
min={0}
|
min={0}
|
||||||
|
|
@ -990,7 +996,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) {
|
||||||
<NumField
|
<NumField
|
||||||
label="Lease Years"
|
label="Lease Years"
|
||||||
sub="3, 5, 10 or custom"
|
sub="3, 5, 10 or custom"
|
||||||
value={gv(inputs, "project", "land_lease_years", 5)}
|
value={leaseYears}
|
||||||
onChange={(v) => upd("project", "land_lease_years", v)}
|
onChange={(v) => upd("project", "land_lease_years", v)}
|
||||||
step={1}
|
step={1}
|
||||||
min={1}
|
min={1}
|
||||||
|
|
@ -998,7 +1004,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) {
|
||||||
suffix="yr"
|
suffix="yr"
|
||||||
/>
|
/>
|
||||||
<div className="col-span-3 text-[10px] text-muted-foreground py-1">
|
<div className="col-span-3 text-[10px] text-muted-foreground py-1">
|
||||||
Upfront Lease Cost: <span className="font-medium text-foreground">{effectiveLandAcres * (gv(inputs, "project", "land_lease_rate", 0.4) || 0) * (gv(inputs, "project", "land_lease_years", 5) || 0)} Cr</span>
|
Upfront Lease Cost (included in Total Project Cost): <span className="font-medium text-foreground">{upfrontLeaseCostCr.toFixed(2)} Cr</span>
|
||||||
</div>
|
</div>
|
||||||
</CollapsibleCard>
|
</CollapsibleCard>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,11 @@ import { useState } from "react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import type { ScenarioInputPayload } from "@/lib/api";
|
import type { ScenarioInputPayload } from "@/lib/api";
|
||||||
|
|
||||||
|
// Helper to convert decimal to percentage display
|
||||||
|
function pct(raw: number): number {
|
||||||
|
return parseFloat((raw * 100).toFixed(2));
|
||||||
|
}
|
||||||
|
|
||||||
const LOCATION_OPTIONS = [
|
const LOCATION_OPTIONS = [
|
||||||
{ value: "RJ", label: "Rajasthan (High Solar)" },
|
{ value: "RJ", label: "Rajasthan (High Solar)" },
|
||||||
{ value: "GJ", label: "Gujarat (High Solar)" },
|
{ value: "GJ", label: "Gujarat (High Solar)" },
|
||||||
|
|
@ -359,14 +364,18 @@ function StepSolver({
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
{state.solver_mode === "solve_tariff" ? (
|
{state.solver_mode === "solve_tariff" ? (
|
||||||
<Field label="Target Equity IRR (e.g. 0.18 = 18%)">
|
<Field label="Target Equity IRR">
|
||||||
<Input
|
<div className="flex items-center gap-1.5">
|
||||||
type="number"
|
<Input
|
||||||
value={state.target_irr}
|
type="number"
|
||||||
step={0.01}
|
value={pct(state.target_irr)}
|
||||||
min={0.05}
|
step={1}
|
||||||
onChange={(v) => set("target_irr", Number(v))}
|
min={5}
|
||||||
/>
|
max={40}
|
||||||
|
onChange={(v) => set("target_irr", Number(v) / 100)}
|
||||||
|
/>
|
||||||
|
<span className="text-sm text-muted-foreground">%</span>
|
||||||
|
</div>
|
||||||
</Field>
|
</Field>
|
||||||
) : (
|
) : (
|
||||||
<Field label="Fixed Tariff (INR/kWh)">
|
<Field label="Fixed Tariff (INR/kWh)">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue