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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Maximize solve block with range variables

akelly
11-Garnet

Maximize solve block with range variables

Using a Given ... Maximize(f,x) solve block.  The equations work correctly for a test case.

I'm re-writing the worksheet to process a table of inputs I'm reading from Excel.  So I need to run the solve block to find the maximum "x" for each row of the Excel data (e.g. 1000 times).  I've decomposed the input table into several arrays and have done a bunch of calculations on each "row" using range variables or "vectorize" operator.

What's giving me problems is that the function f has more variables - f(a,b,c,x).  So for each "row", a, b, and c are fixed, and I need to find x that maximizes f.  The next row, a, b, and c are different, but they are considered as fixed values for the purposes of finding a new x that maximizes f.

I made an example in Mathcad 15.  Oddly enough, the simple example I made works.  But if I add units, the solve block fails.  Even stranger, the original worksheet with a single case used units and the solve block worked.

Looking for suggestions.

1 ACCEPTED SOLUTION

Accepted Solutions

Put the x value first in the function to be maximized.  See attached.

Alan

View solution in original post

2 REPLIES 2

Put the x value first in the function to be maximized.  See attached.

Alan

That's subtle.  I never got that from the quicksheets or help.  Works on my "real" problem.  Thanks.

Top Tags