rl-institut / multi-vector-simulator

Multi-vector Simulation Tool assessing and optimizing Local Energy Systems (LES) for the E-LAND project
GNU General Public License v2.0
21 stars 10 forks source link

Input verification `SOC_min < SOC_max` would be nice #905

Open smartie2076 opened 3 years ago

smartie2076 commented 3 years ago

Currently, in MVS v1.0.0dev on 2021-06-30, it is possible to define a SOC_min > SOC_max in the csv input files, resulting in an non-explicit Error:

08:54:03-INFO-Starting simulation.
WARNING: Loading a SolverResults object with a warning status into
    model=Model;
        message from solver=<undefined>
08:54:04-WARNING-Loading a SolverResults object with a warning status into model=Model;
    message from solver=<undefined>
08:54:04-ERROR-The following error occurred during the mvs solver: Optimization ended with status warning and termination condition infeasible

 There are several reasons why this could have happened.
        - the energy system is not properly connected.
        - the capacity of some assets might not have been optimized.
        - the demands might not be supplied with the installed capacities in current energy system. Check your maximum power demand and if your energy production assets and/or e
nergy conversion assets have enough capacity to meet the total demand
Traceback (most recent call last):
  File "mvs_tool.py", line 4, in <module>
    main()
  File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\cli.py", line 175, in main
    dict_values, save_energy_system_graph=save_energy_system_graph,
  File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\D0_modelling_and_optimization.py", line 105, in run_oemof
    dict_values, model, local_energy_system
  File "d:\pycharmprojects\mvs_eland\src\multi_vector_simulator\D0_modelling_and_optimization.py", line 321, in simulating
    raise MVSOemofError(error_message) from None
multi_vector_simulator.utils.exceptions.MVSOemofError: The following error occurred during the mvs solver: Optimization ended with status warning and termination condition infeasible.
sible

It would be nice to introduce a check of input validation test that made sure that SOC_min < SOC_max .