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

Add autosizing to Spawn #4019

Draft
wants to merge 59 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
836482b
Implemented support for RunPeriod
mwetter Apr 21, 2022
965fe41
Implemented support for RunPeriod
mwetter Apr 21, 2022
7b61856
Implemented support for RunPeriod
mwetter Apr 21, 2022
6331a16
Implemented support for RunPeriod
mwetter Apr 21, 2022
bbb6468
Implemented support for RunPeriod
mwetter Apr 21, 2022
850a10e
Added Linux binary
mwetter Apr 21, 2022
bfc1b12
Add EnergyPlus_24_1_0 resources
kbenne Jun 25, 2024
3682042
Merged master
mwetter Aug 21, 2024
8bae883
Added validation test
mwetter Aug 21, 2024
32a1eab
Added validation test
mwetter Aug 21, 2024
dd2a6f4
Removed comment in annotation
mwetter Aug 21, 2024
18195d0
Introduced sLen
mwetter Aug 21, 2024
0506fcb
Compiled Linux binaries
mwetter Aug 21, 2024
0fc07e9
Revised and expanded documentation
mwetter Aug 22, 2024
cd19b6e
Revised and expanded documentation
mwetter Aug 22, 2024
c0b7065
Added install.py file
mwetter Aug 24, 2024
a806c31
Merge branch 'master' into issue3911_EP_24_1_0
mwetter Aug 24, 2024
cbe8bd1
Merge branch 'issue2926_runPeriod' into issue3911_EP_24_1_0
mwetter Aug 24, 2024
c356729
Updated hash and version for new binaries
mwetter Aug 24, 2024
98565df
Updated .mo files for EnergyPlus 24.1.0, after copying examples from …
mwetter Aug 24, 2024
696af3d
Updated EnergyPlus version
mwetter Aug 24, 2024
d45a9e2
Added mos scripts
mwetter Aug 26, 2024
0172fda
Setup examples
mwetter Aug 26, 2024
fb39b07
Updated C code
mwetter Aug 26, 2024
fd2cb3c
Removed old binary
mwetter Aug 26, 2024
8b084e2
Updated EnergyPlus version
mwetter Aug 26, 2024
bbfdb73
Updated release notes
mwetter Aug 26, 2024
085fbc8
Updated link to figures
mwetter Aug 26, 2024
2b19281
Moved files used for EnergyPlus_9_6_0 and EnergyPlus_24_1_0 testing
mwetter Aug 26, 2024
15e21ed
Changed Spawn version [ci skip]
mwetter Sep 3, 2024
dea9608
Refactored RunPeriod [ci skip]
mwetter Sep 3, 2024
7b37737
Merge branch 'master' into issue2926_runPeriod
mwetter Sep 3, 2024
ad36a65
Compiled dll
mwetter Sep 3, 2024
02b0299
Updated documentation
mwetter Sep 3, 2024
3a92082
Formatted file
mwetter Sep 3, 2024
605f332
Renamed model
mwetter Sep 3, 2024
cecf92e
Updated release notes
mwetter Sep 3, 2024
f7ea3da
Corrected format
mwetter Sep 3, 2024
db4a232
Merged #2926
mwetter Sep 3, 2024
aae5886
Renamed model
mwetter Sep 3, 2024
6dd75b8
Ported changes from #2926
mwetter Sep 3, 2024
7352fd8
Ported changes from #2926
mwetter Sep 3, 2024
7f838d9
Ported changes from #2926
mwetter Sep 3, 2024
c8a408b
Merged master
mwetter Oct 17, 2024
40224a3
Changed E+ version
mwetter Oct 17, 2024
97b256f
Renamed 24_1_0 to 24_2_0 and 24.1.0 to 24.2.0
mwetter Oct 17, 2024
f439f04
Renamed 24_1_0 to 24_2_0 and 24.1.0 to 24.2.0
mwetter Oct 17, 2024
c57ad29
Checked out idf from issue3911_EP_24_2_1
mwetter Oct 17, 2024
112520a
Reverted package.order
mwetter Oct 17, 2024
f21f28e
Ported autosizing code to .c and .h files
mwetter Oct 17, 2024
742e5d3
Removed annotations that do not belong into base class
mwetter Oct 17, 2024
88673e7
Removed annotations that do not belong into base class
mwetter Oct 17, 2024
6f36b71
Ported autosizing code to .mo files
mwetter Oct 17, 2024
6312376
Merged master
mwetter Nov 27, 2024
fea8ca6
Removed conflict
mwetter Nov 27, 2024
2bb5ad2
Corrected function signature
mwetter Nov 27, 2024
71eff9d
Updated hash for Spawn binaries [ci skip]
mwetter Jan 8, 2025
4542766
Removed quotes for boolean values [ci skip]
mwetter Jan 8, 2025
33eaa4d
Compiled binaries for Linux
mwetter Jan 8, 2025
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
Prev Previous commit
Next Next commit
Implemented support for RunPeriod
For #2926
mwetter committed Apr 21, 2022
commit 965fe41fec29f60e71ec21721576053b898c3281
20 changes: 16 additions & 4 deletions Buildings/Resources/C-Sources/EnergyPlus_9_6_0_Wrapper.c
Original file line number Diff line number Diff line change
@@ -36,8 +36,13 @@ void* allocate_Modelica_EnergyPlus_9_6_0(
const char* idfVersion,
const char* idfName,
const char* epwName,
int dayOfWeekForStartDay,
int dayOfWeekIsAtTime0,
int runPeriod_dayOfWeekForStartDay,
int runPeriod_dayOfWeekIsAtTime0,
int runPeriod_applyWeekEndHolidayRule,
int runPeriod_use_weatherFileDaylightSavingPeriod,
int runPeriod_use_weatherFileHolidaysAndSpecialDays,
int runPeriod_use_weatherFileRainIndicators,
int runPeriod_use_weatherFileSnowIndicators,
double relativeSurfaceTolerance,
const char* epName,
int usePrecompiledFMU,
@@ -65,9 +70,16 @@ void* allocate_Modelica_EnergyPlus_9_6_0(
const double* derivatives_delta,
const size_t nDer){


runPeriod runPer;
runPer.dayOfWeekForStartDay = dayOfWeekForStartDay;
runPer.dayOfWeekIsAtTime0 = dayOfWeekIsAtTime0;
runPer.dayOfWeekForStartDay = runPeriod_dayOfWeekForStartDay;
runPer.dayOfWeekIsAtTime0 = runPeriod_dayOfWeekIsAtTime0;
runPer.applyWeekEndHolidayRule = runPeriod_applyWeekEndHolidayRule;
runPer.use_weatherFileDaylightSavingPeriod = runPeriod_use_weatherFileDaylightSavingPeriod;
runPer.use_weatherFileHolidaysAndSpecialDays = runPeriod_use_weatherFileHolidaysAndSpecialDays;
runPer.use_weatherFileRainIndicators = runPeriod_use_weatherFileRainIndicators;
runPer.use_weatherFileSnowIndicators = runPeriod_use_weatherFileSnowIndicators;


return allocate_Spawn_EnergyPlus_9_6_0(
objectType,
5 changes: 5 additions & 0 deletions Buildings/Resources/C-Sources/EnergyPlus_9_6_0_Wrapper.h
Original file line number Diff line number Diff line change
@@ -32,6 +32,11 @@
typedef struct {
int dayOfWeekForStartDay; /* Day of week from Buildings.ThermalZones.EnergyPlus_9_6_0.Types.WeekDays */
int dayOfWeekIsAtTime0;
int applyWeekEndHolidayRule;
int use_weatherFileDaylightSavingPeriod;
int use_weatherFileHolidaysAndSpecialDays;
int use_weatherFileRainIndicators;
int use_weatherFileSnowIndicators;
} runPeriod;

/* ********************************************************* */
Original file line number Diff line number Diff line change
@@ -181,8 +181,15 @@ void buildJSONModelStructureForEnergyPlus(
bui->time, bui->runPer->dayOfWeekForStartDay, bui->runPer->dayOfWeekIsAtTime0, SpawnFormatError);
buildJSONKeyStringValue(buffer, 2, "day_of_week_for_start_day",
dayOfWeekForStartDay,
false, size, SpawnFormatError);
true, size, SpawnFormatError);
free(dayOfWeekForStartDay);

buildJSONKeyStringValue(buffer, 2, "apply_weekend_holiday_rule", bui->runPer->applyWeekEndHolidayRule ? "Yes": "No", true, size, SpawnFormatError);
buildJSONKeyStringValue(buffer, 2, "use_weather_file_daylight_saving_period", bui->runPer->use_weatherFileDaylightSavingPeriod ? "Yes": "No", true, size, SpawnFormatError);
buildJSONKeyStringValue(buffer, 2, "use_weather_file_holidays_and_special_days", bui->runPer->use_weatherFileHolidaysAndSpecialDays ? "Yes": "No", true, size, SpawnFormatError);
buildJSONKeyStringValue(buffer, 2, "use_weather_file_rain_indicators", bui->runPer->use_weatherFileRainIndicators ? "Yes": "No", true, size, SpawnFormatError);
buildJSONKeyStringValue(buffer, 2, "use_weather_file_snow_indicators", bui->runPer->use_weatherFileSnowIndicators ? "Yes": "No", false, size, SpawnFormatError);

saveAppend(buffer, " },\n", size, SpawnFormatError);

/* model information */
Original file line number Diff line number Diff line change
@@ -145,9 +145,6 @@ size_t AllocateBuildingDataStructure(
if ( Buildings_FMUS[nFMU]->runPer == NULL )
SpawnError("Not enough memory in SpawnFMU.c. to allocate array for Buildings_FMU[nFMU]->runPer.");
memcpy(Buildings_FMUS[nFMU]->runPer, runPer, sizeof(runPeriod));
//ModelicaFormatError("***** RunPeriod has dayOfWeekIsAtTime0 = %i and stored as %i",
// runPer->dayOfWeekIsAtTime0, Buildings_FMUS[nFMU]->runPer->dayOfWeekIsAtTime0);


/* Set relative surface tolerance */
Buildings_FMUS[nFMU]->relativeSurfaceTolerance = relativeSurfaceTolerance;
Original file line number Diff line number Diff line change
@@ -69,6 +69,11 @@ enum objectTypes {THERMALZONE = 1, SCHEDULE = 2, ACTUATOR = 3, OUTPUT = 4, SURFA
typedef struct {
int dayOfWeekForStartDay; /* Day of week from Buildings.ThermalZones.EnergyPlus_9_6_0.Types.WeekDays */
int dayOfWeekIsAtTime0;
int applyWeekEndHolidayRule;
int use_weatherFileDaylightSavingPeriod;
int use_weatherFileHolidaysAndSpecialDays;
int use_weatherFileRainIndicators;
int use_weatherFileSnowIndicators;
} runPeriod;

typedef struct FMUBuilding
Original file line number Diff line number Diff line change
@@ -76,6 +76,11 @@ class SpawnExternalObject
epwName,
runPeriod.dayOfWeekForStartDay,
runPeriod.dayOfWeekIsAtTime0,
runPeriod.applyWeekEndHolidayRule,
runPeriod.use_weatherFileDaylightSavingPeriod,
runPeriod.use_weatherFileHolidaysAndSpecialDays,
runPeriod.use_weatherFileRainIndicators,
runPeriod.use_weatherFileSnowIndicators,
relativeSurfaceTolerance,
epName,
usePrecompiledFMU,