Foggalong / RobustOCS

Robust optimal contirbution selection problems for genetics with Python
https://pypi.org/project/robustocs
MIT License
1 stars 0 forks source link

Utilise HiGHS list-type variables #12

Closed Foggalong closed 2 months ago

Foggalong commented 2 months ago

There are a lot of places where HiGHS only asks for a list, but we're giving it a NumPy array simply because that's what Gurobi wanted. There'll be some space and speed savings if we stick to lists where possible, especially in sparse matrix definitions.

jajhall commented 2 months ago

I don't know Python well enough to comment. My only related observation is that when the solution etc is obtained from HiGHS, it's not returned as a list - which is why it can be slow to access componentwise, and better to convert into a list first.

Foggalong commented 2 months ago

Yeah this is mostly on input where I've noticed it could be a bottleneck, rather than output. Especially in the robust problem, the NumPy type outputs will probably stay just because they're used iteratively as part of matrix operations.