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 19 commits into
base: develop
Choose a base branch
from
Open

Schedule API #10848

wants to merge 19 commits into from

Conversation

amirroth
Copy link
Collaborator

@amirroth amirroth commented Dec 6, 2024

Pull request overview

Details forthcoming. Just testing for now.

@amirroth amirroth added the Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring label Dec 6, 2024
@amirroth amirroth added this to the EnergyPlus 25.1 milestone Dec 6, 2024
@amirroth amirroth self-assigned this Dec 6, 2024
Copy link

github-actions bot commented Dec 6, 2024

⚠️ Regressions detected on macos-14 for commit 4d72d8a

Regression Summary
  • Audit: 668
  • EIO: 573
  • ERR: 669
  • EDD: 26
  • MTD: 5
  • Table Big Diffs: 490
  • Table String Diffs: 388
  • RDD: 9
  • MTR Big Diffs: 6
  • SSZ Big Diffs: 1
  • ZSZ Big Diffs: 2
  • PERF_LOG: 2
  • ESO Small Diffs: 23
  • MTR Small Diffs: 16
  • Table Small Diffs: 4
  • SSZ Small Diffs: 6
  • ESO Big Diffs: 6
  • ZSZ Small Diffs: 5

auto &s_sched = state.dataSched;
for (int i = 0; i < (int)s_sched->scheduleTypes.size(); ++i) if (s_sched->scheduleTypes[i]->Name == name) return i;
return -1;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

[src/EnergyPlus/ScheduleManager.cc:99]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:227]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:241]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:273]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:385]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2409]:(style),[constParameterReference],Parameter 'state' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2497]:(style),[constParameterReference],Parameter 'state' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2502]:(style),[constParameterReference],Parameter 'state' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2515]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2553]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2587]:(style),[constVariableReference],Variable 's_sched' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2725]:(style),[constParameterReference],Parameter 'state' can be declared as reference to const
[src/EnergyPlus/ScheduleManager.cc:2978]:(style),[constVariableReference],Variable 's_glob' can be declared as reference to const

@rraustad
Copy link
Contributor

rraustad commented Dec 6, 2024

I noticed that Schedule Value was added to the rdd for 1ZoneUncontrolled_win_1.idf. There are no schedules in that file. There is a ScheduleTypeLimits object.

 Zone,Average,Zone Humidity Index []
+Zone,Average,Schedule Value []
 HVAC,Sum,Environmental Impact Total N2O Emissions Carbon Equivalent Mass [kg]

ScheduleTypeLimits,
  Fraction,                !- Name
  0.0,                     !- Lower Limit Value
  1.0,                     !- Upper Limit Value
  CONTINUOUS;              !- Numeric Type

The error file shows there are 2 unused schedules:

    ************* Simulation Error Summary *************
+   ************* There are 2 unused schedules in input.
+   ************* Use Output:Diagnostics,DisplayUnusedSchedules; to see them.
    ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.

@amirroth
Copy link
Collaborator Author

amirroth commented Dec 6, 2024

I noticed that Schedule Value was added to the rdd for 1ZoneUncontrolled_win_1.idf. There are no schedules in that file. There is a ScheduleTypeLimits object.

 Zone,Average,Zone Humidity Index []
+Zone,Average,Schedule Value []
 HVAC,Sum,Environmental Impact Total N2O Emissions Carbon Equivalent Mass [kg]

ScheduleTypeLimits,
  Fraction,                !- Name
  0.0,                     !- Lower Limit Value
  1.0,                     !- Upper Limit Value
  CONTINUOUS;              !- Numeric Type

The error file shows there are 2 unused schedules:

    ************* Simulation Error Summary *************
+   ************* There are 2 unused schedules in input.
+   ************* Use Output:Diagnostics,DisplayUnusedSchedules; to see them.
    ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.

Hmmmm. I think I know what this is, but I will verify after I am done looking at something more serious. In this refactor, schedule 0 (always off) and schedule -1 (always on) are not schedule indices, they are actual schedule objects. This change was needed in order to allow schedules to be accessed as objects rather than via indices. These schedule objects are always created and its possible that this error is printed if they are not used.

Copy link

github-actions bot commented Dec 7, 2024

⚠️ Regressions detected on macos-14 for commit b8e50a6

Regression Summary
  • Audit: 693
  • EIO: 599
  • ERR: 694
  • EDD: 13
  • MTD: 4
  • Table Big Diffs: 518
  • Table String Diffs: 409
  • RDD: 9
  • ESO Big Diffs: 27
  • PERF_LOG: 2
  • ESO Small Diffs: 20
  • MTR Small Diffs: 13
  • Table Small Diffs: 4
  • MTR Big Diffs: 23
  • SSZ Small Diffs: 5
  • ZSZ Big Diffs: 1
  • ZSZ Small Diffs: 4

Copy link

github-actions bot commented Dec 8, 2024

⚠️ Regressions detected on macos-14 for commit 19a54ba

Regression Summary
  • Audit: 742
  • EIO: 644
  • ERR: 744
  • EDD: 31
  • MTD: 6
  • Table Big Diffs: 559
  • Table String Diffs: 447
  • RDD: 10
  • ESO Big Diffs: 32
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 6
  • ESO Small Diffs: 27
  • MTR Small Diffs: 17
  • SSZ Big Diffs: 4
  • MTR Big Diffs: 30
  • PERF_LOG: 3
  • Table Small Diffs: 3

Copy link

github-actions bot commented Dec 9, 2024

⚠️ Regressions detected on macos-14 for commit 2f6289a

Regression Summary
  • Audit: 760
  • EIO: 400
  • EDD: 33
  • MTD: 6
  • Table Big Diffs: 45
  • Table String Diffs: 377
  • ERR: 354
  • RDD: 10
  • ESO Big Diffs: 31
  • Table Small Diffs: 43
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 6
  • ESO Small Diffs: 31
  • MTR Small Diffs: 20
  • SSZ Big Diffs: 4
  • MTR Big Diffs: 29
  • PERF_LOG: 3

Copy link

github-actions bot commented Dec 9, 2024

⚠️ Regressions detected on macos-14 for commit faf2d8b

Regression Summary
  • EIO: 449
  • EDD: 33
  • Table Big Diffs: 147
  • Table String Diffs: 425
  • ERR: 370
  • ESO Big Diffs: 148
  • Table Small Diffs: 45
  • MTR Big Diffs: 132
  • Audit: 2
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 6
  • SSZ Big Diffs: 4
  • MTR Small Diffs: 3
  • PERF_LOG: 3
  • ESO Small Diffs: 7
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit 2d9f415

Regression Summary
  • EIO: 186
  • EDD: 33
  • Table Big Diffs: 146
  • Table String Diffs: 401
  • ERR: 133
  • Table Small Diffs: 45
  • ESO Big Diffs: 145
  • MTR Big Diffs: 130
  • Audit: 2
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 6
  • SSZ Big Diffs: 4
  • MTR Small Diffs: 3
  • PERF_LOG: 2
  • ESO Small Diffs: 7
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit f2c5bbe

Regression Summary
  • EIO: 185
  • EDD: 33
  • Table Big Diffs: 144
  • Table String Diffs: 401
  • ERR: 133
  • Table Small Diffs: 46
  • ESO Big Diffs: 146
  • MTR Big Diffs: 131
  • Audit: 2
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 6
  • SSZ Big Diffs: 4
  • MTR Small Diffs: 3
  • PERF_LOG: 2
  • ESO Small Diffs: 7
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit 27cf685

Regression Summary
  • EIO: 184
  • EDD: 33
  • Table Big Diffs: 143
  • Table String Diffs: 402
  • ERR: 136
  • Table Small Diffs: 45
  • ESO Big Diffs: 145
  • MTR Big Diffs: 130
  • Audit: 2
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 6
  • SSZ Big Diffs: 4
  • MTR Small Diffs: 3
  • PERF_LOG: 2
  • ESO Small Diffs: 7
  • JSON Big Diffs: 1
  • MTD: 1

Copy link

⚠️ Regressions detected on macos-14 for commit 07edd4f

Regression Summary
  • EIO: 185
  • EDD: 33
  • Table Big Diffs: 145
  • Table String Diffs: 402
  • ERR: 135
  • Table Small Diffs: 45
  • ESO Big Diffs: 146
  • MTR Big Diffs: 132
  • Audit: 2
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 7
  • SSZ Big Diffs: 4
  • MTR Small Diffs: 3
  • PERF_LOG: 2
  • ESO Small Diffs: 7
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit e0d5bc5

Regression Summary
  • EIO: 194
  • EDD: 34
  • Table Big Diffs: 151
  • Table String Diffs: 415
  • ERR: 145
  • Table Small Diffs: 45
  • ESO Big Diffs: 150
  • MTR Big Diffs: 138
  • Audit: 5
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 11
  • SSZ Big Diffs: 7
  • MTR Small Diffs: 4
  • PERF_LOG: 3
  • ESO Small Diffs: 8
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit cf65ac9

Regression Summary
  • EIO: 194
  • EDD: 34
  • Table Big Diffs: 151
  • Table String Diffs: 415
  • ERR: 145
  • Table Small Diffs: 45
  • ESO Big Diffs: 150
  • MTR Big Diffs: 138
  • Audit: 5
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 11
  • SSZ Big Diffs: 7
  • MTR Small Diffs: 4
  • PERF_LOG: 3
  • ESO Small Diffs: 8
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit acd7574

Regression Summary
  • EIO: 184
  • EDD: 34
  • Table Big Diffs: 151
  • Table String Diffs: 411
  • ERR: 134
  • Table Small Diffs: 45
  • ESO Big Diffs: 150
  • MTR Big Diffs: 138
  • Audit: 5
  • SSZ Small Diffs: 2
  • ZSZ Big Diffs: 11
  • SSZ Big Diffs: 7
  • MTR Small Diffs: 4
  • PERF_LOG: 3
  • ESO Small Diffs: 8
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit 9266a7a

Regression Summary
  • EIO: 184
  • EDD: 34
  • Table Big Diffs: 133
  • Table String Diffs: 393
  • ERR: 115
  • Table Small Diffs: 45
  • ESO Big Diffs: 126
  • MTR Big Diffs: 114
  • Audit: 5
  • SSZ Big Diffs: 7
  • ZSZ Big Diffs: 8
  • MTR Small Diffs: 11
  • PERF_LOG: 3
  • ESO Small Diffs: 12
  • SSZ Small Diffs: 1
  • JSON Big Diffs: 1

Copy link

⚠️ Regressions detected on macos-14 for commit e735ecc

Regression Summary
  • EIO: 86
  • EDD: 34
  • Table Big Diffs: 25
  • Table String Diffs: 339
  • ERR: 57
  • Table Small Diffs: 49
  • ESO Small Diffs: 37
  • MTR Small Diffs: 31
  • SSZ Big Diffs: 7
  • ZSZ Big Diffs: 8
  • MTR Big Diffs: 7
  • ESO Big Diffs: 9
  • SSZ Small Diffs: 1
  • PERF_LOG: 2

Copy link

⚠️ Regressions detected on macos-14 for commit 8058247

Regression Summary
  • EIO: 79
  • EDD: 34
  • Table Big Diffs: 25
  • Table String Diffs: 334
  • ERR: 57
  • Table Small Diffs: 49
  • ESO Small Diffs: 37
  • MTR Small Diffs: 31
  • SSZ Big Diffs: 7
  • ZSZ Big Diffs: 8
  • MTR Big Diffs: 7
  • ESO Big Diffs: 9
  • SSZ Small Diffs: 1
  • PERF_LOG: 2

@rraustad
Copy link
Contributor

rraustad commented Dec 14, 2024

Diff in the OCCUPY-1 schedule in many files:

image

image

@rraustad
Copy link
Contributor

rraustad commented Dec 14, 2024

Hmm, there is no Zone Minimum CO2 Concentration schedule in DOAToPTHP or DOAToUnitarySystem so these files don't run in this branch. There is also no Controller:MechanicalVentilation object in these files.

ZoneControl:ContaminantController,
  A5 , \field Minimum Carbon Dioxide Concentration Schedule Name
    \type object-list
    \object-list ScheduleNames
    \note Schedule values should be carbon dioxide concentration in parts per
    \note million (ppm)
    \note This field is used when the field System Outdoor Air Method =
    \note ProportionalControlBasedOnOccupancySchedule or ProportionalControlBasedOnDesignOccupancy,
    \note or ProportionalControlBasedOnDesignOARate in Controller:MechanicalVentilation


** Severe  ** GetZoneContaminantSetPoints: ZoneControl:ContaminantController = SPACE1-1 CONTAMINANT CONTROLLER
**   ~~~   ** Minimum Carbon Dioxide Concentration Schedule Name = ZONE MINIMUM CO2 CONCENTRATION, item not found.

ZoneControl:ContaminantController,
  SPACE1-1 Contaminant Controller,  !- Name
  SPACE1-1,                !- Zone Name
  HVACTemplate-Always 1,   !- Carbon Dioxide Control Availability Schedule Name
  Zone Setpoint CO2 Concentration,  !- Carbon Dioxide Setpoint Schedule Name
  Zone Minimum CO2 Concentration;  !- Minimum Carbon Dioxide Concentration Schedule Name

@amirroth
Copy link
Collaborator Author

Hmm, there is no Zone Minimum CO2 Concentration schedule in DOAToPTHP or DOAToUnitarySystem so these files don't run in this branch. There is also no Controller:MechanicalVentilation object in these files.

ZoneControl:ContaminantController,
  A5 , \field Minimum Carbon Dioxide Concentration Schedule Name
    \type object-list
    \object-list ScheduleNames
    \note Schedule values should be carbon dioxide concentration in parts per
    \note million (ppm)
    \note This field is used when the field System Outdoor Air Method =
    \note ProportionalControlBasedOnOccupancySchedule or ProportionalControlBasedOnDesignOccupancy,
    \note or ProportionalControlBasedOnDesignOARate in Controller:MechanicalVentilation


** Severe  ** GetZoneContaminantSetPoints: ZoneControl:ContaminantController = SPACE1-1 CONTAMINANT CONTROLLER
**   ~~~   ** Minimum Carbon Dioxide Concentration Schedule Name = ZONE MINIMUM CO2 CONCENTRATION, item not found.

ZoneControl:ContaminantController,
  SPACE1-1 Contaminant Controller,  !- Name
  SPACE1-1,                !- Zone Name
  HVACTemplate-Always 1,   !- Carbon Dioxide Control Availability Schedule Name
  Zone Setpoint CO2 Concentration,  !- Carbon Dioxide Setpoint Schedule Name
  Zone Minimum CO2 Concentration;  !- Minimum Carbon Dioxide Concentration Schedule Name

Correct. Why is okay for this object to refer to schedules that don't exist but not okay for any other object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants