Skip to content

Commit

Permalink
add building_sqft_per_job to developer
Browse files Browse the repository at this point in the history
so res units and non-res units can be computed no matter which is being developerd (e.g. to account for mixed use buildings properly
  • Loading branch information
fscottfoti committed Aug 4, 2014
1 parent 0806517 commit f2738b1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions urbansim/developer/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def compute_units_to_build(num_agents, num_units, target_vacancy):

def pick(self, form, target_units, parcel_size, ave_unit_size,
current_units, max_parcel_size=200000, min_unit_size=400,
drop_after_build=True, residential=True):
drop_after_build=True, residential=True, bldg_sqft_per_job=400.0):
"""
Choose the buildings from the list that are feasible to build in
order to match the specified demand.
Expand All @@ -114,9 +114,11 @@ def pick(self, form, target_units, parcel_size, ave_unit_size,
The size of the parcels. This was passed to feasibility as well,
but should be passed here as well. Index should be parcel_ids.
ave_unit_size : series
The average unit size around each parcel - this is indexed
by parcel, but is usually a disaggregated version of a zonal or
accessibility aggregation.
The average residential unit size around each parcel - this is
indexed by parcel, but is usually a disaggregated version of a
zonal or accessibility aggregation.
bldg_sqft_per_job : float (default 400.0)
The average square feet per job for this building form.
min_unit_size : float
Values less than this number in ave_unit_size will be set to this
number. Deals with cases where units are currently not built.
Expand Down Expand Up @@ -152,11 +154,12 @@ def pick(self, form, target_units, parcel_size, ave_unit_size,
df['current_units'] = current_units
df = df[df.parcel_size < max_parcel_size]

df['residential_units'] = np.round(df.residential_sqft / df.ave_unit_size)
df['job_spaces'] = np.round(df.non_residential_sqft / bldg_sqft_per_job)

if residential:
df['residential_units'] = np.round(df.residential_sqft / df.ave_unit_size)
df['net_units'] = df.residential_units - df.current_units
else:
df['job_spaces'] = np.round(df.non_residential_sqft / df.ave_unit_size)
df['net_units'] = df.job_spaces - df.current_units
df = df[df.net_units > 0]

Expand Down

0 comments on commit f2738b1

Please sign in to comment.