const_missing error

asked 2021-03-29 12:40:53 -0500

Vishak's avatar

updated 2021-04-02 12:16:19 -0500

Hello all, I am seeing this error when resstock executes the measure 'Residential Schedule Generator', the exact error is the following:

uninitialized constant ResidentialScheduleGenerator::ScheduleGenerator> at: eval:289:in `const_missing'
lib/resources/measures/ResidentialScheduleGenerator/measure.rb:89:in `run'

The error occurs in the line 89 of the measure, I checked the measure code and found there are 4 arguments being passed including: number_of_occupants, state, vacancy_start_date, vacancy_end_date. All the arguments have defaults values, but the default value of state is just blank "".

 arg = OpenStudio::Measure::OSArgument::makeStringArgument("state", true)
 arg.setDisplayName("State")
 arg.setDescription("Specify the state for which the schedule is to be generated")
 arg.setDefaultValue("") **#Default value in this line**
 args << arg

What could be the solution for this?

Thanks, Vishakh

edit retag flag offensive close merge delete

Comments

I inserted a command in the measure.rb file inside Residential ScheduleGenerator measure to look at the arguments. They are listed below: The house is occupied already thus setting the "Vacancy Status' characteristic to "Occupied"

num_occupants = 1; vacancy_start_date = "NA" vacancy_end_date = "NA" state = "FL"

However, it looks like the arguments are working fine, is the "const_missing" related to NA values in vacancy_start_date and vacancy_end_date?

Vishak's avatar Vishak  ( 2021-03-30 09:50:13 -0500 )edit