From: stevenj Date: Mon, 3 Sep 2007 20:05:05 +0000 (-0400) Subject: added more time checks X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=7e4788198f0e4e7399e21611effa5a18c7791251;p=nlopt.git added more time checks darcs-hash:20070903200505-c8de0-9e8929452a50483ad0d627fbbc04ed17bbe94320.gz --- diff --git a/luksan/plip.c b/luksan/plip.c index fca5f2f..e73c7c2 100644 --- a/luksan/plip.c +++ b/luksan/plip.c @@ -277,6 +277,7 @@ static void plip_(int *nf, int *nb, double *x, int * if (*iterm != 0) { goto L11190; } + if (nlopt_stop_time(stop)) { *iterm = 100; goto L11190; } *f = objgrad(*nf, &x[1], &gf[1], objgrad_data); ++stop->nevals; ++stat_1->nfg; @@ -289,6 +290,7 @@ L11120: if (*iterm != 0) { goto L11190; } + if (nlopt_stop_time(stop)) { *iterm = 100; goto L11190; } if (kbf > 0 && rmax > 0.) { luksan_pyrmc0__(nf, &n, &ix[1], &gf[1], &eps8, &umax, gmax, &rmax, & iold, &irest); @@ -311,6 +313,7 @@ L11130: if (*iterm != 0) { goto L11190; } + if (nlopt_stop_time(stop)) { *iterm = 100; goto L11190; } /* DIRECTION DETERMINATION */ @@ -360,6 +363,7 @@ L11130: if (*iterm != 0) { goto L11190; } + if (nlopt_stop_time(stop)) { *iterm = 100; goto L11190; } if (irest != 0) { goto L11130; } diff --git a/luksan/plis.c b/luksan/plis.c index fbe038d..c31e959 100644 --- a/luksan/plis.c +++ b/luksan/plis.c @@ -258,6 +258,7 @@ static void plis_(int *nf, int *nb, double *x, int * if (*iterm != 0) { goto L11190; } + if (nlopt_stop_time(stop)) { *iterm = 100; goto L11190; } *f = objgrad(*nf, &x[1], &gf[1], objgrad_data); ++stop->nevals; ++stat_1->nfg; @@ -368,6 +369,7 @@ L12620: if (*iterm != 0) { goto L11190; } + if (nlopt_stop_time(stop)) { *iterm = 100; goto L11190; } if (irest != 0) { goto L11130; }