chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e302cd
)
handle lb == ub in MMA (bugfix)
author
stevenj
<stevenj@alum.mit.edu>
Sun, 13 Feb 2011 02:53:21 +0000
(21:53 -0500)
committer
stevenj
<stevenj@alum.mit.edu>
Sun, 13 Feb 2011 02:53:21 +0000
(21:53 -0500)
darcs-hash:
20110213025321
-c8de0-
46c1f9a82b96241a49ba7f8abaad8c240d7788f2
.gz
mma/mma.c
patch
|
blob
|
history
diff --git
a/mma/mma.c
b/mma/mma.c
index f3db3846f53da32b44ca446d9f654f003bdb9788..044822bed4d4d9b04ce6f1621829d3fd811d93c3 100644
(file)
--- a/
mma/mma.c
+++ b/
mma/mma.c
@@
-96,6
+96,11
@@
static double dual_func(unsigned m, const double *y, double *grad, void *d_)
(v/u) sigma^2 (-1 + sqrt(1 - (u / v sigma)^2))
(which goes to zero as u -> 0). */
+ if (sigma[j] == 0) { /* special case for lb[i] == ub[i] dims, dx=0 */
+ xcur[j] = x[j];
+ continue;
+ }
+
u = dfdx[j];
v = fabs(dfdx[j]) * sigma[j] + 0.5 * rho;
for (i = 0; i < m; ++i) if (!isnan(fcval[i])) {