OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
[ ] populateChoiceArgFromModelObjects -> Need to think about where something like this should live.
[ ] getAbsoluteAzimuthForSurface -> ?
Questions:
Return a std::map<std::string, std::string> hash? One implication is that we need to, e.g., std::to_string on doubles.
For optional arguments that aren't assigned a value, should the hash contain the argument name as a key (with uninitialized value)?
Is it possible to return the keys as symbols (instead of strings)?
What is return type Json::Value? Does that have any relevance here?
Answer: Json::Value seems to be almost exactly what we want to use here. Except that for optional arguments with no value assigned, the returned hash will have :key=>nil instead of :key=>boost::none. Maybe there's a way to return boost::none, but either way I would think this would work.
Pull Request Author
[ ] Model API Changes / Additions
[ ] Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
[ ] Model API methods are tested (in src/model/test)
[ ] EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
[ ] If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
[ ] If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
[ ] Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
[ ] All new and existing tests passes
[ ] If methods have been deprecated, update rest of code to use the new methods
Labels:
[ ] If change to an IDD file, add the label IDDChange
[ ] If breaking existing API, add the label APIChange
[ ] If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR
Review Checklist
This will not be exhaustively relevant to every PR.
[ ] Perform a Code Review on GitHub
[ ] Code Style, strip trailing whitespace, etc.
[ ] All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
[ ] Labeling is ok
[ ] If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
[ ] If feature, test running new feature, try creative ways to break it
Pull request overview
Checklist:
createRunVariables
getArgumentValues(script_arguments, user_arguments)
check_upstream_measure_for_arg
Should be pretty straightforward; we do this for ResStock often.getPastStepValuesForMeasure(measure_name)
getPastStepValuesForName(step_name)
checkDoubleAndIntegerArguments
-> This may be already handled through newsetMin
andsetMax
. https://github.com/NREL/OpenStudio/issues/4551~checkChoiceArgFromModelObjects
-> ?checkOptionalChoiceArgFromModelObjects
-> ?populateChoiceArgFromModelObjects
-> Need to think about where something like this should live.getAbsoluteAzimuthForSurface
-> ?Questions:
std::map<std::string, std::string>
hash? One implication is that we need to, e.g.,std::to_string
on doubles.Json::Value
? Does that have any relevance here?Json::Value
seems to be almost exactly what we want to use here. Except that for optional arguments with no value assigned, the returned hash will have:key=>nil
instead of:key=>boost::none
. Maybe there's a way to returnboost::none
, but either way I would think this would work.Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.