I am trying to use Global Search to solve my optimization problem. Can anyone please help me with this error? Thanks.
"Undefined function or variable 'createOptimProblem'.Error in globalsearch (line 9)problem = createOptimProblem('fmincon','x0',x0,..."
This is my code:
opts = optimoptions(@fmincon,'Algorithm','interior-point');obj=@obj_fun; % objective function of the problem
cons=@nonlcon; % nonlinear constraints of the problem
lb=[0 0 0 0 0 0];ub=[300 300 300 300 150 1];x0=[60 30 0.05 16 50 0.5];problem = createOptimProblem('fmincon','x0',x0,... 'objective',obj,'lb',lb,'ub',ub,'nonlcon',cons,... 'options',opts);gs= GlobalSearch;[x ,fval,eflag,outptg,solutions] = run(gs,problem,10);
Best Answer