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

Schedule API #10848

Open
wants to merge 31 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
2d1b4c3
Initial commit, pre develop merge.
amirroth Dec 5, 2024
6a339a8
Merge develop, resolve conflicts
amirroth Dec 6, 2024
d0b7ff9
First round of fixes
amirroth Dec 7, 2024
1272641
Fix EMS issues and several others
amirroth Dec 8, 2024
0a5be5d
Fix a few more issues
amirroth Dec 9, 2024
ed1b393
Doh, forgot to update some unit test files
amirroth Dec 9, 2024
aa645ef
One more
amirroth Dec 9, 2024
b8b9473
Fix some audit, rdd, and eio diffs
amirroth Dec 9, 2024
72066d1
Fix accumulation/averaging issue
amirroth Dec 10, 2024
5f69976
Changing to std::vector for debugging purposes
amirroth Dec 11, 2024
60706a3
Spell out std::find, std::fill, and std::accumulate so that we can us…
amirroth Dec 11, 2024
1c1ead8
Moving a few more std::find's to loops
amirroth Dec 11, 2024
7b4e5a4
I'm officially starting to lose it
amirroth Dec 12, 2024
98978bd
Fix a few more memory issues and crashes
amirroth Dec 13, 2024
bc4d001
This one was a doozy, lAlphaFieldBlanks is true if the field was left…
amirroth Dec 13, 2024
e4974ba
Two more fixes, thanks rraustad
amirroth Dec 14, 2024
3e020e2
This pump fix was pervasive
amirroth Dec 14, 2024
aaac698
Dag nabbit
amirroth Dec 14, 2024
aa9851e
Plugging away
amirroth Dec 14, 2024
aa03507
Fix EMS issue
amirroth Dec 16, 2024
04e1872
VRF fix
amirroth Dec 16, 2024
4f8a09e
More fixes from RRaustad
amirroth Dec 18, 2024
0fe2ff0
ZoneContaminant and format fixes
amirroth Dec 18, 2024
33b94a9
More fixes, or maybe just changes
amirroth Dec 18, 2024
dfc8545
One step back
amirroth Dec 20, 2024
13c52af
Address nullptr-based failures
amirroth Dec 20, 2024
4243a37
Fix more crashes and diffs
amirroth Dec 20, 2024
278e872
Merge remote-tracking branch 'origin/develop' into ScheduleAPI
amirroth Dec 21, 2024
c6833bb
WalkIn freezer fix
amirroth Dec 21, 2024
d26c66d
A few cases that didn't pass visual code inspection
amirroth Dec 23, 2024
7d637f2
Got a little too exuberant
amirroth Dec 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions src/EnergyPlus/DemandManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -357,44 +357,45 @@ void GetDemandManagerListInput(EnergyPlusData &state)
ShowContinueError(state, format("Entered in {} = {}", cCurrentModuleObject, thisDemandMgrList.Name));
ErrorsFound = true;

} else if ((state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::Electricity) ||
(state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::ElectricityNet)) {
} else {
if ((state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::Electricity) ||
(state.dataOutputProcessor->meters[thisDemandMgrList.Meter]->resource == Constant::eResource::ElectricityNet)) {
} else {
ShowSevereError(state,
format("{} = \"{}\" invalid value {} = \"{}\".",
cCurrentModuleObject,
thisDemandMgrList.Name,
s_ipsc->cAlphaFieldNames(2),
s_ipsc->cAlphaArgs(2)));
ShowContinueError(state, "Only Electricity and ElectricityNet meters are currently allowed.");
ErrorsFound = true;
}
ShowSevereError(state,
format("{} = \"{}\" invalid value {} = \"{}\".",
cCurrentModuleObject,
thisDemandMgrList.Name,
s_ipsc->cAlphaFieldNames(2),
s_ipsc->cAlphaArgs(2)));
ShowContinueError(state, "Only Electricity and ElectricityNet meters are currently allowed.");
ErrorsFound = true;
}

// Further checking for conflicting DEMAND MANAGER LISTs

if (!s_ipsc->lAlphaFieldBlanks(3)) {
if ((thisDemandMgrList.limitSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(3))) == nullptr) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3));
ErrorsFound = true;
}
if (s_ipsc->lAlphaFieldBlanks(3)) {
ShowSevereEmptyField(state, eoh, s_ipsc->cAlphaFieldNames(3));
ErrorsFound = true;
} else if ((thisDemandMgrList.limitSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(3))) == nullptr) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(3), s_ipsc->cAlphaArgs(3));
ErrorsFound = true;
}

thisDemandMgrList.SafetyFraction = s_ipsc->rNumericArgs(1);

if (!s_ipsc->lAlphaFieldBlanks(4)) {
if ((thisDemandMgrList.billingSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(4))) == nullptr) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4));
ErrorsFound = true;
}
if (s_ipsc->lAlphaFieldBlanks(4)) {
ShowSevereEmptyField(state, eoh, s_ipsc->cAlphaFieldNames(4));
ErrorsFound = true;
} else if ((thisDemandMgrList.billingSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(4))) == nullptr) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(4), s_ipsc->cAlphaArgs(4));
ErrorsFound = true;
}

if (!s_ipsc->lAlphaFieldBlanks(5)) {
if ((thisDemandMgrList.peakSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(5))) == nullptr) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5));
ErrorsFound = true;
}
if (s_ipsc->lAlphaFieldBlanks(5)) {
ShowSevereEmptyField(state, eoh, s_ipsc->cAlphaFieldNames(5));
ErrorsFound = true;
} else if ((thisDemandMgrList.peakSched = Sched::GetSchedule(state, s_ipsc->cAlphaArgs(5))) == nullptr) {
ShowSevereItemNotFound(state, eoh, s_ipsc->cAlphaFieldNames(5), s_ipsc->cAlphaArgs(5));
ErrorsFound = true;
}

thisDemandMgrList.AveragingWindow = max(int(s_ipsc->rNumericArgs(2) / state.dataGlobal->MinutesInTimeStep), 1);
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Fans.cc
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ void GetFanInput(EnergyPlusData &state)
BranchNodeConnections::TestCompSet(state, cCurrentModuleObject, cAlphaArgs(1), cAlphaArgs(2), cAlphaArgs(3), "Air Nodes");

if (lAlphaFieldBlanks(4)) {
fan->availSched = nullptr;
fan->availSched = Sched::GetScheduleAlwaysOn(state);
} else if ((fan->availSched = Sched::GetSchedule(state, cAlphaArgs(4))) == nullptr) {
ShowSevereItemNotFound(state, eoh, cAlphaFieldNames(4), cAlphaArgs(4));
ErrorsFound = true;
Expand Down Expand Up @@ -862,7 +862,7 @@ void GetFanInput(EnergyPlusData &state)
fan->type = HVAC::FanType::SystemModel;

if (lAlphaFieldBlanks(2)) {
fan->availSched = Sched::GetScheduleAlwaysOn(state);
fan->availSched = Sched::GetScheduleAlwaysOn(state); // nullptr
} else if ((fan->availSched = Sched::GetSchedule(state, cAlphaArgs(2))) == nullptr) {
ShowSevereItemNotFound(state, eoh, cAlphaFieldNames(2), cAlphaArgs(2));
ErrorsFound = true;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/RefrigeratedCase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ void GetRefrigerationInput(EnergyPlusData &state)
}

++AlphaNum; // A6
if (lAlphaBlanks(AlphaNum)) {
if (!lAlphaBlanks(AlphaNum)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was trying to bisect something I was seeing locally so I reverted this line. I didn't work.

WarehouseCoil(CoilID).heaterAvailSched = Sched::GetScheduleAlwaysOn(state);
} else if ((WarehouseCoil(CoilID).heaterAvailSched = Sched::GetSchedule(state, Alphas(AlphaNum))) == nullptr) {
ShowSevereItemNotFound(state, eoh, cAlphaFieldNames(AlphaNum), Alphas(AlphaNum));
Expand Down
Loading