Forum Discussion
FICO
3 years agoCommunity Manager
Removing O(rows) in XPRSbtran and XPRSftran
XPRSbtran and XPRSftran takes a dense array as input, hence there will be at least one scan over the basis dimension. If you solve multiple times the the extra complexity becomes a bottleneck, since we don't exploit sparsity to the fullest.
Is it possible to have regular sparse solves i.e input and output as a sparse vector ? If not is it something you will consider adding :-)
2 Replies
- FICOCommunity Manager
Hi Bo,
we did actually already implement those as XPRSsparseftran and XPRSsparsebtran, and they should already be available. They are undocumented as of now, but they are already in use elsewhere so should have sufficient testing and we will look into fully documenting them for the next release. For example for ftran, the call should be
int XPRS_CC XPRSsparseftran(XPRSprob prob, double val[], int ind[], int* p_ncoefs)
where vec is the sparse vector to be multiplied by the basis inverse on input and the result of the transformation on output, ind are the corresponding indices and p_ncoefs is the number of elements which will also get overwritten by the corresponding value for the result of the transformation.
int XPRS_CC XPRSsparsebtran(XPRSprob prob, double val[], int ind[], int* p_ncoefs)
works exactly the same. (And like the dense ones, these will also not be thread-safe at the moment.)
Best,
Tristan
- FICOCommunity Manager
Thank you, I did not know there was a sparse version already, so that's great. It's good enough for now to know that it can be made thread safe if needed. I am working on a proto type idea, so for now I will not make it run in parallel.
Related Content
Related Content
How to fix the basis after removing non-basic rows.
I am working on an algorithm in which I need to remove some redundant constraints. I know they are redundant because each one is dominated by one other constraint that I have generated. The problem...5 years agoPlace FICO® Xpress Optimization ForumFICO® Xpress Optimization Forum1 unread comment1 unread0Views0likes1Comment