Group Abstract Group Abstract

Message Boards Message Boards

0
|
44 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Constrained optimization with changing constraints based on value of target function

Posted 2 days ago

Is this possible, that some constraints have parameters that depend on the target function? Or do the constraints need to be statable in an unchanging way?

POSTED BY: Iuval Clejan
3 Replies
Posted 1 day ago

Wait, I need to add stuff that was in the original file, that I simplified... Hang on. It works now.

POSTED BY: Iuval Clejan
Posted 1 day ago

Almost, but not quite. The constraints need to be defined outside NMinimize, as they are a bit complicated. See new file. It works now! Thanks.

POSTED BY: Iuval Clejan

Do you mean something like this?:

NMinimize[{f, x^2 + y^2 + f^2 <= 4} /. f -> Cos[x] + Cos[y], {x, y}]
(*  {0.356557, {x -> 1.39121, y -> -1.39191}}  *)
POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard