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

non-compatibility issue in results processing model results using gams as solver #482

Open
mohammadamint opened this issue Oct 16, 2023 · 2 comments
Labels
has-workaround The issue describes a valid workaround until the primary issue is solved v0.6 Version 0.6

Comments

@mohammadamint
Copy link

non-compatibility issue in results processing model results using gams as solver

When running a model using gams as solver, in backend/run.py, run_plan function faces an attribute error in line 152 where the attribute "name" is not found in object "opt". To get it work, I just commented the line to avoid running the if/else condition.

The ValueError:

Traceback (most recent call last):

  File C:\ProgramData\Anaconda3\envs\eurocalliope_2022_02_08\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\users\markal\onedrive - vito\documents\github\calliope-be\untitled0.py:12
    m.run()

  File C:\ProgramData\Anaconda3\envs\eurocalliope_2022_02_08\lib\site-packages\calliope\core\model.py:269 in run
    results, self._backend_model, self._backend_model_opt, interface = run_backend(

  File C:\ProgramData\Anaconda3\envs\eurocalliope_2022_02_08\lib\site-packages\calliope\backend\run.py:46 in run
    results, backend, opt = run_plan(

  File C:\ProgramData\Anaconda3\envs\eurocalliope_2022_02_08\lib\site-packages\calliope\backend\run.py:152 in run_plan
    if "persistent" in opt.name and persistent is True:

AttributeError: 'GAMSShell' object has no attribute 'name'

Run Configuration:

run:
    solver: gams
    solver_options:
        io_options:
            solver: cplex

Calliope version

'0.6.8'

@sjpfenninger
Copy link
Member

Just to confirm - if you remove the check for opt.name, you can use GAMS as a solver without any issues?

@mohammadamint
Copy link
Author

Yes. it runs without any issue, and to the extend I explored the results, I could not find any issues or inconsistencies. in the postprocessing.

@sjpfenninger sjpfenninger added the has-workaround The issue describes a valid workaround until the primary issue is solved label Nov 10, 2023
@brynpickering brynpickering added the v0.6 Version 0.6 label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-workaround The issue describes a valid workaround until the primary issue is solved v0.6 Version 0.6
Projects
None yet
Development

No branches or pull requests

3 participants