memory control in Python
Ping Liu
yanzhipingliu at gmail.com
Tue Aug 18 23:52:29 CEST 2015
Hi, Oscar,
Your feedback is very valuable to me since you dig into the problem itself.
Basically, we are trying to develop an open source software with multiple interface to several free solvers so that we can switch among them in case one of them is not working or so efficient. The optimization problem is developed on the basis of OPENOPT. the number of binary variables grows with the change of time period. The problem size (Aeq: equality constraints, Aineq: inequality constraints)and binary variables are as listed below. As you can imagine, it is hard to test each case of binary variables separately.
Aeq Aineq Binary
1 hr 6*15 17*15 6
2 hr 12*26 30*26 10
24 hr 144*268 316*268 98
480 hr 2880*5284 6244*5284 1922
720 hr 4320*7924 9364*7924 unknown
Our final goal is to test 8760 time steps in our problem. We can reduce it according to the purpose of optimization. For example, for planning, the time period would be one year with longer time step than 1 hr; for operational purpose, the time period would be 7 days, with 15 min time step. In the second case, the total time step comes down to 402.
Actually, we have tried several solvers, including cplex, LPSOLVE, GLPK. We don't need to stick to CPLEX for the MIP problem. The performance of each solver is compared regarding memory usage(MB).
2hr 24hr 240hr 480hr
GLPK 26 27.6 222.6 806
LPSOLVE 11.6 15.5 421.6 1557.3
CPLEX 25.6 19.5 192.06 719.1
I think one way to reduce the problem size probably would be to categorize it into planning and operation problem. Another way would be to look into Cython for which I am not quite sure whether it would help. But I would like to try to reformulate the problem itself as you advised.
More information about the Python-list
mailing list