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