Code covered by the BSD License  

Highlights from
OpenOpt

image thumbnail

OpenOpt

by

 

25 Nov 2006 (Updated )

nonSmoothSolve (similar to fsolve), non-smooth & noisy local + some global solvers; works in Octave

cnl_h(x, prob)
function h = cnl_h(x, prob)

h_primal = prob.cnl.h(x,prob);

LAMBDA = prob.lambda;
H = h_primal;
switch prob.advanced.hPenalty
    case 'linear' 
        h = LAMBDA .* abs(H);
    case 'norm2'
        h = LAMBDA .* abs(H);
%         h = LAMBDA .* norm(H, 2);
%     case 'muNormLogMu'
%             under construction        
%         Dist = norm(x - prob.xInactive{1})+norm(x - prob.xInactive{2});
%         h = LAMBDA .* Dist .* log(1 + LAMBDA .* abs(H));
    otherwise
        prob.err('isn''t implemented yet')
end

Contact us