1
|
1 /* |
|
2 |
1884
|
3 Copyright (C) 1996 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
240
|
23 #ifdef HAVE_CONFIG_H |
1192
|
24 #include <config.h> |
1
|
25 #endif |
|
26 |
|
27 #include "FSQP.h" |
|
28 |
1352
|
29 #include "defun-dld.h" |
1
|
30 #include "error.h" |
544
|
31 #include "help.h" |
1740
|
32 #include "oct-obj.h" |
1
|
33 |
646
|
34 #ifndef FSQP_MISSING |
|
35 |
1
|
36 // Global pointers for user defined functions required by fsqp. |
453
|
37 // static tree *fsqp_objective; |
|
38 // static tree *fsqp_constraints; |
1
|
39 |
|
40 double |
1538
|
41 fsqp_objective_function (const ColumnVector&) |
1
|
42 { |
|
43 return 0.0; |
|
44 } |
|
45 |
|
46 ColumnVector |
1538
|
47 fsqp_constraint_function (const ColumnVector&) |
1
|
48 { |
|
49 ColumnVector retval; |
|
50 return retval; |
|
51 } |
|
52 |
646
|
53 #endif |
|
54 |
519
|
55 #if defined (FSQP_MISSING) |
1957
|
56 DEFUN_DLD_BUILTIN (fsqp, , , |
519
|
57 "This function requires FSQP, which is not freely\n\ |
|
58 redistributable. For more information, read the file\n\ |
|
59 libcruft/fsqp/README.MISSING in the source distribution.") |
|
60 #else |
1957
|
61 DEFUN_DLD_BUILTIN (fsqp, , , |
519
|
62 "[X, PHI] = fsqp (X, PHI [, LB, UB] [, LB, A, UB] [, LB, G, UB])\n\ |
|
63 \n\ |
|
64 Groups of arguments surrounded in `[]' are optional, but\n\ |
|
65 must appear in the same relative order shown above.") |
|
66 #endif |
1
|
67 { |
|
68 /* |
|
69 |
|
70 Handle all of the following: |
|
71 |
|
72 1. fsqp (x, phi) |
|
73 2. fsqp (x, phi, lb, ub) |
|
74 3. fsqp (x, phi, lb, ub, llb, c, lub) |
|
75 4. fsqp (x, phi, lb, ub, llb, c, lub, nllb, g, nlub) |
|
76 5. fsqp (x, phi, lb, ub, nllb, g, nlub) |
|
77 6. fsqp (x, phi, llb, c, lub, nllb, g, nlub) |
|
78 7. fsqp (x, phi, llb, c, lub) |
|
79 8. fsqp (x, phi, nllb, g, nlub) |
|
80 |
|
81 */ |
|
82 |
2086
|
83 octave_value_list retval; |
1
|
84 |
216
|
85 error ("fsqp: not implemented yet"); |
519
|
86 |
1
|
87 return retval; |
|
88 } |
|
89 |
519
|
90 #if defined (FSQP_MISSING) |
1957
|
91 DEFUN_DLD_BUILTIN (fsqp_options, , , |
519
|
92 "This function requires FSQP, which is not freely\n\ |
|
93 redistributable. For more information, read the file\n\ |
|
94 libcruft/fsqp/README.MISSING in the source distribution.") |
|
95 #else |
1957
|
96 DEFUN_DLD_BUILTIN (fsqp_options, , , |
519
|
97 "fsqp_options (KEYWORD, VALUE)\n\ |
|
98 \n\ |
|
99 Set or show options for fsqp. Keywords may be abbreviated\n\ |
|
100 to the shortest match.") |
|
101 #endif |
272
|
102 { |
2086
|
103 octave_value_list retval; |
272
|
104 |
|
105 error ("fsqp_options: not implemented yet"); |
519
|
106 |
272
|
107 return retval; |
|
108 } |
|
109 |
1
|
110 /* |
|
111 ;;; Local Variables: *** |
|
112 ;;; mode: C++ *** |
|
113 ;;; End: *** |
|
114 */ |