Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add new field for SimulationControl: DoHVACSizingSimulationforSizingPeriods and MaximumNumberofHVACSizingSimulationPasses #193

Merged
merged 2 commits into from
Jul 22, 2020

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Jul 21, 2020

Fix #192 - Add new field for SimulationControl: DoHVACSizingSimulationforSizingPeriods and MaximumNumberofHVACSizingSimulationPasses

@jmarrec jmarrec self-assigned this Jul 21, 2020
@jmarrec
Copy link
Collaborator Author

jmarrec commented Jul 21, 2020

New fields at the bottom:

image

Tested the fields in the OSApp, checking the resulting OSM, and they work correctly.

Comment on lines +66 to +68
* [#185](https://github.com/NREL/OpenStudioApplication/pull/185) - Support WaterCooled VRFs in OSApp

* [#193](https://github.com/NREL/OpenStudioApplication/pull/193) - Add new fields for SimulationControl: `DoHVACSizingSimulationforSizingPeriods` and `MaximumNumberofHVACSizingSimulationPasses`
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a draft release note, and write the two new features in the works currently.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool

Comment on lines +143 to +144
m_doHVACSizingSimulationforSizingPeriods(nullptr),
m_maximumNumberofHVACSizingSimulationPasses(nullptr),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ctor initialize new fields in the right place to match hpp

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should turn on static analysis to check this, http://cppcheck.sourceforge.net/

Comment on lines +569 to +577
row = row + 2;
spacerItem = new QSpacerItem(1,SPACERITEM_HEIGHT,QSizePolicy::Fixed,QSizePolicy::Fixed);
gridLayout->addItem(spacerItem,row++,0);
col = 0;

addField(gridLayout,row,col,"Do HVAC Sizing Simulation for Sizing Periods",m_doHVACSizingSimulationforSizingPeriods);
col = col + 2;
addField(gridLayout,row,col,"Maximum Number of HVAC Sizing Simulation Passes",m_maximumNumberofHVACSizingSimulationPasses);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an switch and an integer edit for the two new fields

Comment on lines +1389 to +1404
m_doHVACSizingSimulationforSizingPeriods->bind(
*m_simulationControl,
std::bind(&model::SimulationControl::doHVACSizingSimulationforSizingPeriods,m_simulationControl.get_ptr()),
boost::optional<BoolSetter>(std::bind(&model::SimulationControl::setDoHVACSizingSimulationforSizingPeriodsNoFail,m_simulationControl.get_ptr(),std::placeholders::_1)),
boost::optional<NoFailAction>(std::bind(&model::SimulationControl::resetDoHVACSizingSimulationforSizingPeriods,m_simulationControl.get_ptr())),
boost::optional<BasicQuery>(std::bind(&model::SimulationControl::isDoHVACSizingSimulationforSizingPeriodsDefaulted,m_simulationControl.get_ptr())));

m_maximumNumberofHVACSizingSimulationPasses->bind(
*m_simulationControl,
IntGetter(std::bind(&model::SimulationControl::maximumNumberofHVACSizingSimulationPasses,m_simulationControl.get_ptr())),
boost::optional<IntSetter>(std::bind(&model::SimulationControl::setMaximumNumberofHVACSizingSimulationPasses,m_simulationControl.get_ptr(),std::placeholders::_1)),
boost::optional<NoFailAction>(std::bind(&model::SimulationControl::resetMaximumNumberofHVACSizingSimulationPasses,m_simulationControl.get_ptr())),
boost::none,
boost::none,
boost::optional<BasicQuery>(std::bind(&model::SimulationControl::isMaximumNumberofHVACSizingSimulationPassesDefaulted,m_simulationControl.get_ptr())));

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bind the two new fields.

Comment on lines +1981 to +1982
m_doHVACSizingSimulationforSizingPeriods->unbind();
m_maximumNumberofHVACSizingSimulationPasses->unbind();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unbind them on detach

Comment on lines +228 to +229
OSSwitch2 * m_doHVACSizingSimulationforSizingPeriods;
OSIntegerEdit2 * m_maximumNumberofHVACSizingSimulationPasses;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One switch for the YES/NO one, and one integer edit.

@jmarrec jmarrec requested a review from macumber July 21, 2020 15:08
@jmarrec jmarrec added this to the OpenStudio Application 1.1.0 milestone Jul 21, 2020
Copy link
Collaborator

@macumber macumber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@macumber
Copy link
Collaborator

Want me to merge?

@jmarrec jmarrec merged commit 4061cad into develop Jul 22, 2020
@jmarrec jmarrec deleted the 192_NewSimulationControl_Fields branch July 22, 2020 09:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
2 participants