Allow user to specify that profiles are the same as a previous scenario#313
Merged
danielolsen merged 3 commits intodevelopfrom Oct 15, 2020
Merged
Allow user to specify that profiles are the same as a previous scenario#313danielolsen merged 3 commits intodevelopfrom
danielolsen merged 3 commits intodevelopfrom
Conversation
2357d32 to
75bbda8
Compare
75bbda8 to
32040db
Compare
rouille
reviewed
Oct 15, 2020
| ) | ||
| copy_to_TMP_DIR = posixpath.join( | ||
| server_setup.EXECUTE_DIR, f"scenario_{self._scenario_info['id']}" | ||
| ) |
Collaborator
There was a problem hiding this comment.
can we use from_dir and to_dir for the variables' name. I think it would be more readable.
rouille
approved these changes
Oct 15, 2020
Collaborator
rouille
left a comment
There was a problem hiding this comment.
Cool. Glad to know that it is going to speed up the process.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
When we're iterating through scenarios with identical renewable capacity/profiles, most of the scenario setup time is in uploading another identical copy of the same profiles to the server. This allows the user to specify 'don't do that, just directly copy them from a given previous scenario'.
What is the code doing
Execute, we add a optional parameter to theprepare_simulation_inputmethod to specify e.g.profiles_as=1464, and we type-check this input.SimulationInput, we add an optional parameter to theprepare_profilemethod. If this is given, then we perform acpvia the ssh connection, raising an error if the call does not complete successfully.Validation
Testing on my local machine & internet connection, this reduces the scenario setup time from 15-20 minutes to 2 minutes. I've tested with the first commit (logic in Execute), but not with the second (logic in SimulationInput).
Time to review
15 minutes. This is a relatively low priority to merge, since I can run this branch locally and there shouldn't be any downstream effects.