Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % with default values of maxevals and maxits Direct stops immediately thus non-defaults were used
- f = @(x) x(1)/(x(2)+1e-15) + x(3)/(x(4)+1e-15) + x(5)/(x(6)+1e-15) + x(6)/(x(1)+1e-15) + 10^-7*sum(x);
- Problem.f = f;
- bounds = [zeros(1,6);ones(1,6)]';
- opts.tol = 1e-9;
- opts.maxevals = 100000;
- opts.maxits = 10000;
- tic
- [ret_minval,final_xatmin,history] = Direct(Problem,bounds,opts);
- toc
- Output:
- ...
- Exceeded max fcn evals. Increase maxevals
- Iter: 1946 f_min: 0.3889205538 fn evals: 100009
- Elapsed time is 475.858316 seconds.
Advertisement
Add Comment
Please, Sign In to add comment