Skip to content

Xpress direct API performance #792

Description

@CharlieFModo

Hi guys - I recently benchmarks the xpress direct API in linopy 0.8.0 against the implementation I floated in #596. That PR was closed because it prompted a separate refactor of the matrix accessors. In my tests the API is around 8x slower on a problem with the stats below. I'd guess this is coming from the matrix accessors rather than the direct API.

For the direct APIs, in general I would expect them to be faster than the polars IO provided the solar has a performant, low level API for writing problems. It should be faster because there isn't the added write-read overhead of passing an mps file into the solver. Xpress definitely has a performant API!

I'd be happy to have a go at improving the performance again if you have some context on why I'm seeing such a discrepancy.

Reading Problem linopy
Problem Statistics
     5697205 (      0 spare) rows
     4107168 (      0 spare) structural columns
    17704428 (      0 spare) non-zero elements
MIP Entity Statistics
     1472256 entities        0 sets        0 set members

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions