Hello Marc,
for testing I created a lp file with:
glpk-4.44\w64\glpsol.exe -m glpk-4.44\examples\tsp.mod --wlp tsp.lp --check
and used the following coding (compiled to 64bit with VS 2010 Express) for
testing:
#include "glpk.h"
#include <conio.h>
#include <time.h>
#include <stdio.h>
int main() {
glp_prob *lp = NULL;
glp_iocp iocp;
int ret;
int i;
double diff;
time_t tv1, tv2;
for (i = 0; i < 5; i ++) {
lp = glp_create_prob();
ret = glp_read_lp(lp, NULL, "C:\\temp\\tsp.lp");
glp_init_iocp(&iocp);
iocp.presolve = GLP_ON;
time(&tv1);
glp_intopt(lp, &iocp);
time(&tv2);
diff = difftime(tv2,tv1);
printf("Duration: %fs\n" ,diff);
glp_delete_prob(lp);
}
while(!kbhit()) {
}
return 0;
}
I could not reproduce your observation.
Best regards
Xypron
On 30.10.2012 22:25, Marc Goetschalckx wrote:
>
> On 30-Oct-12 15:44, Xypron wrote:
>> Hello Marc,
>>
>> your mail had to be forwarded manually because you are not subcribed
>> to the GLPK bug list, see
>> https://lists.gnu.org/mailman/listinfo/bug-glpk
>>
>> Are solving the same problem in each round?
>
> Yes, exactly the same problem. There is only one single lp file.
>> What time does glpsol need to solve your second problem?
>
> Exact same time since the glpsol program is restarted for every
> problem. About 1.4 seconds. This includes decoding the lp file,
> times for my program are only for the mipopt solution function.
_______________________________________________
Bug-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-glpk