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

Issue566weatherfile #664

Merged
merged 24 commits into from
Dec 3, 2020
Merged

Issue566weatherfile #664

merged 24 commits into from
Dec 3, 2020

Conversation

MartinRaetz
Copy link
Contributor

@MartinRaetz MartinRaetz commented Nov 24, 2020

This solves: #566

This should also close this branch: https://github.com/RWTH-EBC/TEASER/tree/issue556_weather

  • Branch closed

The dynamic referencing is implemented for the AixLib Export. The other exports should still work the same.
The latest commit implements that the weather file is saved at the "project-level" of the result folder structure.

Checking out the commit 9e75fb2 you will find a version where the weather file is saved at the "building-level" of the result folder structure. This also changes the location where I implemented the changes.

run Black on project.py
@MartinRaetz
Copy link
Contributor Author

I think, the failing CI-Test could be due to the reason that this PR actually changes the output of the aixlib export?

=========================== short test summary info ============================
FAILED tests/test_data.py::Test_teaser::test_export_aixlib - FileNotFoundErro...
=========== 1 failed, 346 passed, 128 warnings in 321.30s (0:05:21) ============
ERROR: Job failed: exit code 1

@MichaMans
Copy link
Contributor

@MartinRaetz in my opinion, if you changed everything that the origin state should also work, the tests should not fail. Maybe there is some naming issues?
image

… for AixLib Version) -> set to None(null) to use default weatherfile of Teaser
@MartinRaetz
Copy link
Contributor Author

Great thanks to @MichaMans for supporting me in fixing the failing CI-Test.
The reason was a Modelica-relative link to an outdated weather file stated in the unitTest.json.
Teaser only supports full-path to locally existing weather files.

@PRemmen: @MichaMans volunteered to review. But, as these changes are to the base of Teaser I thought I would invite you as well. Maybe you can think of a scenario where they fail.

@MartinRaetz
Copy link
Contributor Author

@marcusfuchs please also see this PR and evaluate if it suits your use-cases. Leave a comment to your stale branch mentioned above, or, if appropriate, delete it.

@coveralls
Copy link

coveralls commented Nov 25, 2020

Coverage Status

Coverage increased (+0.02%) to 90.213% when pulling 1be51b5 on issue566weatherfile into b08a692 on development.

@marcusfuchs
Copy link
Contributor

@MartinRaetz Thanks for addressing this.

Regarding my old branch, I don't think that I have any access to delete this anymore, but feel free to delete it.

Regarding the code, I think this would address our main pain point. If I may make a few suggestions:

  • Instead of _help_weather_data I'd suggest a name that more clearly says what the method does, e.g. _copy_weather_file
  • In my experience "source" and "destination" are more common wordings than "origin" and "desired"
  • If I understand the code correctly, you output the weather file to the top level of the output Modelica package. As both AixLib and the IBPSA library place weather files into <Library>/Resources/weatherdata I think it may be cleaner to also follow this convention with TEASER's output.

@MartinRaetz
Copy link
Contributor Author

MartinRaetz commented Nov 26, 2020

@marcusfuchs thanks for your comment.

I will implement your naming suggestions. I chose the naming _help.... to follow the naming of the other functions in this script. Nevertheless, "copy" is more accurate.

About your third point, the weather file is saved here (Mannheim file):
grafik

I can save it in a subfolder "Ressources/Weatherdata" but I do not think it is necessary, since it is not done with the other output files neither. My current approach follows the structure of Teaser and it allows easier checking of the weather file. Let me know, if I got you wrong.

@marcusfuchs
Copy link
Contributor

@MartinRaetz Thanks for picking up my suggestions. Regarding the destination of the weather file it's just my personal opinion that for me things would be cleaner and more user friendly if TEASER shared the same conventions as AixLib and IBPSA. But I can of course also live with your solution of placing the file on the top-level of the output.

@MartinRaetz
Copy link
Contributor Author

MartinRaetz commented Nov 26, 2020

@marcusfuchs

As every user uses its own AixLib and Teaser has no direct connection to the folder system of the AixLib we cannot (and in my opinion should not) modify/copy anything to the AixLib or IBPSA folder structure.

Though, I am not yet sure if I understood you correctly.

Edit: I think I got your point. You suggest building up the same folder structure as known from the AixLib folder structure. I do see the advantage. But I also see that the amount of files is a lot smaller in the Teaser result folder and a folder structure like in the AixLib would be overhead, in my opinion. The current implementation is rather in line with the current Teaser-way of exporting the results.

This discussion affects not only the weather file but all the files "delivered" with the Teaser result folder. I suggest discussing this in a separate issue.

@marcusfuchs
Copy link
Contributor

@MartinRaetz Yes, sorry for the confusion. I'll try to clarify:

In your implementation, you add the weather file on the top-level of the export:

.
├── InstituteBuilding
│   ├── AHU_InstituteBuilding.txt
│   ├── InstituteBuilding_DataBase
│   │   ├── ...
│   │   ├── package.mo
│   │   └── package.order
│   ├── InstituteBuilding.mo
│   ├── InstituteBuilding_Models
│   │   ├── ...
│   │   ├── package.mo
│   │   └── package.order
│   ├── InternalGains_InstituteBuilding.txt
│   ├── package.mo
│   ├── package.order
│   ├── TsetCool_InstituteBuilding.txt
│   └── TsetHeat_InstituteBuilding.txt
├── package.mo
├── package.order
└── WEATHERFILE.mos

I suggest to instead simply move this to Resources/weatherdata/WEATHERFILE.mos:

.
├── InstituteBuilding
│   ├── AHU_InstituteBuilding.txt
│   ├── InstituteBuilding_DataBase
│   │   ├── ...
│   │   ├── package.mo
│   │   └── package.order
│   ├── InstituteBuilding.mo
│   ├── InstituteBuilding_Models
│   │   ├── ...
│   │   ├── package.mo
│   │   └── package.order
│   ├── InternalGains_InstituteBuilding.txt
│   ├── package.mo
│   ├── package.order
│   ├── TsetCool_InstituteBuilding.txt
│   └── TsetHeat_InstituteBuilding.txt
├── package.mo
├── package.order
└── Resources
    └── weatherdata
        └── WEATHERFILE.mos

Not a large change, but IMO a little step towards common conventions.

@MartinRaetz
Copy link
Contributor Author

MartinRaetz commented Nov 26, 2020

@marcusfuchs thank you for clarifying.

In that way we would also need to capsulate all files like TsetCool_InstituteBuilding.txt into a subfolder /ressources/<NameOfTheExperiment>/TsetCool_InstituteBuilding.txt

Like I mentioned above I would prefer having all data visible at a glance, like implemented in the current development and the current commit of this branch. But this might be only my opinion.

Anyhow, this should be discussed in another thread as it affects more than just the weather file.

Weather file line is to long resulting in error
First try of IBPSA Weather file export
fixing
@MartinRaetz
Copy link
Contributor Author

MartinRaetz commented Dec 1, 2020

@MichaMans thank you for reviewing and helping to improve this PR.

Two things are now added:

  • Weather file fix (Problems with Ashrea Weatherfile AixLib#1060)

  • Weather file export for the IBPSA export
    (I have tested all verification examples in Teaser, and additionaly simulated all possible results in Modelica. Those of VDI do not produce a model export.)

Copy link
Contributor

@MichaMans MichaMans left a comment

Choose a reason for hiding this comment

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

@MartinRaetz Seems to work and looks like a nice addition. I generally agree with @marcusfuchs that a more structured approach might help in the future. Nevertheless I totally agree with you @MartinRaetz that this should be done with a new issue and implementation.

Please merge by squashing the commits 😃

@MartinRaetz MartinRaetz merged commit d9eb231 into development Dec 3, 2020
@MartinRaetz MartinRaetz deleted the issue566weatherfile branch December 3, 2020 11:13
MartinRaetz added a commit that referenced this pull request Jun 16, 2021
* #543 changed shading g total to 1 for the use for the sunblind shading factor, added shading_max_irr and shading_g_total to record export, attention hardcode

* #543 changed sunblind parameters to be usecondition parameters

* boundary conditions are not needed any longer

* just black

* untested proposal for shading gvalue

* fix calculation of shading

* #635 should revise the setters

* Update doc strings and mark todos

* Add value for max power of ideal cooler

* Typo in doc string

* Improvements excel import

* Update air density typo

* added info to doc string conv_rad

* Improvements excel import

* revert part of a commit that accidently had these changes

* run black on exvel import

* add info

* delete blank line

* restart ci

* Revert "restart ci"

This reverts commit 6253f74.

* add document suggestions made by @MartinRaetz

* defaults to 1.0 if now windows

* More doc strings extensions

* More doc strings extensions 2

* WithProfile commit

* schedules is private attribute (doc string)

* Format

* Correct and reformulate withProfile docstrings

* Correct and reformulate withProfile docstrings

* correct "nan-dealing" and update pandas df.at to df.loc and typing error

* update pandas df.at to df.loc

* update parameter names based on MBL

* add moisture and nports to RC models

* add 0 time step to internal gains

* set columns in gains file to 4

* set humidification to false if central_ahu

* change shading default

* remove hacked moisure and nports

* Adds UseCondition for classrooms

* update aixlib model to CO2 multizone

* propagate use_c_flow and set medium with c

* make example import use co2 and moisture balance

* update thermal zone name

* delete probable clutter

* E261 at least two spaces before inline comment

* update for aixlib PR1052

* update buildings version

* Issue566weatherfile (#664)

* first changes

* weird things happening in git

* Revert "weird things happening in git"

This reverts commit 923747b.

* implement working version of weather file export

* delete trial results

* convert everything to: saving weather file at "project" level and not at building level

* Revert "Merge branch 'issue566weatherfile' into development"

This reverts commit 9e772fbff69fbce8711cf3629f0aec4eea0363c3.

* Revert "Revert "Merge branch 'issue566weatherfile' into development""

This reverts commit e376eec.

* blank lines (ci)

* run Black on project.py

* update unitTest.json -> previous weatherfile is outdated (doesnt work for AixLib Version) -> set to None(null) to use default weatherfile of Teaser

* naming

* naming

* Weather file line is to long resulting in error

* First try of IBPSA Weather file export

* fixing

* blank line end of file

* #566 fixed tab stop at end of file

* 566 raised aixlib version number to actual dev number

Co-authored-by: MichaMans <michael.mans@hotmail.com>

* Add annotation

For #669

* Write test scripts

For #669

* Add script to run unit tests

For #669

* Option to export reference results

For #669

* Remove test line

For #669

* Use runUnitTests from IBPSA

For #669

* Replace very old version

For #669

* Adjust model path in test script

For #669

* Add missing comma

For #669

* Add missing tolerance

For #669

* Fix decoding errors

For #669

* Deactivate pedantic mode

For #669

* Adjust annotation

For #669

* Change script location

* Delete stray bracket

* Add missing quotes

* Increase count

* revised project name of e3, revised and reformatted runUnitTests.py, added pytest simulaiton export

* revised formatting of aixlib_ouput.py

* added reference results for e2 and added them to the ref path of that example

* Add missing file to setup

For #669

* Adjusted the profiles to a uniform 24h-Format

* solve export problem

* #688 raised version number for master merge

* #688 raise AixLib version number + sort import section following pep8

Co-authored-by: MichaMans <michael.mans@hotmail.com>
Co-authored-by: Peter Remmen <PRemmen@eonerc.rwth-aachen.de>
Co-authored-by: Peter Remmen <PRemmen@users.noreply.github.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Nicholas Long <nicholas.lee.long@gmail.com>
Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Martin Kremer <martin.theodor.kremer@rwth-aachen.de>
Co-authored-by: Michael Mans <michael.mans@rwth-aachen.de>
Co-authored-by: Martin Kremer <48821826+KremerMartin@users.noreply.github.com>
Co-authored-by: Marcus Fuchs <m.fuchs@heatbeat.de>
Co-authored-by: Wackerbauer <dwa@eonerc.rwth-aachen.de>
Co-authored-by: David Wackerbauer <dwackerbauer@eonerc.rwth-aachen.de>
Co-authored-by: David <david.jansen1@rwth-aachen.de>
Co-authored-by: David Jansen <david.jansen@eonerc.rwth-aachen.de>
pseiwert pushed a commit that referenced this pull request Feb 3, 2023
* #543 changed shading g total to 1 for the use for the sunblind shading factor, added shading_max_irr and shading_g_total to record export, attention hardcode

* #543 changed sunblind parameters to be usecondition parameters

* boundary conditions are not needed any longer

* just black

* untested proposal for shading gvalue

* fix calculation of shading

* #635 should revise the setters

* Update doc strings and mark todos

* Add value for max power of ideal cooler

* Typo in doc string

* Improvements excel import

* Update air density typo

* added info to doc string conv_rad

* Improvements excel import

* revert part of a commit that accidently had these changes

* run black on exvel import

* add info

* delete blank line

* restart ci

* Revert "restart ci"

This reverts commit 6253f74.

* add document suggestions made by @MartinRaetz

* defaults to 1.0 if now windows

* More doc strings extensions

* More doc strings extensions 2

* WithProfile commit

* schedules is private attribute (doc string)

* Format

* Correct and reformulate withProfile docstrings

* Correct and reformulate withProfile docstrings

* correct "nan-dealing" and update pandas df.at to df.loc and typing error

* update pandas df.at to df.loc

* update parameter names based on MBL

* add moisture and nports to RC models

* add 0 time step to internal gains

* set columns in gains file to 4

* set humidification to false if central_ahu

* change shading default

* remove hacked moisure and nports

* Adds UseCondition for classrooms

* update aixlib model to CO2 multizone

* propagate use_c_flow and set medium with c

* make example import use co2 and moisture balance

* update thermal zone name

* delete probable clutter

* E261 at least two spaces before inline comment

* update for aixlib PR1052

* update buildings version

* Issue566weatherfile (#664)

* first changes

* weird things happening in git

* Revert "weird things happening in git"

This reverts commit 923747b.

* implement working version of weather file export

* delete trial results

* convert everything to: saving weather file at "project" level and not at building level

* Revert "Merge branch 'issue566weatherfile' into development"

This reverts commit 9e772fbff69fbce8711cf3629f0aec4eea0363c3.

* Revert "Revert "Merge branch 'issue566weatherfile' into development""

This reverts commit e376eec.

* blank lines (ci)

* run Black on project.py

* update unitTest.json -> previous weatherfile is outdated (doesnt work for AixLib Version) -> set to None(null) to use default weatherfile of Teaser

* naming

* naming

* Weather file line is to long resulting in error

* First try of IBPSA Weather file export

* fixing

* blank line end of file

* #566 fixed tab stop at end of file

* 566 raised aixlib version number to actual dev number

Co-authored-by: MichaMans <michael.mans@hotmail.com>

* Add annotation

For #669

* Write test scripts

For #669

* Add script to run unit tests

For #669

* Option to export reference results

For #669

* Remove test line

For #669

* Use runUnitTests from IBPSA

For #669

* Replace very old version

For #669

* Adjust model path in test script

For #669

* Add missing comma

For #669

* Add missing tolerance

For #669

* Fix decoding errors

For #669

* Deactivate pedantic mode

For #669

* Adjust annotation

For #669

* Change script location

* Delete stray bracket

* Add missing quotes

* Increase count

* revised project name of e3, revised and reformatted runUnitTests.py, added pytest simulaiton export

* revised formatting of aixlib_ouput.py

* added reference results for e2 and added them to the ref path of that example

* Add missing file to setup

For #669

* Adjusted the profiles to a uniform 24h-Format

* solve export problem

* #688 raised version number for master merge

* #688 raise AixLib version number + sort import section following pep8

Co-authored-by: MichaMans <michael.mans@hotmail.com>
Co-authored-by: Peter Remmen <PRemmen@eonerc.rwth-aachen.de>
Co-authored-by: Peter Remmen <PRemmen@users.noreply.github.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Nicholas Long <nicholas.lee.long@gmail.com>
Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Martin Kremer <martin.theodor.kremer@rwth-aachen.de>
Co-authored-by: Michael Mans <michael.mans@rwth-aachen.de>
Co-authored-by: Martin Kremer <48821826+KremerMartin@users.noreply.github.com>
Co-authored-by: Marcus Fuchs <m.fuchs@heatbeat.de>
Co-authored-by: Wackerbauer <dwa@eonerc.rwth-aachen.de>
Co-authored-by: David Wackerbauer <dwackerbauer@eonerc.rwth-aachen.de>
Co-authored-by: David <david.jansen1@rwth-aachen.de>
Co-authored-by: David Jansen <david.jansen@eonerc.rwth-aachen.de>
pseiwert pushed a commit that referenced this pull request Feb 3, 2023
* #543 changed shading g total to 1 for the use for the sunblind shading factor, added shading_max_irr and shading_g_total to record export, attention hardcode

* #543 changed sunblind parameters to be usecondition parameters

* boundary conditions are not needed any longer

* just black

* untested proposal for shading gvalue

* fix calculation of shading

* #635 should revise the setters

* Update doc strings and mark todos

* Add value for max power of ideal cooler

* Typo in doc string

* Improvements excel import

* Update air density typo

* added info to doc string conv_rad

* Improvements excel import

* revert part of a commit that accidently had these changes

* run black on exvel import

* add info

* delete blank line

* restart ci

* Revert "restart ci"

This reverts commit 6253f74.

* add document suggestions made by @MartinRaetz

* defaults to 1.0 if now windows

* More doc strings extensions

* More doc strings extensions 2

* WithProfile commit

* schedules is private attribute (doc string)

* Format

* Correct and reformulate withProfile docstrings

* Correct and reformulate withProfile docstrings

* correct "nan-dealing" and update pandas df.at to df.loc and typing error

* update pandas df.at to df.loc

* update parameter names based on MBL

* add moisture and nports to RC models

* add 0 time step to internal gains

* set columns in gains file to 4

* set humidification to false if central_ahu

* change shading default

* remove hacked moisure and nports

* Adds UseCondition for classrooms

* update aixlib model to CO2 multizone

* propagate use_c_flow and set medium with c

* make example import use co2 and moisture balance

* update thermal zone name

* delete probable clutter

* E261 at least two spaces before inline comment

* update for aixlib PR1052

* update buildings version

* Issue566weatherfile (#664)

* first changes

* weird things happening in git

* Revert "weird things happening in git"

This reverts commit 923747b.

* implement working version of weather file export

* delete trial results

* convert everything to: saving weather file at "project" level and not at building level

* Revert "Merge branch 'issue566weatherfile' into development"

This reverts commit 9e772fbff69fbce8711cf3629f0aec4eea0363c3.

* Revert "Revert "Merge branch 'issue566weatherfile' into development""

This reverts commit e376eec.

* blank lines (ci)

* run Black on project.py

* update unitTest.json -> previous weatherfile is outdated (doesnt work for AixLib Version) -> set to None(null) to use default weatherfile of Teaser

* naming

* naming

* Weather file line is to long resulting in error

* First try of IBPSA Weather file export

* fixing

* blank line end of file

* #566 fixed tab stop at end of file

* 566 raised aixlib version number to actual dev number

Co-authored-by: MichaMans <michael.mans@hotmail.com>

* Add annotation

For #669

* Write test scripts

For #669

* Add script to run unit tests

For #669

* Option to export reference results

For #669

* Remove test line

For #669

* Use runUnitTests from IBPSA

For #669

* Replace very old version

For #669

* Adjust model path in test script

For #669

* Add missing comma

For #669

* Add missing tolerance

For #669

* Fix decoding errors

For #669

* Deactivate pedantic mode

For #669

* Adjust annotation

For #669

* Change script location

* Delete stray bracket

* Add missing quotes

* Increase count

* revised project name of e3, revised and reformatted runUnitTests.py, added pytest simulaiton export

* revised formatting of aixlib_ouput.py

* added reference results for e2 and added them to the ref path of that example

* Add missing file to setup

For #669

* Adjusted the profiles to a uniform 24h-Format

* solve export problem

* #688 raised version number for master merge

* #688 raise AixLib version number + sort import section following pep8

Co-authored-by: MichaMans <michael.mans@hotmail.com>
Co-authored-by: Peter Remmen <PRemmen@eonerc.rwth-aachen.de>
Co-authored-by: Peter Remmen <PRemmen@users.noreply.github.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Nicholas Long <nicholas.lee.long@gmail.com>
Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Martin Kremer <martin.theodor.kremer@rwth-aachen.de>
Co-authored-by: Michael Mans <michael.mans@rwth-aachen.de>
Co-authored-by: Martin Kremer <48821826+KremerMartin@users.noreply.github.com>
Co-authored-by: Marcus Fuchs <m.fuchs@heatbeat.de>
Co-authored-by: Wackerbauer <dwa@eonerc.rwth-aachen.de>
Co-authored-by: David Wackerbauer <dwackerbauer@eonerc.rwth-aachen.de>
Co-authored-by: David <david.jansen1@rwth-aachen.de>
Co-authored-by: David Jansen <david.jansen@eonerc.rwth-aachen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants