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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

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

ACCEPTED SOLUTION

Accepted Solutions
25-Diamond I
(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:

5 REPLIES 5
1-Newbie
(To:JasonC)

plot thickens:

25-Diamond I
(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:

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

25-Diamond I
(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:

1-Newbie
(To:Werner_E)

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