Closed shorowit closed 1 month ago
I may be seeing that in one of the measures in https://github.com/NREL/openstudio-calibration-gem/pull/66
So I guess a question is putting in 3.8.0. Is this low risk and easy enough to fix today to put in release package tomorrow, or if there is a work around to bypass the issue, do we wait.
MCVE
arg = OpenStudio::Measure::OSArgument::makeDoubleArgument("double", true)
arg.setValue(10.0)
arg.valueAsJSON
=> 10
arg.valueAsJSON.class
=> Integer
Issue overview
Very simple OSW to demonstrate the issue: test.zip
Run it w/ OpenStudio 3.8 as follows:
openstudio run -m -w test.osw
It will print out
{:double_value=>40}
instead of{:double_value=>40.0}
. This caused a bug in our software because we ended up doing integer division instead of float division. Since the argument is of type Double,runner.getArgumentValues
should be able to return the value as a double, right?(Also, I'm seeing that
val=1
is being output when I use therun -m
flag. Maybe some debug code in OS that wasn't removed?)@joseph-robertson @jmarrec