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

Simplification of runme.py #188

Merged
merged 6 commits into from
Dec 5, 2018
Merged

Conversation

KSchoenleber
Copy link
Contributor

All function definitions removed from runme.py. The file now only contains lines where the user can give relevant input.

@KSchoenleber KSchoenleber requested a review from maledo July 13, 2018 12:07
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'
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@KSchoenleber
Copy link
Contributor Author

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,
Copy link
Contributor

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

@sonercandas
Copy link
Contributor

I think this can be merged

@KSchoenleber
Copy link
Contributor Author

In light of pull request #212 I would really urge to merge this pull request. The reason for not merging so far was partly, that the scenario functions will be at a different point and no longer as easily visible for the users. This will be the case anyways once we decide to merge #212.

@@ -7,218 +7,72 @@
from pyomo.opt.base import SolverFactory


Copy link
Contributor

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

@maledo
Copy link
Contributor

maledo commented Nov 29, 2018

Is it just me or do you also get different results (dispatch) compared to the master branch?

@KSchoenleber
Copy link
Contributor Author

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.

@maledo
Copy link
Contributor

maledo commented Dec 3, 2018

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
@KSchoenleber
Copy link
Contributor Author

New commit with the following changes:

  1. Current version of scenarios.py is also copied into result folder
  2. Docchanges in "workflow" to reflect the new structure

@maledo maledo merged commit d2a86f7 into tum-ens:master Dec 5, 2018
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.

None yet

3 participants