|
69 | 69 | minip = 1; |
70 | 70 | maxip = 2^32 - 1; |
71 | 71 | strict = 2; |
72 | | - |
73 | 72 | verbose = false; |
| 73 | +% Zaikun 20250908: It turns out that CUTEst contains many feasibility problems. We do not test them by default. |
| 74 | +test_feasibility_problems = false; |
74 | 75 |
|
75 | 76 | % Directories for recording the starting/ending of problems (tic/toc are unavailable in parfor). |
76 | 77 | stamp = options.stamp; |
|
96 | 97 | % Set options |
97 | 98 | options = setopt(options, precision, rhobeg, rhoend, npt, maxfun_dim, maxfun, maxit, ftarget, perm, randomizex0, ... |
98 | 99 | eval_options, nr, ctol, ctol_multiple, cpenalty, type, mindim, maxdim, mincon, maxcon, ... |
99 | | - sequential, debug, chkfunval, output_xhist, output_nlchist, thorough_test, minip, maxip, strict, verbose); |
| 100 | + sequential, debug, chkfunval, output_xhist, output_nlchist, thorough_test, minip, maxip, strict, verbose, test_feasibility_problems); |
100 | 101 |
|
101 | 102 | assert(options.maxdim <= maxn); |
102 | 103 |
|
|
114 | 115 | requirements.maxcon = options.maxcon; |
115 | 116 | requirements.type = options.type; |
116 | 117 |
|
| 118 | + if ~options.test_feasibility_problems |
| 119 | + % If requirements does not contain `is_feasibility`, then we test all problems, including feasibility problems. |
| 120 | + % If requirements.is_feasibility = false, then we test only the problems that are not feasibility problems. |
| 121 | + % If requirements.is_feasibility = true, then we test only feasibility problems. |
| 122 | + requirements.is_feasibility = false; |
| 123 | + end |
| 124 | + |
117 | 125 | if isfield(options, 'blacklist') |
118 | 126 | requirements.blacklist = options.blacklist; |
119 | 127 | else |
|
555 | 563 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
556 | 564 | function options = setopt(options, precision, rhobeg, rhoend, npt, maxfun_dim, maxfun, maxit, ftarget, perm, ... |
557 | 565 | randomizex0, eval_options, nr, ctol, ctol_multiple, cpenalty, type, mindim, maxdim, mincon, maxcon, ... |
558 | | - sequential, debug, chkfunval, output_xhist, output_nlchist, thorough_test, minip, maxip, strict, verbose) % Set options |
| 566 | + sequential, debug, chkfunval, output_xhist, output_nlchist, thorough_test, minip, maxip, strict, verbose, test_feasibility_problems) % Set options |
559 | 567 |
|
560 | 568 | if (~isfield(options, 'precision')) |
561 | 569 | options.precision = precision; |
|
651 | 659 | if (~isfield(options, 'verbose')) |
652 | 660 | options.verbose = verbose; |
653 | 661 | end |
| 662 | +if (~isfield(options, 'test_feasibility_problems')) |
| 663 | + options.test_feasibility_problems = test_feasibility_problems; |
| 664 | +end |
654 | 665 |
|
655 | 666 | % Set eval_options |
656 | 667 | have_eval_options = isfield(options, 'eval_options') && isstruct(options.eval_options) && ~isempty(fieldnames(options.eval_options)); |
|
0 commit comments