Closed TimAKaasjager closed 4 months ago
The specific issue causing this error was found. The storage content values generated by the data generation function were higher than 1. The reason this was such a stubborn error was because it seems to happen after optimization. This was not the case. Preceding the error cited above, this was the log status:
09:54:48-INFO-Solve the optimization problem 09:54:49-INFO-Store the energy system with the results. C:\Users\kaasjagerta.conda\envs\energysystem\Lib\site-packages\oemof\solph_models.py:285: UserWarning: Optimization ended with status ok and termination condition other warnings.warn(
This makes it seem like the error is after optimizing, since the model is solved when 'Store the energy system with the results.' is logged
logging.info("Solve the optimization problem")
model.solve(solver=solver, solve_kwargs={"tee": solver_verbose})
logging.info("Store the energy system with the results.")
What did not show up was the log "09:58:35-INFO-Optimization successful..." which only shows up when the model has actually been optimized.
Whenever certain parameters of components are changed, or the number of components, the following error shows up (bear with me, it's long)
If you change for example the nominal capacity of a battery from 100e3 to 100 or the power of a load from 15000 to 150000, the error shows up.
I expected the error to have a clear source, but I'm a bit lost as to where the issue arises. If it has anything to do with unsolvability, I would be suprised since there is an sink and source with unfixed in and outputs.
For administrative reasons I have not been able to upload my project to Github yet, but the zip of the current version is attached below. To run it, you can simply run basic_example_edited.py and try changing some parameters to see if the same result occurs.
The storage_capacity variable for example, is used as input for the data_generation.generate_dataset function. If you change the parameters in the model, it leads to the error. But when running this function as main or the data_generation function as main, it outputs the expected DataFrame object with the same shape, regardless of storage_capacity.
Please let me know if anything is unclear.
Versions: Python 8.20.0 oemof.solph 0.5.2 Windows 10 Code: Bestanden.zip