[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] timing
From: |
glpk xypron |
Subject: |
Re: [Help-glpk] timing |
Date: |
Fri, 12 Mar 2010 22:36:35 +0100 |
Hello Serveh,
extra.time is determined by coding that is not part of the glpk
package but of octave.
You can find the relevant code in
octave-3.2.4.tar\octave-3.2.4\src\DLD-FUNCTIONS\__glpk__.cc
double *time;
clock_t t_start = clock();
*time = (clock () - t_start) / CLOCKS_PER_SEC;
extra.assign ("time", octave_value (time));
Clocks_per_sec is only a multiplier not the resolution of the
clock() function.
ISO 9899 says:
The clock function returns the implementation’s best approximation
to the processor time used by the program since the beginning of
an implementation-defined era related only to the program invocation.
So clocks_per_sec may be 1000 but clock() may be incremented
once a second only. This is operating system dependent.
Try your code on a problem that needs several seconds
to solve.
If you still get extra.time = 0, please, post you problem to
the octave list.
Best regards
Xypron
-------- Original-Nachricht --------
> hi ,
> one more question, what is the precision for extra.time in [xmin, fmin,
> status, extra] = glpk (c, a, b, lb, ub, ctype, vartype, s, param)
> because for every instance of my MIP problem, I just get zero for time
> in a case I get the feasible solution.
> bests,
> Serveh
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01