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?
Solved! Go to Solution.
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.
I have tried to change the list of unknown to the vector!
But sent please the Mathcad sheet!
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.
Thank you very much for the help Werner, it worked ok.
In other problems I worked with the objective function f (x1, x2, ... xn) within the test values and I had no problems, why in this case I have to take the objective function out of the resolution block?
I have no clue why it works that way while it didn't the way you tried.
I gave it a try just because I never define a function inside a solve block but always just in front of it. In my opinion the function definition has nothing to do with the iterations necessary to solve as its neither a guess, nor a constraint.
PTC has damaged a lot of things when they wrote Prime. Maybe they introduced some kind of strange limitation for the number of arguments of a function defined inside that new Prime solve block component to be 16 at max.
I agree that it should work the way you did it, too. But (compared to Mathcad 15) its also should be possible to use a vector of variables in minerr() instead of a list and it also should be possible to evaluate a solve block symbolically. Both are features in Mathcad which don't work in Prime anymore.