Skip to content

[MOSEK]: Error instead of OPTIMIZE_NOT_CALLED #94

@staadecker

Description

@staadecker

This code:

import pyoptinterface.mosek as mosek
import pyoptinterface as poi
m = mosek.Model()
m.get_model_attribute(poi.ModelAttribute.TerminationStatus)

Produces the following error instead of returning OPTIMIZE_NOT_CALLED:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
    import platform
  File "C:\Users\staadeck\Software\pyoframe\.venv\Lib\site-packages\pyoptinterface\_src\mosek.py", line 430, in get_model_attribute
    value = _direct_get_model_attribute(
        self,
    ...<2 lines>...
        e,
    )
  File "C:\Users\staadeck\Software\pyoframe\.venv\Lib\site-packages\pyoptinterface\_src\solver_common.py", line 21, in _direct_get_model_attribute
    value = get_function(model)
  File "C:\Users\staadeck\Software\pyoframe\.venv\Lib\site-packages\pyoptinterface\_src\mosek.py", line 238, in get_terminationstatus
    prosta = model.getprosta()
RuntimeError: No solution type is available

Not a big issue but consistency across different solvers is of course ideal!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions