NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
484 stars 185 forks source link

Unexpected behavior of `runner.getArgumentValues()` #5174

Closed joseph-robertson closed 2 months ago

joseph-robertson commented 2 months ago

Issue overview

The args hash looks different when replacing OsLib_HelperMethods.createRunVariables with runner.getArgumentValues.

Current Behavior

When calling args = runner.getArgumentValues(arguments(model), user_arguments), a nil is returned for any keys that are in arguments(model) but not in user_arguments.

Expected Behavior

If the script argument has a default value set, then args should at least return the default value for that key. (?)

Steps to Reproduce

Run this measure test for add_rooftop_pv using v3.8.0-rc1, replacing OsLib_HelperMethods.createRunVariables(...) with runner.getArgumentValues(...).

Possible Solution

Details

Related to https://github.com/NREL/OpenStudio/pull/5135.

Environment

Some additional details about your environment for this issue (if relevant):

Context

joseph-robertson commented 2 months ago

Is m_value here supposed to be m_defaultValue?