skip to Main Content

I am trying to use HiGHS solver for PyPSA-Eur. By setting it in config.yaml like:

  solver:
    name: highs
    options: {}

It throws following error:

RuntimeError: Attempting to use an unavailable solver.

The SolverFactory was unable to create the solver "highs" and returned
an UnknownSolver object. This error is raised at the point where the
UnknownSolver object was used as if it were valid (by calling method
"has_capability").

The original solver was created with the following parameters:
executable: highs
type: highs
_args: ()
options: {}

while creating the environment highspy gets installed properly and no issues there.

While in the pypsa-eur environment if i do python -c "import highspy" it does not throw any error that means highspy is there to be used.

How can we configure pypsa to use HiGHS as a solver?

2

Answers


  1. It should work if you use

      solver:
        name: highs
        options: highs-default
    

    First line defines the solver, second line defines the options to use for the solver.

    Login or Signup to reply.
  2. Should you be on Windows, it might be that you have to install HiGHS binaries manually. Not sure.

    https://ergo-code.github.io/HiGHS/stable/installation/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search