Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

People max/min occupancy appears to be calculated incorrectly if there are multiple People objects in the same zone #8990

Open
3 tasks
mjwitte opened this issue Aug 20, 2021 · 1 comment
Assignees
Labels
Defect Includes code to repair a defect in EnergyPlus

Comments

@mjwitte
Copy link
Contributor

mjwitte commented Aug 20, 2021

Issue overview

Based on reading the code, this appears to be broken, but I haven't produced a defect file to prove this.

The whole max/min people thing in ZoneEquipmentManager::SetUpZoneSizingArrays is broken if there is more than one People object in a zone and the schedules are not the same.

And ZoneMinOccupancy is wrong if there is more than one People object regardless of schedules, because it's multiplying repeatedly by the min schedule value.

A code snippet to illustrate, from SetUpZoneSizingArrays.

        for (PeopleNum = 1; PeopleNum <= state.dataHeatBal->TotPeople; ++PeopleNum) {
            if (state.dataHeatBal->People(PeopleNum).ZonePtr == state.dataSize->FinalZoneSizing(CtrlZoneNum).ActualZoneNum) {
                TotPeopleInZone += (state.dataHeatBal->People(PeopleNum).NumberOfPeople *
                                    state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ActualZoneNum).Multiplier *
                                    state.dataHeatBal->Zone(state.dataSize->FinalZoneSizing(CtrlZoneNum).ActualZoneNum).ListMultiplier);
                SchMax = GetScheduleMaxValue(state, state.dataHeatBal->People(PeopleNum).NumberOfPeoplePtr);
                if (SchMax > 0) {
                    state.dataSize->FinalZoneSizing(CtrlZoneNum).ZonePeakOccupancy = TotPeopleInZone * SchMax;
                } else {
                    state.dataSize->FinalZoneSizing(CtrlZoneNum).ZonePeakOccupancy = TotPeopleInZone;
                }
                ZoneMinOccupancy +=
                    TotPeopleInZone * ScheduleManager::GetScheduleMinValue(state, state.dataHeatBal->People(PeopleNum).NumberOfPeoplePtr);
            }
        }

Details

Some additional details for this issue (if relevant):

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
@matthew-larson
Copy link
Contributor

I can take a look at this one, unless it's being resolved elsewhere.

@matthew-larson matthew-larson self-assigned this Sep 20, 2021
@matthew-larson matthew-larson added this to the EnergyPlus 2022.1 milestone Sep 20, 2021
@matthew-larson matthew-larson added the Defect Includes code to repair a defect in EnergyPlus label Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

No branches or pull requests

2 participants