Closed DavidGoldwasser closed 7 years ago
I looked into a case where the measure.rb argument doesn't have a default value of 0, and was surprised that in that case both the 'default_value' and 'static' used the measure.rb default, but 'value' still used the correct 0.4
@kflemin - Some specifics here.
Currently, in the first measure in the second image, when Electric Equipment Power Density has it's static default field set to '0.4' the corresponding [:variable][:argument][:value]
is set. (The measure default is 0.55
.) I don't know that this is wrong, (i.e. I wouldn't change that,) but the [:variable][:static_value]
needs to be set equal to the updated value as well. I think that [:variable][:static_value]
inherits from [:variable][:argument][:default_value]
, which I assume is populated from measure manager, but when it's updated the change doesn't get persisted? (Best guess!)
now setting static_value to 'value' key's value. default_value remains the measure's default_value unless it is nil, in which case the 'value' key's value will be used. https://github.com/NREL/OpenStudio-PAT/commit/151da4e393f53c7f0cfa04660a37d1230a13ce0b
Thank you @kflemin!
@DavidGoldwasser are you able to test these yet? If so, could you try this one again on PAT develop?
Looks good running on NREL24a with Mac 2.1.2 installer
This hit me and @henryHorsey when trying to use Baseline Perturbation, which makes use of the static value.
"default_value" is set off of what is shown in the GUI, but "static" seems to come from the measure.rb default value for a specific argument.
Screenshot below shows GUI on left and analysis JSON on the right for Window to Wall Ratio variable.