Skip to content

Conversation

@aoustry
Copy link
Collaborator

@aoustry aoustry commented Dec 5, 2025

Resolves #158

@aoustry aoustry marked this pull request as ready for review December 5, 2025 13:33
@aoustry aoustry requested a review from tbittar December 5, 2025 13:33

# Test +20% capacity
marg_cluster_plus = ThermalClusterProperties(
nominal_capacity=base_capacity * MODIFICATION_RATIO,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it is worth to also parametrize the test with [modification_ratio, 1/modification_ratio] to reduce code length. Ah except here you also change the cost between your test, I do not know if this is necessary or not

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tbittar : the first part of the function is to check that the conversion succeeds for the nominal value of the parameter (base_capacity). the second part of the function is a counterfactual analysis : to check that the quality of the "reproduction" would be degraded if we change the value of the studied parameter.
Hence, adding modification_ratio*base_capacity to the parametrized list would be equivalent.

)
assert rel_gap_base < THERMAL_TEST_REL_ACCURACY

for perturbation in [MODIFICATION_RATIO, 1 / MODIFICATION_RATIO]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same remark for parametrization of course, valid for all following tests

@aoustry aoustry merged commit 978496b into main Dec 8, 2025
2 checks passed
@tbittar tbittar deleted the tests/thermal_params branch December 10, 2025 08:55
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.

Tests/ add e2e tests for each parameter of the Antares Legacy Thermal model

3 participants