-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnlpproblem.m
More file actions
76 lines (61 loc) · 1.86 KB
/
nlpproblem.m
File metadata and controls
76 lines (61 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
classdef nlpproblem < model.nlpmodel
%NLPPROBLEM Implements nlpmodel with user written functions
properties
fobj_loc
gobj_loc
hobj_loc
fcon_loc
gcon_loc
gconprod_loc
hcon_loc
hlag_loc
hconprod_loc
hlagprod_loc
ghivprod_loc
end
methods
function self = nlpproblem(name, x0, cL, cU, bL, bU)
% Instantiate the base class.
end
function f = fobj_local(self, x)
%FOBJ Objective function.
f = self.fobj_loc(x);
end
function g = gobj_local(self, x)
%GOBJ Gradient bjective function.
g = self.gobj_loc(x);
end
function H = hobj_local(self, x)
%HOBJ Hessian of objective function.
H = self.hobj_loc(x);
end
function c = fcon_local(self, x)
%FCON Constraint functions, nonlinear followed by linear.
c = self.fcon_loc(x);
end
function J = gcon_local(self, x)
%GCON Constraint functions Jacobian, nonlinear followed by linear.
J = self.gcon_loc(x);
end
function [Jprod, Jtprod] = gconprod_local(self, x)
%GCON Constraint functions Jacobian, nonlinear followed by linear.
[Jprod, Jtprod] = self.gconprod_loc(x);
end
function HC = hcon_local(self, x, y)
HC = self.hcon_loc(x, y);
end
function Hv = hconprod_local(self, x, y, v)
Hv = self.hconprod_loc(x, y, v);
end
function Hv = hlagprod_local(self, x, y, v)
Hv = self.hlagprod_loc(x, y, v);
end
function HL = hlag_local(self, x, y)
HL = self.ah.hlag_loc(x, y);
end
function gHiv = ghivprod_local(self, x, g, v)
gHiv = self.ghivprod_loc(x, g, v);
end
end
end % classdef