You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will make add_variable to have performance regression if over 40k variables are added into the problem, and adding 200k variables will have 10mins overhead due to the query of a python list is O(n):
While replacing it with set() will make it done within a second as the set is O(1) complexity:
The text was updated successfully, but these errors were encountered:
I think dict is the same as set as they both are based on a hash table to query or insert items. Languages like Java don't have a separate implementation of sets, where they are just dict with only keys and empty values.
I was using a fine-tuned Gurobi solver with an academic license. The MILP problem being solved was somehow infeasible due to the presence of a few metabolic models, so I reran the solving for several times to debug and noticed the performance problem.
reframed/reframed/solvers/solver.py
Lines 36 to 40 in 1927419
Will make
add_variable
to have performance regression if over 40k variables are added into the problem, and adding 200k variables will have 10mins overhead due to the query of a pythonlist
isO(n)
:While replacing it with
set()
will make it done within a second as theset
isO(1)
complexity:The text was updated successfully, but these errors were encountered: