I've read a lot of questions regarding this problem, but i've haven't figured out how to solve it for myself. Basically i need to add a lot of constraints to a LP problem, but it takes several minutes to add the constraints. It seems like the problem is, that i'm using the "prob +=" for every loop, but i'm not sure how to get around that. My code looks like this:
for i in range(0,numpy.size(Aeq,0)-1):
prob += lpSum(Aeq.getrow(i).toarray()*x)==0
prob += lpSum(Aeq.getrow(numpy.size(Aeq,0)-1).toarray()*x)==1
Any help speeding this up is much appreciated.