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

180 create intergration tests for overall simulator #215

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

Jaimepatt
Copy link

No description provided.

@Jaimepatt Jaimepatt linked an issue Nov 21, 2024 that may be closed by this pull request
@Jaimepatt Jaimepatt marked this pull request as draft November 21, 2024 10:42
@Jaimepatt Jaimepatt marked this pull request as ready for review November 21, 2024 15:37
@Jaimepatt
Copy link
Author

This is the first version of the integration tests. It runs the sample esdl as a test simulation. For now it runs two tests. The first one calculates the consumption at the demand asset using the mass flow, cp and delta T and compares it with the demand profile from the esdl. The second test checks whether the return temperature is lower than the primary one.
This cover two of the results variables: mass flow and temperature. I think a good next step would be to add a test to make sure the pressure values make sense. Perhaps checking the pressure drop along the pipe against the know value.
Ready for review @samvanderzwan @mvmeerkerk.

Copy link
Contributor

@samvanderzwan samvanderzwan left a comment

Choose a reason for hiding this comment

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

In general good basis, but we need to discuss what do we want to test here, what is the purpose of this test. Do we want to compare with results from previous release or just test if it runs.

@@ -3,6 +3,7 @@ rem @echo off

pushd .
cd /D "%~dp0"
py -3.11 -m pip install virtualenv
Copy link
Contributor

Choose a reason for hiding this comment

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

Why add this, this doe snot seem to have anything to do with the PR and is it required?

Copy link
Author

Choose a reason for hiding this comment

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

I think I just added it to install the repo in my machine and then forgot to remove it afterwards. I will remove it in the next commit.

@@ -43,7 +43,7 @@ def run(file_path: str | None = None) -> pd.DataFrame:
name="test run",
timestep=3600,
start=datetime.strptime("2019-01-01T00:00:00", "%Y-%m-%dT%H:%M:%S"),
stop=datetime.strptime("2019-01-01T01:00:00", "%Y-%m-%dT%H:%M:%S"),
stop=datetime.strptime("2019-01-01T09:00:00", "%Y-%m-%dT%H:%M:%S"),
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is not required right, so then remove it.

Copy link
Author

Choose a reason for hiding this comment

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

You're right, I just changed while testing something and forgot to remove it. It's removed in the latest commit.

unit_test/integration/test_heat_demand.py Show resolved Hide resolved

return temp_in_dict, temp_out_dict

def test_heat_power(self) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not get why you want to test this, since it might be that the production is to low so the consumption is capped, and this test will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create intergration tests for overall simulator
2 participants