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

Test run fails #46

Open
jkiviluo opened this issue Sep 9, 2024 · 0 comments
Open

Test run fails #46

jkiviluo opened this issue Sep 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jkiviluo
Copy link

jkiviluo commented Sep 9, 2024

Observations from trying install/run OpenEmpire

  • Instructions don't specify which Python version to use (tried with 3.11)
  • It's not explained that config files need to be a yaml file (had to go to run.py code to find out)
  • It's not clear that -d test will override the config file
  • GLPK option is not mentioned in optimization_solver option (and could be switched to HiGHS, which is much faster and has Pyomo support)

Describe the Bug

  • Trying to test with GLPK (no commercial solvers readily available). Copied testrun.yaml and replaced only the solver. The attempt ends with this:
    RuntimeError: Failed to set value for param=genCapAvailStochRaw, index=('Belgium', 'Windoffshore', 1, 'scenario1', 1), value=0.858.
        source error message="Index '('Belgium', 'Windoffshore', 1, 'scenario1', 1)' is not valid for indexed component 'genCapAvailStochRaw'"
Traceback (most recent call last):
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\param.py", line 774, in construct
    self._validate_index(key), val)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\indexed_component.py", line 788, in _validate_index
    raise KeyError(
KeyError: "Index '('Belgium', 'Windoffshore', 1, 'scenario1', 1)' is not valid for indexed component 'genCapAvailStochRaw'"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\data\Toolbox_projects\OpenEMPIRE\scripts\run.py", line 48, in <module>
    run_empire_model(
  File "C:\data\Toolbox_projects\OpenEMPIRE\empire\core\model_runner.py", line 123, in run_empire_model
    run_empire(
  File "C:\data\Toolbox_projects\OpenEMPIRE\empire\core\empire.py", line 814, in run_empire
    instance = model.create_instance(data) #, report_timing=True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\PyomoModel.py", line 697, in create_instance
    instance.load( data,
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\PyomoModel.py", line 734, in load
    self._load_model_data(dp,
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\PyomoModel.py", line 787, in _load_model_data
    self._initialize_component(modeldata, namespaces, component_name, profile_memory)
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\PyomoModel.py", line 825, in _initialize_component
    declaration.construct(data)
  File "C:\Users\prokjt\Miniconda3\envs\empire\Lib\site-packages\pyomo\core\base\param.py", line 777, in construct
    raise RuntimeError(
RuntimeError: Failed to set value for param=genCapAvailStochRaw, index=('Belgium', 'Windoffshore', 1, 'scenario1', 1), value=0.858.
        source error message="Index '('Belgium', 'Windoffshore', 1, 'scenario1', 1)' is not valid for indexed component 'genCapAvailStochRaw'"

Environment (please complete the following information):

  • OS: Windows
  • Python: 3.11
  • Version: 41a1554 (30.7.2024)
@jkiviluo jkiviluo added the bug Something isn't working label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant