Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

As a work around here is code with use in some utility tariff EnergyPlus measures. You could use this to set an analysis period greater than 30 years in OpenStudio 1.14.0. This was too long to put as comment under @JasonGlazer's answer.

#remove any existing lifecycle cost parameters
workspace.getObjectsByType("LifeCycleCost:Parameters".to_IddObjectType).each do |object|
  runner.registerInfo("removed existing lifecycle parameters named #{object.name}")
  workspace.removeObjects([object.handle])
end

#and replace with the FEMP ones
life_cycle_params_string = "    
LifeCycleCost:Parameters,
  FEMP LifeCycle Cost Parameters,         !- Name
  EndOfYear,                              !- Discounting Convention
  ConstantDollar,                         !- Inflation Approach
  0.03,                                   !- Real Discount Rate
  ,                                       !- Nominal Discount Rate
  ,                                       !- Inflation
  ,                                       !- Base Date Month
  2011,                                   !- Base Date Year
  ,                                       !- Service Date Month
  2011,                                   !- Service Date Year
  25,                                     !- Length of Study Period in Years
  ,                                       !- Tax rate
  None;                                   !- Depreciation Method      
"  
life_cycle_params = OpenStudio::IdfObject::load(life_cycle_params_string).get
workspace.addObject(life_cycle_params)
runner.registerInfo("added lifecycle cost parameters named #{life_cycle_params.name}")