
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
openstudio-standards
Advanced tools
The BTAP Costing Framework is one of the most comprehensive building lifecycle cost analysis systems available, providing detailed economic analysis for all building systems with Canadian-specific regional cost variations. This framework enables complete building cost estimation from conceptual design through detailed analysis, with integration for energy conservation measure (ECM) cost-benefit analysis.
btap_costing.rb) - Central cost calculation and regional interpolationcosting_database_wrapper.rb) - Cost data management and validationcommon_resources/) - Comprehensive Canadian cost dataBuilding Model → Component Analysis → Regional Cost Factors → Database Lookup → Cost Calculation → Results Aggregation
btap_costing.rb - Core SystemPrimary costing engine with regional cost factor integration
Key Features:
Core Methods:
# Get cost factors for specific location
get_regional_cost_factors(location)
# Find closest cost database location
get_closest_cost_location(lat, lon)
# Distance-based interpolation between locations
interpolate(target_location, reference_locations, values)
# Load complete cost database
load_database()
# Validate all cost data for consistency
validate_database()
# Generate regional cost databases
generate_construction_cost_database_for_all_cities()
# Add individual cost items to building total
add_costed_item(category, description, quantity, unit_cost, total_cost)
# Process list of cost items
cost_list_items(cost_item_array)
Mathematical utility for cost interpolation calculations
Purpose: Provides statistical interpolation for regional cost variations Usage: Used internally by BTAPCosting for distance-based cost adjustments
envelope_costing.rb)Building envelope component cost analysis
Components Covered:
Integration Points:
heating_cooling_costing.rb)Complete HVAC equipment and system costing
Equipment Categories:
Costing Methodology:
lighting_costing.rb & led_lighting_costing.rb)lighting_costing.rb)led_lighting_costing.rb)ventilation_costing.rb)Air handling and ventilation system economics
System Components:
shw_costing.rb)Complete service water heating system analysis
System Elements:
dcv_costing.rb)daylighting_sensor_control_costing.rb)nv_costing.rb)pv_ground_costing.rb)costing_database_wrapper.rb)Central database management and validation system
Key Functionality:
Critical Methods:
# Load database from CSV resources
load_database_from_resources()
# Validate complete database for consistency
validate_database()
# Validate construction set definitions
validate_constructions_sets()
# Validate HVAC equipment data
validate_ahu_items_and_quantities()
common_resources/)costs.csv: Base construction and equipment costscosts_local_factors.csv: Regional cost adjustment factors for all Canadian provinces/territorieslocations.csv: Geographic coordinates and regional data for cost interpolationmaterials_opaque.csv: Insulation, structural, and finish materialsmaterials_glazing.csv: Windows, glazing, and frame materialsmaterials_lighting.csv: Lighting fixtures, lamps, and control equipmentmaterials_hvac.csv: HVAC equipment, components, and installation materialsconstructions_opaque.csv: Wall, roof, floor, and foundation assembliesconstructions_glazing.csv: Window and door assembly definitionsconstruction_sets.csv: Complete building envelope construction setsConstructionProperties.csv: Thermal and physical properties with cost dataConstructions.csv: Detailed construction assembly specificationshvac_vent_ahu.csv: Air handling unit specifications, capacities, and costslighting_sets.csv: Complete lighting system packageslighting.csv: Individual lighting fixture and component costsAll Canadian provinces and territories included:
test_run_costing_tests.rb)Main test runner for comprehensive costing validation
Testing Categories:
parallel_tests.rb)Large-scale test execution for comprehensive validation
Capabilities:
copy_test_results_files_to_expected_results.rb: Test result management and baseline updatestest_run_all_test_locally.rb: Local development testing frameworknecb_reference_runs.csv)Comprehensive cost validation using Canadian reference buildings
Validation Coverage:
mech_sizing.json)HVAC system sizing and costing validation data
Content:
neb_end_use_prices.csv)Canadian utility rate integration for lifecycle cost analysis
Data Sources:
btap_measure_helper.rb)Integration with OpenStudio measure framework
Key Features:
Testing framework for measure integration
Testing Capabilities:
btap_workflow.rb)Integration with larger BTAP analysis workflows
Workflow Steps:
cost_building_from_file.rb)Automated costing from building definition files
Capabilities:
# Create costing object with database loading
costing = BTAPCosting.new
costing.load_database
# Validate database integrity
costing.validate_database
# Get regional cost factors for project location
location = "Toronto, ON"
cost_factors = costing.get_regional_cost_factors(location)
# Or use coordinates for precise interpolation
lat, lon = 43.7, -79.4
closest_location = costing.get_closest_cost_location(lat, lon)
# Example: Envelope costing
envelope_costs = calculate_envelope_costs(model, cost_factors)
# Example: HVAC system costing
hvac_costs = calculate_hvac_costs(model, cost_factors)
# Aggregate all system costs
total_cost = envelope_costs + hvac_costs + lighting_costs + ...
# Calculate baseline building cost
baseline_cost = calculate_total_building_cost(baseline_model, location)
# Calculate improved building cost
improved_cost = calculate_total_building_cost(improved_model, location)
# Determine incremental cost
ecm_cost = improved_cost - baseline_cost
# Calculate payback with energy savings
payback_period = ecm_cost / annual_energy_savings
# Compare costs across multiple Canadian cities
cities = ["Vancouver, BC", "Calgary, AB", "Toronto, ON", "Montreal, QC"]
costs = {}
cities.each do |city|
cost_factors = costing.get_regional_cost_factors(city)
costs[city] = calculate_total_building_cost(model, cost_factors)
end
# Analyze cost impacts of different design parameters
insulation_levels = [RSI_2, RSI_3, RSI_4, RSI_5]
costs = []
insulation_levels.each do |r_value|
modified_model = adjust_envelope_insulation(model, r_value)
cost = calculate_envelope_costs(modified_model, cost_factors)
costs << {r_value: r_value, cost: cost}
end
The costing framework fully integrates with NECB (National Energy Code for Buildings) requirements:
# Create new file: new_system_costing.rb
class NewSystemCosting
def self.calculate_costs(model, cost_factors, options = {})
# Implement costing logic
end
end
common_resources/This comprehensive framework represents years of Canadian building cost analysis expertise and provides the foundation for sophisticated building economic analysis.
FAQs
Unknown package
We found that openstudio-standards demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 32 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies