cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Parametrizing "Minimize"

JasonC
1-Newbie

Parametrizing "Minimize"

Hello all,

Below is a snapshot of an illustration of something I'm trying to do.  .xmcd file is attached.

TIA

parametrize.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:JasonC)

> 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:

View solution in original post

5 REPLIES 5
JasonC
1-Newbie
(To:JasonC)

plot thickens:
param 2.PNG

Werner_E
24-Ruby V
(To:JasonC)

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:

JasonC
1-Newbie
(To:JasonC)

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) ??

Werner_E
24-Ruby V
(To:JasonC)

> 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!

Top Tags