annotate src/fsqp.cc @ 1192:b6360f2d4fa6

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