-
Notifications
You must be signed in to change notification settings - Fork 131
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
Simplification of runme.py #188
Conversation
runme.py
Outdated
|
||
# copy input file to result directory | ||
shutil.copyfile(input_file, os.path.join(result_dir, input_file)) | ||
# copy runme.py to result directory | ||
shutil.copy(__file__, result_dir) | ||
|
||
# Choose solver (cplex, glpk, gurobi, ...) | ||
Solver = 'gurobi' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the variable starting with a capital letter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason for that. I can change that.
I renamed the variable. the cool thing is that this feature is fully backwards compatible, since only redundancies are created by using old input files. |
runme.py
Outdated
|
||
for scenario in scenarios: | ||
prob = run_scenario(input_file, timesteps, scenario, result_dir, dt, | ||
prob = urbs. run_scenario(input_file, Solver, timesteps, scenario, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the space before "run_scenario" intended? Except this one, I think the change can be merged
I think this can be merged |
@@ -7,218 +7,72 @@ | |||
from pyomo.opt.base import SolverFactory | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Comment: # Set model input file
Is it just me or do you also get different results (dispatch) compared to the master branch? |
I have tested it now as well. In my case both branches yield the same results. It is possible that there is a degenerate minimum in one scenario. @maledo please check if the objective functions are the smae in the differing scenarios. If so we should make an issue out of it, and change the inputs accordingly. |
I have checked it, and they are in fact the same. I had the old mimo-example version when I cloned your branch. In any case, the copying of runme.py alone does not make any sense. The scenario overview is way more important in the result folder... |
…er. Changes in workflow doc to reflect new structure of runme.py
New commit with the following changes:
|
All function definitions removed from runme.py. The file now only contains lines where the user can give relevant input.