Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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.
> 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:
plot thickens:
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:
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) ??
> 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:
> 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!