Parametrizing "Minimize"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Parametrizing "Minimize"
Hello all,
Below is a snapshot of an illustration of something I'm trying to do. .xmcd file is attached.
TIA
Solved! Go to Solution.
- Labels:
-
Other
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> I guess I need to arrange the variables so that I either optimize a, or a and b. (and never b alone) ??
You simply could define a new function with rearranged arguments which calls the original function:
Another option could be to solve for all arguments of the function and use a solve block to keep some arguments at the wanted constant value:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
plot thickens:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The order of the arguments in func matters!
The searched for one has to be the first:
The name of the actual parameter does not matter at all:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks. But what if I want to search for the 2nd variable and fix the first to some constant?
I have a giant function with around 5 input variables, say a,b,c,d,e.
At one point in my sheet I need to optimize for a and b, where c, d, and e are parametrized/fixed. (meaning c, d, and e do change).
At another point I need to optimize for b, and a,c,d,and e are parametrized/fixed.
I guess I need to arrange the variables so that I either optimize a, or a and b. (and never b alone) ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> I guess I need to arrange the variables so that I either optimize a, or a and b. (and never b alone) ??
You simply could define a new function with rearranged arguments which calls the original function:
Another option could be to solve for all arguments of the function and use a solve block to keep some arguments at the wanted constant value:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
> I guess I need to arrange the variables so that I either optimize a, or a and b. (and never b alone) ??
The above worked for me.
And if I had wanted to optimize 'b', then your above reply is the correct method.
Thanks and Cheers!
