-
Notifications
You must be signed in to change notification settings - Fork 133
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
Alternative scenarios #212
base: master
Are you sure you want to change the base?
Conversation
…more declared global.
Merge tum master into branch
I think the complexity of the new scenario creation should be discussed. For people with little urbs knowledge it will be quite hard to built a new scenario function. If you have any wishes or doubts: Let me know. I will try to find a solution for it. |
Something I just found: The .h5 file saves prob._data and prob._result. prob._data does not contain valid data any more, since only the data of the base scenario is stored there. This is due to the structure of the alternative scenarios. |
If you change anything regarding the input of the data dict, keep in mind the copy vs. pointer problematic in python. Sometimes you want to create a copy not just a pointer to the old object, that if you change something, the original variable is changed, too. |
…is still split up into r_in, r_out, r_in_min_fraction and r_out_min_fraction, as used in the model.
…/urbs into Alternative-Scenarios
Saving of the h5 file should work properly, now. |
…rary dependencies.
…tive' in the scenario function name changes the way of scenario creation.
It is possible now, to use both original and new version of scenario creation. If "alternative" appears in the scenario name, an existing model instance is being reused to speed up the process of scenario creation. If no scenario_base or another alternative scenario had run before, a new model instance is created first. |
These scenarios save time by reuse of existing model instances. In a first step the dictionaries containing the data to be changed will be updated. Afterwards the scenario function also adapts the corresponding constraints of the model instance. Once the model is solved all changes need to be undone. This allows future utilization of the model instance in other scenarios.
Creation of completely new scenarios types is very complex now.