Skip to content

Conversation

@joseph-robertson
Copy link
Collaborator

@joseph-robertson joseph-robertson commented Jul 10, 2025

Pull request overview

In FT, set schedules using values of Clothing Insulation Calculation Method:

  • ClothingInsulationSchedule: set only Clothing Insulation Schedule Name
  • DynamicClothingModelASHRAE55: set neither Clothing Insulation Calculation Method Schedule Name or Clothing Insulation Schedule Name
  • CalculationMethodSchedule: set both Clothing Insulation Calculation Method Schedule Name and Clothing Insulation Schedule Name

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
  • CI status: all green or justified

@joseph-robertson joseph-robertson self-assigned this Jul 10, 2025
@joseph-robertson joseph-robertson added Enhancement Request component - Model component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Jul 10, 2025
@github-actions
Copy link

github-actions bot commented Jul 10, 2025

🧪 Test Results Dashboard

Summary

Metric Value
Total Tests 4088
Passed 4078
Failed 10
Errors 0
Skipped 0
Success Rate 99.8%
Generated 2025-07-11 22:47:34 UTC

⚠️ Minor Issues Detected

🔍 Failed Tests (10 failures)

Linux-c++ (10 failures)

OpenStudioCLI.Classic.test_measure_manager.OpenStudioCLI.Classic.test_measure_manager (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle.CLITest-test_bundle-bundle (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_git.CLITest-test_bundle-bundle_git (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_native_embedded.CLITest-test_bundle-bundle_native_embedded (run1)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle.CLITest-test_bundle-bundle (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_git.CLITest-test_bundle-bundle_git (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_native_embedded.CLITest-test_bundle-bundle_native_embedded (run2)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle.CLITest-test_bundle-bundle (run3)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_git.CLITest-test_bundle-bundle_git (run3)

Error Message:

Failed

Full Details:

No details available
CLITest-test_bundle-bundle_native_embedded.CLITest-test_bundle-bundle_native_embedded (run3)

Error Message:

Failed

Full Details:

No details available

📊 Test Run Information

Run XML File Status
run1 results.xml ✅ Found
run2 results.xml ✅ Found
run3 results.xml ✅ Found

@joseph-robertson joseph-robertson marked this pull request as ready for review July 18, 2025 14:40
@joseph-robertson joseph-robertson requested a review from jmarrec July 18, 2025 14:40
@joseph-robertson joseph-robertson changed the base branch from develop to bump-version July 18, 2025 20:31
Comment on lines 117 to 134
const std::string clothingInsulationCalculationMethod = modelObject.clothingInsulationCalculationMethod();
idfObject.setString(PeopleFields::ClothingInsulationCalculationMethod, clothingInsulationCalculationMethod);

if (boost::optional<Schedule> schedule_ = modelObject.clothingInsulationCalculationMethodSchedule()) {
if (auto idf_schedule_ = translateAndMapModelObject(schedule_.get())) {
idfObject.setString(PeopleFields::ClothingInsulationCalculationMethodScheduleName, idf_schedule_->nameString());
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If I understand correctly what E+ does:

if A10, \field Clothing Insulation Calculation Method = CalculationMethodSchedule, then the clothingInsulationCalculationMethodSchedule is a required object. As such, we should probably handle the case where it's missing in FT, don't you think @joseph-robertson ?

https://bigladdersoftware.com/epx/docs/25-1/input-output-reference/group-internal-gains-people-lights-other.html#field-clothing-insulation-calculation-method

CalculationMethodSchedule

With this choice, the method used can be either the ClothingInsulationSchedule or the DynamicClothingModelASHRAE55, depending on a schedule (to be entered as the next field) that determines which method to use in different time of a day. When this option is chosen, the next field “Clothing Insulation Calculation Method Schedule Name” is a required input.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Meh, I guess I'm actually not requesting anything here.

It's REQUIRED only if at least one of the PeopleDefinition::ThermalComfortModelType is added. Let's let E+ throw and move on.

Comment on lines 338 to 341
bool People_Impl::setClothingInsulationCalculationMethod(const std::string& clothingInsulationCalculationMethod) {
const bool result = setString(OS_PeopleFields::ClothingInsulationCalculationMethod, clothingInsulationCalculationMethod);
if (result) {
if (istringEqual("ClothingInsulationSchedule", clothingInsulationCalculationMethod)) {
resetClothingInsulationCalculationMethodSchedule();
} else if (istringEqual("DynamicClothingModelASHRAE55", clothingInsulationCalculationMethod)) {
resetClothingInsulationCalculationMethodSchedule();
resetClothingInsulationSchedule();
}
}
return result;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure we want to reset the schedules.

If I pick CalculationMethodSchedule then I must provide a ClothingInsulationCalculationMethodSchedule.

That means if I do

people.setClothingInsulationCalculationMethodSchedule(calc_sch)
# Oops, wrong value
people.setClothingInsulationCalculationMethod("DynamicClothingModelASHRAE55")
# Set it again
people.setClothingInsulationCalculationMethod("CalculationMethodSchedule")

# Then I'm still missing the Clo Ins Calc Method Sch...
people.setClothingInsulationCalculationMethodSchedule(calc_sch)

I'm sure we have some other cases where we do something like this in the OS SDK, but I'm not sure we should. Perhaps it's best we handle that in FT?

Another point to make:

  • Perhaps setClothingInsulationCalculationMethod("CalculationMethodSchedule") should instantiate the Clothing Insulation Calculation Method Schedule if not there, and set it to 1
  • Or perhaps we even make this non optional, and initialize it in the ctor, not sure.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I suppose I agree that setting the calculation method should not reset any fields if you were to accidentally set the wrong calculation method. I'll look into resetting (unused) fields in FT based on the calculation method that is ultimately set.

Yes, since ClothingInsulationCalculationMethodSchedule is required if "CalculationMethodSchedule" is set, we could either default it to 1 in the setter or initialize it in the ctor. At the same time, we could let E+ catch this so the user doesn't run into any unexpected result.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Base automatically changed from bump-version to develop August 12, 2025 14:48
@jmarrec jmarrec force-pushed the people-clothing-ins-calc-method branch from 69c5591 to 3d13dd7 Compare August 12, 2025 15:24
@jmarrec
Copy link
Collaborator

jmarrec commented Aug 25, 2025

@joseph-robertson

1859 - ModelFixture.People_ClothingInsulation (Failed)

This looks like an actual test failure that must be addressed.

@ci-commercialbuildings
Copy link
Collaborator

ci-commercialbuildings commented Aug 25, 2025

CI Results for add2e94:

joseph-robertson and others added 2 commits October 22, 2025 12:16
Co-authored-by: Joe Robertson <joseph.robertson@nrel.gov>
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
```
CMake Warning (dev) at CMakeLists.txt:1033 (elseif):
  ELSEIF called with no arguments, it will be skipped.
This warning is for project developers.  Use -Wno-dev to suppress it.
```
@jmarrec
Copy link
Collaborator

jmarrec commented Oct 22, 2025

The branch history is too messed up and there are conflicts, going to squash commits then rebase onto develop.

@jmarrec jmarrec force-pushed the people-clothing-ins-calc-method branch from add2e94 to c30f6f2 Compare October 22, 2025 10:17
@jmarrec jmarrec merged commit c44725a into develop Oct 22, 2025
2 of 6 checks passed
@jmarrec jmarrec deleted the people-clothing-ins-calc-method branch October 22, 2025 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component - IDF Translation component - Model Enhancement Request IDDChange Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add set Clothing Insulation Calculation Method function to People Class

4 participants