Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16586
| From | Daniel Stariolo <daniel.stariolo@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Some linear constraints seem to be ignored in function NMinimize with |
| Date | 2014-02-22 08:01 +0000 |
| Message-ID | <le9lh0$fip$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
I'm trying to minimize a non-linear function of four variables with some linear constraints. Mathematica 8 is unable to find a good solution giving complex values of the function at some point in the iteration. This implies that one or some contraints are not being enabled in the process. Is this a bug or limitation of the optimization function ?
Function to minimize is
ff[lxw_, lwz_, c_, d_] := - J1 (lxw + lwz) - 2 J2 c +
T (-Log[2] - 1/2 (1 - lxw) Log[(1 - lxw)/4] -
1/2 (1 + lxw) Log[(1 + lxw)/4] -
1/2 (1 - lwz) Log[(1 - lwz)/4] -
1/2 (1 + lwz) Log[(1 + lwz)/4] + 1/2 (1 - d) Log[(1 - d)/16] +
1/8 (1 + 2 c + d - 2 lwz - 2 lxw) Log[
1/16 (1 + 2 c + d - 2 lwz - 2 lxw)])
where
T = 10;
J1 = 1;
J2 = -0.2;
are constant parameters. Then I try
NMinimize[{ff[lxw, lwz, c, d],
2 c + d - 2 lwz - 2 lxw >= -0.999 && -0.999 <= lxw <=
0.999 && -0.999 <= lwz <= 0.999 && -0.999 <= c <= 0.999 &&
d <= 0.9999}, {lxw, lwz, c, d}]
with the result
NMinimize::nrnum: "The function value 5.87777-4.87764 I is not a real number at {c,d,lwz,lxw} = {-0.718817,-1.28595,0.69171,-0.932461}."
I would appreciate if someone can give a hint at what is happening here.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Some linear constraints seem to be ignored in function NMinimize with Daniel Stariolo <daniel.stariolo@gmail.com> - 2014-02-22 08:01 +0000
csiph-web