Skip to main content
1-Visitor
January 21, 2018
Solved

Error in function minimize in block resolution

  • January 21, 2018
  • 2 replies
  • 6472 views

Hello, I am solving an optimization problem with the resolution block, in the solver part I got an error because the number of arguments is greater than 16. How can I correct it.

 

I read that to reduce the number of arguments I have to create a vector of arguments, is that so? How can I do it?

Best answer by Werner_E

The problem seems to be easily solved.

Simply move the definition of the function f() to a place outside of the solve block (and  of course above it).

Not all results are the ones you expected, though:

Bild.PNG

 

2 replies

25-Diamond I
January 21, 2018

Instead of posting a picture you should post your worksheet. Chances are that you have to zip it first because of a sever bug of the forum software.

 

It looks like you had defined your function f to be dependent on just 16 arguments but you try to use more than those 16 in minimize. Obviously this can't work. You can't use variables in minimize which are not arguments of the function and so have no influence on the outcome.

 

rhanet1-VisitorAuthor
1-Visitor
January 21, 2018

Hi, thanks for the help. I attach the file with the resolution block.

Look, I changed the label of the objective function (f) to "function" and obtained the expected results.

Today I added other things before the resolution block and it does not work anymore.

I'd appreciate it if you check the block to see where the error is.

 

 

Werner_E25-Diamond IAnswer
25-Diamond I
January 22, 2018

The problem seems to be easily solved.

Simply move the definition of the function f() to a place outside of the solve block (and  of course above it).

Not all results are the ones you expected, though:

Bild.PNG

 
24-Ruby IV
January 21, 2018

Here

https://community.ptc.com/t5/PTC-Mathcad-Questions/How-to-convert-XMCD-file-into-MCDX-format/td-p/400986/page/2

I have tried to change the list of unknown to the vector!

But sent please the Mathcad sheet!