Spaces:
Sleeping
Sleeping
File size: 2,154 Bytes
90d5657 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
import gradio as gr
def cmda_redevelopment_calculator(uds, num_owners, guideline_value, construction_cost, current_area):
# Calculations
normal_fsi_area = 2.0 * uds
premium_fsi_area = 2.8 * uds
extra_area = 0.8 * uds # This is the part that needs premium FSI
# Premium FSI charges
premium_fsi_charge = 0.4 * guideline_value * extra_area
# Total construction cost (for full 2.8x UDS build)
total_construction_cost = premium_fsi_area * construction_cost
# Area per owner (equal split)
area_per_owner = premium_fsi_area / num_owners
uds_per_owner = uds / num_owners
current_area_per_owner = current_area / num_owners
# Benefit per owner
area_gain_per_owner = area_per_owner - current_area_per_owner
return {
"Normal FSI Buildable Area (2.0 x UDS)": f"{normal_fsi_area:.2f} sq.ft",
"Max Buildable Area with Premium FSI (2.8 x UDS)": f"{premium_fsi_area:.2f} sq.ft",
"Extra Area via Premium FSI (0.8 x UDS)": f"{extra_area:.2f} sq.ft",
"Premium FSI Charges": f"₹ {premium_fsi_charge:,.2f}",
"Total Construction Cost (at 2.8 x UDS)": f"₹ {total_construction_cost:,.2f}",
"Built-up Area per Owner": f"{area_per_owner:.2f} sq.ft",
"Current Area per Owner": f"{current_area_per_owner:.2f} sq.ft",
"Net Area Gain per Owner": f"{area_gain_per_owner:.2f} sq.ft"
}
# Gradio interface
inputs = [
gr.Number(label="Current UDS (in sq.ft)", value=450),
gr.Number(label="Number of Owners", value=4),
gr.Number(label="Guideline Value (₹/sq.ft)", value=5000),
gr.Number(label="Construction Cost (₹/sq.ft)", value=3500),
gr.Number(label="Current Total Area (in sq.ft)", value=1800)
]
outputs = gr.JSON(label="CMDA Redevelopment Report")
app = gr.Interface(
fn=cmda_redevelopment_calculator,
inputs=inputs,
outputs=outputs,
title="CMDA Redevelopment Calculator (Equal Share Model)",
description="This calculator estimates redevelopment potential based on UDS, FSI rules, and premium FSI charges. Assumes equal area distribution among owners."
)
if __name__ == "__main__":
app.launch()
|