Module: BTAP::SimulationSettings

Defined in:
lib/openstudio-standards/btap/btap.rb

Class Method Summary collapse

Class Method Details

.set_run_period(model, start_month, start_day, end_month, end_day, repeat = 1) ⇒ OpenStudio::Model::Model

This sets the simulation period for the model. All arguments are integers.

Parameters:

  • model (OpenStudio::model::Model)
  • start_month (Integer)

    a list of output variables that you wish to report from the simulation.

  • start_day (Integer)

    a list of output variables that you wish to report from the simulation.

  • end_month (Integer)

    a list of output variables that you wish to report from the simulation.

  • end_day (Integer)

    a list of output variables that you wish to report from the simulation.

  • repeat (Integer = 1) (defaults to: 1)

    Number of times the simulation period is run. 1 is default.

Returns:

Author:

  • Phylroy A. Lopez



193
194
195
196
197
198
199
200
201
202
# File 'lib/openstudio-standards/btap/btap.rb', line 193

def self.set_run_period(model,start_month,start_day,end_month,end_day, repeat = 1)
  raise("Run Period is invalid") unless Date.valid_civil?(2001, start_month , start_day) and Date.valid_civil?(2001, end_month , end_day) and repeat > 0
  run_period = model.getRunPeriod
  run_period.setBeginMonth(start_month)
  run_period.setBeginDayOfMonth(start_day)
  run_period.setEndMonth(end_month)
  run_period.setEndDayOfMonth(end_day)
  run_period.setNumTimePeriodRepeats(repeat)
  return model
end