Replies: 1 comment
-
To be honest, I'm not sure how much time you can save with this. Are you talking about constructing the instance in memory in order to save the time spent reading the file in? If so, it's possible that you will save some time, but you should check first how much of the running time is spent in the actual solve, since this will need to be done in any case. If the sequence of instances is related so that one instance is just a slight modification of the next, then you may be able to just modify the instance in memory and even use a warm start, as in warm_start1.c, etc. By the way, it is pretty easy to call SYMPHONY from Python using cffi and this may make it easier to write the code for what you're doing. Maybe @febattista can post a code snippet for doing that here. We should include it also in the repository and document it better, but we haven't gotten to that yet. |
Beta Was this translation helpful? Give feedback.
-
Good day,
I'm trying to solve many linear programming models. Those are stored in thousands .lp files. These days, I am using
symphony -L file1.lp
symphony -L file2.lp
etc., or:
symphony <commands.txt
where commands.txt looks like:
load file1.lp
solve
reset
load file2.lp
solve
reset
On average, it takes 4 seconds per file/model, so my idea is to generate one huge C file
and solve all models this way. It should save some time.
My idea is to have conversion tool from LP files to C, which would be compiled and run afterwards. The idea came while reading https://github.com/coin-or/SYMPHONY/blob/master/Examples/milp2.c which is solving one model.
Best regards, Pavel
Beta Was this translation helpful? Give feedback.
All reactions