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

Revision history [back]

click to hide/show revision 1
initial version

argument in reporting measure

Hi, i get fault with this code :

def arguments()      
   args = OpenStudio::Ruleset::OSArgumentVector.new
   all_scheds = model.getSchedules
    sched_name_vec = OpenStudio::StringVector.new
    all_scheds.each do |sched|
    sched_name_vec << sched.name.get
    end
    sched_name = OpenStudio::Ruleset::OSArgument::makeChoiceArgument('Occupancy Schedule',sched_name_vec,false)
    sched_name.setDisplayName("Choose Occupancy Schedule")
    args << sched_name
    return args
  end #end the arguments method

  # return a vector of IdfObject's to request EnergyPlus objects needed by the run method
  def energyPlusOutputRequests(runner, user_arguments)
    super(runner, user_arguments)

    result = OpenStudio::IdfObjectVector.new

    # use the built-in error checking
    if !runner.validateUserArguments(arguments(), user_arguments)
      return result
    end
    request = OpenStudio::IdfObject.load("Output:Table:SummaryReports,AllSummaryAndSizingPeriod;").get
    result << request
    request = OpenStudio::IdfObject.load("Output:Table:TimeBins,*,Zone Air Temperature,14,2,8,,Temperature;").get
    result << request
    return result
  end

It gets undefined variable or method for model while i want to get all schedule as choices for my argument in a reporting measure. How to configure argument in reporting measure ?

argument in reporting measure

Hi, i get fault with this code :

def arguments()      
   args = OpenStudio::Ruleset::OSArgumentVector.new
   all_scheds = model.getSchedules
    sched_name_vec = OpenStudio::StringVector.new
    all_scheds.each do |sched|
    sched_name_vec << sched.name.get
    end
    sched_name = OpenStudio::Ruleset::OSArgument::makeChoiceArgument('Occupancy Schedule',sched_name_vec,false)
    sched_name.setDisplayName("Choose Occupancy Schedule")
    args << sched_name
    return args
  end #end the arguments method

  # return a vector of IdfObject's to request EnergyPlus objects needed by the run method
  def energyPlusOutputRequests(runner, user_arguments)
    super(runner, user_arguments)

    result = OpenStudio::IdfObjectVector.new

    # use the built-in error checking
    if !runner.validateUserArguments(arguments(), user_arguments)
      return result
    end
    request = OpenStudio::IdfObject.load("Output:Table:SummaryReports,AllSummaryAndSizingPeriod;").get
    result << request
    request = OpenStudio::IdfObject.load("Output:Table:TimeBins,*,Zone Air Temperature,14,2,8,,Temperature;").get
    result << request
    return result
  end

It gets undefined variable or method for model while i want to get all schedule as choices for my argument in a reporting measure. How to configure argument in reporting measure ?

argument in reporting measure

Hi, i I get fault with this code :

def arguments()      
   args = OpenStudio::Ruleset::OSArgumentVector.new
   all_scheds = model.getSchedules
    sched_name_vec = OpenStudio::StringVector.new
    all_scheds.each do |sched|
    sched_name_vec << sched.name.get
    end
    sched_name = OpenStudio::Ruleset::OSArgument::makeChoiceArgument('Occupancy Schedule',sched_name_vec,false)
    sched_name.setDisplayName("Choose Occupancy Schedule")
    args << sched_name
    return args
  end #end the arguments method

  # return a vector of IdfObject's to request EnergyPlus objects needed by the run method
  def energyPlusOutputRequests(runner, user_arguments)
    super(runner, user_arguments)

    result = OpenStudio::IdfObjectVector.new

    # use the built-in error checking
    if !runner.validateUserArguments(arguments(), user_arguments)
      return result
    end
    request = OpenStudio::IdfObject.load("Output:Table:SummaryReports,AllSummaryAndSizingPeriod;").get
    result << request
    request = OpenStudio::IdfObject.load("Output:Table:TimeBins,*,Zone Air Temperature,14,2,8,,Temperature;").get
    result << request
    return result
  end

It gets undefined variable or method for model while i want to get all schedule as choices for my argument in a reporting measure. How to configure argument in reporting measure ?