annotate src/fsqp.cc @ 1884:e62277bf5fe0

[project @ 1996-02-05 18:17:59 by jwe]
author jwe
date Mon, 05 Feb 1996 18:20:17 +0000
parents fe9d3b2ded26
children 0e6a0a271998
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
1884
e62277bf5fe0 [project @ 1996-02-05 18:17:59 by jwe]
jwe
parents: 1740
diff changeset
4 Copyright (C) 1996 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
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1192
diff changeset
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1
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
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1315
diff changeset
30 #include "defun-dld.h"
1
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"
1740
fe9d3b2ded26 [project @ 1996-01-12 11:03:26 by jwe]
jwe
parents: 1684
diff changeset
33 #include "oct-obj.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
1538
525d7798248a [project @ 1995-10-05 06:37:58 by jwe]
jwe
parents: 1488
diff changeset
42 fsqp_objective_function (const ColumnVector&)
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
1538
525d7798248a [project @ 1995-10-05 06:37:58 by jwe]
jwe
parents: 1488
diff changeset
48 fsqp_constraint_function (const ColumnVector&)
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)
1684
f85887dfe06c [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents: 1538
diff changeset
57 DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, FSfsqp, 00,
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
1684
f85887dfe06c [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents: 1538
diff changeset
62 DEFUN_DLD_BUILTIN ("fsqp", Ffsqp, Sfsqp, FSfsqp, 00,
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)
1684
f85887dfe06c [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents: 1538
diff changeset
92 DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options,
f85887dfe06c [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents: 1538
diff changeset
93 FSfsqp_options, 00,
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
94 "This function requires FSQP, which is not freely\n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
95 redistributable. For more information, read the file\n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
96 libcruft/fsqp/README.MISSING in the source distribution.")
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
97 #else
1684
f85887dfe06c [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents: 1538
diff changeset
98 DEFUN_DLD_BUILTIN ("fsqp_options", Ffsqp_options, Sfsqp_options,
f85887dfe06c [project @ 1995-12-30 03:46:07 by jwe]
jwe
parents: 1538
diff changeset
99 FSfsqp_options, 00,
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
100 "fsqp_options (KEYWORD, VALUE)\n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
101 \n\
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
102 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
103 to the shortest match.")
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
104 #endif
272
7ec58832918f [project @ 1994-01-06 18:54:08 by jwe]
jwe
parents: 240
diff changeset
105 {
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
106 Octave_object retval;
272
7ec58832918f [project @ 1994-01-06 18:54:08 by jwe]
jwe
parents: 240
diff changeset
107
7ec58832918f [project @ 1994-01-06 18:54:08 by jwe]
jwe
parents: 240
diff changeset
108 error ("fsqp_options: not implemented yet");
519
b9284136189a [project @ 1994-07-19 14:40:20 by jwe]
jwe
parents: 506
diff changeset
109
272
7ec58832918f [project @ 1994-01-06 18:54:08 by jwe]
jwe
parents: 240
diff changeset
110 return retval;
7ec58832918f [project @ 1994-01-06 18:54:08 by jwe]
jwe
parents: 240
diff changeset
111 }
7ec58832918f [project @ 1994-01-06 18:54:08 by jwe]
jwe
parents: 240
diff changeset
112
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
113 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
114 ;;; Local Variables: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
115 ;;; mode: C++ ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
116 ;;; page-delimiter: "^/\\*" ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
117 ;;; End: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
118 */