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

3524 memory error in optimisation script #3552

Merged
merged 8 commits into from May 7, 2024

Conversation

MatNif
Copy link
Collaborator

@MatNif MatNif commented Apr 18, 2024

Objective
When running large use cases, the new optimisation script tends to encounter a memory error, which is linked to the copy library's deepcopy() method, as described in issue #3524. This PR addresses this issue by introducing new __copy()__ methods for objects of the SupplySystem and DistrictEnergySystem classes that operate more explicitly and thus more efficiently in terms of memory usage.

To Test
For an elaborate test, a profiler could be used to compare the scripts' performance before and after this change.
A more straightforward test would be to check if the script maintains the same functionality by comparing the structure of results of a run before and after this change. (Since the optimisation script contains inherent randomness, the results will not be exactly the same but they should at least be quite comparable in terms of optimal energy systems, objective functions etc.)

@MatNif MatNif self-assigned this Apr 18, 2024
@MatNif MatNif linked an issue Apr 18, 2024 that may be closed by this pull request
@ShiZhongming ShiZhongming merged commit 7f7ce5d into master May 7, 2024
7 checks passed
@ShiZhongming ShiZhongming deleted the 3524-memory-error-in-optimisation-script branch May 7, 2024 11:49
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.

Memory Error in Optimisation Script
2 participants