Optimization: principles and algorithms, by Michel Bierlaire
Lc.m
Go to the documentation of this file.
1 function [f,g,H,fL,gL,HL,constraints] = Lc(problem,x,lambda,c)
2  m = size(lambda,1) ;
3  [f0,g0,H0] = feval(problem,x,0) ;
4  f = f0 ;
5  fL = f0 ;
6  g = g0 ;
7  gL = g0 ;
8  H = H0 ;
9  HL = H0 ;
10  constraints = zeros(m,1) ;
11  for i=1:m
12  [fi,gi,Hi] = feval(problem,x,i) ;
13  constraints(i) = fi ;
14  f += lambda(i) * fi ;
15  fL += lambda(i) * fi ;
16  f += c * fi * fi / 2.0 ;
17  g += lambda(i) * gi ;
18  gL += lambda(i) * gi ;
19  g += c * fi * gi ;
20  H += lambda(i) * Hi ;
21  HL += lambda(i) * Hi ;
22  H += c * gi * gi' ;
23  H += fi * Hi ;
24  endfor
25 endfunction
function Lc(in problem, in x, in lambda, in c)
Copyright 2015-2016 Michel Bierlaire