Skip to content

Version 0.4

Compare
Choose a tag to compare
@zaikunzhang zaikunzhang released this 12 May 17:18
· 1634 commits to main since this release

Compared to Version 0.3, the major changes are as follows. Except for the first one, they are all improvements on the MATLAB interface rather than the Fortran code. This release also removes large unwanted files in the history of the repo, making its size reduced from 100+MB to ~15MB.

  1. The definition of weight in cobyla/setdrop_tr was buggy (our implementation of this function is completely different from the one by Powell, so Powell's original code does not have this problem). The problematic code was adopted from LINCOA, which does not have the same problem due to the definition of xopt in this function. The bug has been fixed. See the comment in lincoa/setdrop_tr.

  2. If lb contains NaN, then we raise a warning "INVOKER:NaNInLB" and regard the constraints as infeasible. The same for ub. See the function pre_bcon in preprima.m. This is consistent with the behavior of NaN in the floating point number system. In previous versions, the NaN in bounds is considered as no bound.

  3. If Aineq or bineq contains NaN, then we raise a warning "INVOKER:NaNInequality" and regard the constraints as infeasible. Similar for Aeq and beq. See the function pre_lcon in preprima.m.

  4. If Aineq contains infinite values, or bineq = -Inf, then we raise a warning "INVOKER:InfInequality" and regard the constraints as infeasible. Similar for Aeq and beq. See the function pre_lcon in preprima.m.

  5. We allow x0, bineq, beq to be rows. See the functions pre_x0, pre_lcon, pre_fun, pre_nonlcon in preprima.m. No matter whether they are rows or columns, we always require size(Aineq) = [length(bineq), length(x0)] and size(Aeq) = [length(beq), length(x0)]. This is consistent with the behavior of fmincon. We raise warnings "INVOKER:X0IsRow", "INVOKER:BineqIsRow", or "INVOKER:BeqIsRow" if they are rows.

  6. iprint is fully implemented. The MATLAB version behaves exactly as the Fortran version regarding iprint, except if classical is true, in which case the MATLAB version does not support a nonzero iprint.

  7. testprima: perturb is changed to eps the perturbation of x0 is changed to

        x0 = x0 + perturb*max(norm(x0), 1)*r/norm(r);

    In addition, the following is added to lines 122–124 to test iprint:

        if ~release  % 20230508: Test the newly implemented iprint.
            problem.options.iprint = round(4*(2*rand() - 1));
        end

N.B.: This version still retains the RESCUE and IDZ techniques in Powell's original implementation. See the release notes of Version 0.3 for more details.