Question: create procedure with many arguments programmatically

Hello Maple experts, lets assume I want to minimize some complicated objective function (procedure) objective(x1,x2,...,xn) with many problem variables. In order to use Maple's Optimization package, I have to specify all the arguments of my objective function in the form objective := proc(x1,x2,...,xn) ...some complicated computation... end proc: However, this has to be written manually and for many variables, say 100 or 150, this is not very elegant. Isn't there a more elegant way of creating a procedure that is suitable for the Optimization package or the Global Optimization Toolbox? I tried also the 'apply' command but this seems to try to evaluate the objective function when I use like apply(objective, seq(x||i, i=1..100)); There must be a simple way to do it, right?
Please Wait...