-
-
Save ssfinney/3184101 to your computer and use it in GitHub Desktop.
Parking Spot calculator logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qty_parking_spots, | |
square_feet, | |
qty_lubrication_or_service_bay, | |
qty_day_shift_employees; | |
// Automobile or machinery sales and service garages | |
// rule: 1 parking space for each 400 square feet of floor area | |
qty_parking_spots = floor(square_feet / 400); | |
// Automobile service stations | |
// rules: 3 spaces for each lubrication or service bay | |
// 1 space for each employee on the day shift | |
qty_parking_spots = qty_lubrication_or_service_bay * 3 + qty_day_shift_employees; | |
var max_seating_capacity, | |
design_occupancy_load; | |
// Sports arenas‚ auditoriums‚ assembly halls‚ and meeting rooms (all with fixed seats) | |
// rule: 1 space for each 3.5 seats of maximum seating capacity | |
qty_parking_spots = round(max_seating_capacity / 3.5); | |
// Dance and exhibition halls and assembly halls without fixed seats | |
// rule: 1 space for each 3 persons of design occupancy load | |
qty_parking_spots = floor(design_occupancy_load / 3); | |
var qty_atm_machines; | |
// Banks with automatic teller machines | |
// rules: 1 space for each 400 square feet floor area | |
// 1.5 spaces for each ATM machine | |
qty_parking_spots = floor(square_feet / 400) + round(qty_atm_machines * 1.5); | |
// Banks without automatic teller machines | |
// rule: 1 space for each 400 square feet floor area | |
qty_parking_spots = floor(square_feet / 400); | |
var qty_billiard_tables; | |
// Billiard parlors | |
// rule: 1.5 spaces for each table | |
qty_parking_spots = round(qty_billiard_tables * 1.5); | |
// Business and professional offices | |
// rule: 1 space for each 300 square feet floor area | |
qty_parking_spots = floor(square_feet / 300); | |
// Communications equipment buildings | |
// rule: 1 space for each 1,000 square feet floor area | |
qty_parking_spots = floor(square_feet / 1000); | |
var qty_seats; | |
// Funeral homes & mortuaries | |
// rule: 1 space for each 5 seats of the aggregate number of seats provided in all assembly rooms | |
qty_parking_spots = floor(qty_seats / 5); | |
// Furniture repair | |
// rule: 1 space for each 500 square feet floor area | |
qty_parking_spots = floor(square_feet / 500); | |
// Furniture & appliance stores and household equipment | |
// rule: 1 space for each 800 square feet floor area | |
qty_parking_spots = floor(square_feet / 800); | |
// Houses of worship | |
// rule: 1 space for each 3.5 seats in the sanctuary | |
qty_parking_spots = round(qty_seats / 3.5); | |
var qty_beds, | |
qty_guests, | |
qty_total_employees, | |
qty_max_shift_employees; | |
// Boarding homes for the aged | |
// rules: 1 space for each 5 beds | |
// 1 space for each employee | |
qty_parking_spots = floor(qty_beds / 5) + qty_total_employees; | |
// Institutions for the aged | |
// rules: 1 space for every 5 guests | |
// 1 space for each employee on the shift with the maximum number of personnel | |
qty_parking_spots = floor(qty_guests / 5) + qty_max_shift_employees; | |
// Nursing homes | |
// rules: 1 space for every 5 guests | |
// 1 space for the resident manager | |
// 1 space for each employee on the shift with the maximum number of personnel | |
qty_parking_spots = floor(qty_guests / 5) + qty_max_shift_employees + 1; | |
// Children’s Homes | |
// rules: 1 space for each 5 beds | |
// 1 space for each employee | |
qty_parking_spots = floor(qty_beds / 5) + qty_total_employees; | |
// Family daycare and foster family homes | |
// rules: 1 space for every 5 guests | |
// 1 space for the resident owner or manager | |
qty_parking_spots = floor(qty_guests / 5) + 1; | |
var aerobics_area, | |
basketball_volleyball_occupancy, | |
pool_lanes, | |
pool_non_water_area, | |
weights_area; | |
// Multi-program fitness facilities | |
// rules: 1 space for each 100 square feet of floor area | |
// If floor space exceeds 15‚000 square feet‚ an additional 10% of parking spaces required | |
qty_parking_spots = floor(square_feet / 100); | |
if(square_feet > 15000) { | |
qty_parking_spots = round(qty_parking_spots * 1.1); | |
} | |
// Single-program fitness facilities | |
// rules: Aerobics: 1 space for each 50 square feet of floor area | |
// Basketball & volleyball: 1 space for each 3 persons of occupancy | |
// Lap pool: 2 spaces per lane | |
// Lap pool: 1 space for each 300 square feet of non-pool floor area (area that is not water) | |
// Weightlifting: 1 space for each 250 feet of floor area | |
// If total floor space exceeds 15‚000 square feet‚ an additional 10% of parking spaces required | |
qty_parking_spots = floor( aerobics_area / 50 + | |
basketball_volleyball_occupancy / 3 + | |
pool_lanes * 2 + | |
pool_non_water_area / 300 + | |
weights_area / 250 ); | |
if(square_feet > 15000) { | |
qty_parking_spots = round(qty_parking_spots * 1.1); | |
var qty_lodging_units; | |
// Community care residential facilities | |
// rules: 1 space for each 5 guests | |
// 1 space for the manager | |
// 1 space for each employee on the shift with the maximum number of personnel | |
qty_parking_spots = floor( qty_guests / 5 + | |
qty_max_shift_employees + 1 ); | |
// Hotels and Motels | |
// rules: 1 space for each unit intended for separate occupancy | |
// 1 space for the resident owner or manager | |
qty_parking_spots = qty_lodging_units + 1; | |
// Manufacturing, bottling, and processing plants | |
// rule: 1 space for each 500 square feet of floor area | |
qty_parking_spots = floor(square_feet / 500); | |
var pool_water_area; | |
// Convalescent hospitals | |
// rules: 1 space for each 5 beds | |
// 1 space for each employee on the shift with the maximum number of personnel | |
qty_parking_spots = floor( qty_beds / 5 + | |
qty_max_shift_employees ); | |
// Hospitals | |
// rules: 1 space for each bed | |
// 1 space for each employee on the shift with the maximum number of personnel | |
qty_parking_spots = qty_beds + qty_max_shift_employees; | |
// Medical and dental clinics and offices | |
// rule: 1 space for each 200 square feet of floor area | |
qty_parking_spots = floor(square_feet / 200); | |
// Physical therapy | |
// rules: 1 space per 200 square feet of floor area | |
1 space per 50 square feet of pool (water) area | |
qty_parking_spots = floor( square_feet / 200 + | |
pool_water_area / 50 ); | |
// Research and Development | |
// rule: 1 space for each 325 square feet of floor area | |
or 1 space for every 2 employees (maximum shift)‚ whichever is greater | |
if( floor(square_feet / 325) >= floor(qty_max_shift_employees / 2) ) { | |
qty_parking_spots = floor(square_feet / 325); | |
} else { | |
qty_parking_spots = floor(qty_max_shift_employees / 2); | |
} | |
var take_out_area; | |
// Restaurants‚ bars‚ other food service establishments‚ and nightclubs without live entertainment | |
// rule: 1 space for each 120 square feet of floor area | |
qty_parking_spots = floor(square_feet / 120); | |
// Restaurants with counter‚ take-out‚ or drive-in service | |
// rules: 1 space for each 120 square feet of floor area | |
// 1 space for each 50 square feet of floor area devoted to counter/take-out service | |
qty_parking_spots = floor( square_feet / 120 + | |
take_out_area / 50 ); | |
// Retail stores, shops, service establishments, & shopping centers | |
// rule: 1 space for each 250 square feet of floor area | |
qty_parking_spots = floor(square_feet / 250); | |
var qty_students; | |
// Elementary and junior high schools | |
// rule: 1 space for each employee | |
qty_parking_spots = qty_total_employees; | |
// High schools | |
// rules: 1 space for each employee | |
// 1 space for each 10 students | |
qty_parking_spots = floor(qty_students / 10) + qty_total_employees; | |
// Colleges and universities | |
// rules: 1 space for each employee | |
// 1 space for each 3 students | |
qty_parking_spots = floor(qty_students / 3) + qty_total_employees; | |
// Self-service laundry and dry cleaning establishments | |
// rule: 1 space for each 200 square feet of floor area | |
qty_parking_spots = floor(square_feet / 200); | |
// Theaters | |
// rules: 1 space for each 3.5 seats for the first 350 seats | |
// 1 space for each 5 additional seats | |
if( (qty_seats - 350) >= 0 ) { | |
qty_parking_spots = round(qty_seats / 3.5); | |
} else { | |
qty_parking_spots = floor( (qty_seats - 350) / 5 ) + 100; | |
// Wholesale, warehouses, and service & maintenance centers | |
// rule: 1 space for each 1‚000 square feet of floor area | |
qty_parking_spots = floor(square_feet / 1000); | |
return qty_parking_spots; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logic for all entries complete.