Closed daniel-acuna closed 9 years ago
If we can stating cost function by inputing array instead of for loop, it will go much faster.
Some thoughts on this:
LinearProgram
class (https://code.google.com/p/or-tools/source/browse/trunk/src/lp_data/lp_data.h) does not have bulk sets either.SparseMatrix
object inside the C++ code (https://code.google.com/p/or-tools/source/browse/trunk/src/lp_data/sparse.h). That class has a constructor that in principle can receive a list of triplets (row, column, value) to bulk initialize the constraints. That class also has a way of initializing the size of the matrix called PopulateFromZero
. This could in principle be used by LinearProgram
, which could later be exposed to Python.We will delay this for now until next version since the speedup through customization of the Python--C++ interface is non-trivial
Right now the problem formulation takes orders of magnitude longer than actually solving the problem. There might be a way of significantly speeding up https://github.com/daniel-acuna/reviewer_assignment/blob/master/reviewer_assignment_website/paper_reviewer_matcher/linear_programming.py#L6-L49