rl-institut / oemof-B3

An open-source energy system model for Brandenburg/Berlin.
https://oemof-b3.readthedocs.io/
GNU Affero General Public License v3.0
9 stars 5 forks source link

Path to solver log file is easy to break #322

Closed MaGering closed 11 months ago

MaGering commented 1 year ago

The path to the solver log file in optimize.py script is not coded cleanly. If more than one "." occurs in the path, the path will be broken.

A slightly safer option would be the following: solve_kwargs["logfile"] = logfile.split("." + logfile.split(".")[-1])[0] + "_solver_log.log"