1 |
/* |
2 |
* Definitions Required to use the CONOPT.DLL under Windows |
3 |
* Version: $Revision: 1.1 $ |
4 |
* Version control file: $RCSfile: conoptdll.h,v $ |
5 |
* Date last modified: $Date: 1998/02/26 15:57:57 $ |
6 |
* Last modified by: $Author: mthomas $ |
7 |
* |
8 |
* This file is part of the SLV solver. |
9 |
* |
10 |
* The SLV solver is free software; you can redistribute |
11 |
* it and/or modify it under the terms of the GNU General Public License as |
12 |
* published by the Free Software Foundation; either version 2 of the |
13 |
* License, or (at your option) any later version. |
14 |
* |
15 |
* The SLV solver is distributed in hope that it will be |
16 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 |
* General Public License for more details. |
19 |
* |
20 |
* You should have received a copy of the GNU General Public License |
21 |
* along with the program; if not, write to the Free Software Foundation, |
22 |
* Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check the file named |
23 |
* COPYING. COPYING is found in ../compiler. |
24 |
* |
25 |
*/ |
26 |
|
27 |
#ifndef _CONOPTDLL_H |
28 |
#define _CONOPTDLL_H |
29 |
|
30 |
/* a public header file to be distributed */ |
31 |
|
32 |
#ifndef _ASCCONFIG_H /* only define these if we haven't seen ascConfig.h */ |
33 |
typedef int int32; |
34 |
typedef double real64; |
35 |
#endif /* _ASCCONFIG_H */ |
36 |
|
37 |
|
38 |
/* defines and typedefs for user supplied functions */ |
39 |
enum conopt_func_names { |
40 |
COIPSZ_ENUM, |
41 |
COIRMS_ENUM, |
42 |
COIRMU_ENUM, |
43 |
COIRC_ENUM, |
44 |
COIRR_ENUM, |
45 |
COIRNZ_ENUM, |
46 |
COIRNU_ENUM, |
47 |
COIFDE_ENUM, |
48 |
COIFBL_ENUM, |
49 |
COISTA_ENUM, |
50 |
COIRS_ENUM, |
51 |
COIUSZ_ENUM, /* NOT IMPLEMENTED */ |
52 |
COIUC_ENUM, /* NOT IMPLEMENTED */ |
53 |
COIUR_ENUM, /* NOT IMPLEMENTED */ |
54 |
COIUNZ_ENUM, /* NOT IMPLEMENTED */ |
55 |
COIUNU_ENUM, /* NOT IMPLEMENTED */ |
56 |
COILF_ENUM, |
57 |
COIEC_ENUM, |
58 |
COIER_ENUM, |
59 |
COIENZ_ENUM, |
60 |
COIMSG_ENUM, |
61 |
COIPRG_ENUM, |
62 |
COIORD_ENUM, |
63 |
COIORC_ENUM, |
64 |
COIBAN_ENUM, |
65 |
COISCR_ENUM, |
66 |
COICF_ENUM, /* NOT IMPLEMENTED */ |
67 |
COIOPT_ENUM |
68 |
}; |
69 |
|
70 |
|
71 |
#define COIPSZ_VARS (nintgr,ipsz,nreal,rpsz,usrmem) |
72 |
#define COIPSZ_ARGS (int32 *nintgr,int32 *ipsz,int32 *nreal, \ |
73 |
real64 *rpsz,real64 *usrmem) |
74 |
typedef void COIPSZ_FUNC COIPSZ_ARGS; |
75 |
|
76 |
#define COIRMS_VARS (lower, curr, upper, vsta, type, rhs, \ |
77 |
fv, esta, colsta, rowno, value, nlflag, \ |
78 |
n, m, n1, nz, usrmem ) |
79 |
#define COIRMS_ARGS (real64 *lower,real64 *curr,real64 *upper,int32 *vsta, \ |
80 |
int32 *type,real64 *rhs,real64 *fv,int32 *esta, \ |
81 |
int32 *colsta,int32 *rowno,real64 *value,int32 *nlflag, \ |
82 |
int32 *n,int32 *m,int32 *n1,int32 *nz,real64 *usrmem) |
83 |
typedef void COIRMS_FUNC COIRMS_ARGS; |
84 |
|
85 |
#define COIRMU_VARS (lower, curr, upper, vsta, type, rhs, \ |
86 |
fv, esta, rowno, colno, value, nlflag, \ |
87 |
n, m, nz, usrmem ) |
88 |
#define COIRMU_ARGS (real64 *lower,real64 *curr,real64 *upper,int32 *vsta, \ |
89 |
int32 *type,real64 *rhs,real64 *fv,int32 *esta, \ |
90 |
int32 *rowno,int32 *colno,real64 *value,int32 *nlflag, \ |
91 |
int32 *n,int32 *m,int32 *nz,real64 *usrmem) |
92 |
typedef void COIRMU_FUNC COIRMU_ARGS; |
93 |
|
94 |
#define COIRC_VARS (lower, curr, upper, vsta, n, usrmem ) |
95 |
#define COIRC_ARGS (real64 *lower,real64 *curr,real64 *upper,int32 *vsta, \ |
96 |
int32 *n,real64 *usrmem) |
97 |
typedef void COIRC_FUNC COIRC_ARGS; |
98 |
|
99 |
#define COIRR_VARS (type, rhs, fv, esta, m, usrmem ) |
100 |
#define COIRR_ARGS (int32 *type,real64 *rhs,real64 *fv,int32 *esta, \ |
101 |
int32 *m,real64 *usrmem) |
102 |
typedef void COIRR_FUNC COIRR_ARGS; |
103 |
|
104 |
#define COIRNZ_VARS (colsta, rowno, value, nlflag, n1, nz, usrmem ) |
105 |
#define COIRNZ_ARGS (int32 *colsta,int32 *rowno,real64 *value, \ |
106 |
int32 *nlflag,int32 *n1,int32 *nz,real64 *usrmem) |
107 |
typedef void COIRNZ_FUNC COIRNZ_ARGS; |
108 |
|
109 |
#define COIRNU_VARS (rowno, colno, value, nlflag, nz, usrmem ) |
110 |
#define COIRNU_ARGS (int32 *rowno,int32 *colno,real64 *value, \ |
111 |
int32 *nlflag,int32 *nz,real64 *usrmem) |
112 |
typedef void COIRNU_FUNC COIRNU_ARGS; |
113 |
|
114 |
#define COIFDE_VARS (x, g, jac, rowno, \ |
115 |
jcnm, mode, errcnt, \ |
116 |
newpt, n, nj, usrmem) |
117 |
#define COIFDE_ARGS (real64 *x, real64 *g, real64 *jac, int32 *rowno, \ |
118 |
int32 *jcnm, int32 *mode, int32 *errcnt, \ |
119 |
int32 *newpt, int32 *n, int32 *nj, real64 *usrmem) |
120 |
typedef void COIFDE_FUNC COIFDE_ARGS; |
121 |
|
122 |
#define COIFBL_VARS (x, g, otn, nto, from, to, jac, stcl, \ |
123 |
rnum, cnum, nl, strw, llen, indx, mode, errcnt, n, \ |
124 |
m, n1, m1, nz, usrmem) |
125 |
#define COIFBL_ARGS (real64 *x, real64 *g, int32 *otn, int32 *nto, \ |
126 |
int32 *from, int32 *to, real64 *jac, int32 *stcl, int32 *rnum, \ |
127 |
int32 *cnum, int32 *nl, int32 *strw, int32 *llen, int32 indx, \ |
128 |
int32 *mode, int32 *errcnt, int32 *n, int32 *m, int32 *n1, \ |
129 |
int32 *m1, int32 *nz, real64 *usrmem) |
130 |
typedef void COIFBL_FUNC COIFBL_ARGS; |
131 |
|
132 |
#define COISTA_VARS (modsta, solsta,iter,objval, usrmem) |
133 |
#define COISTA_ARGS (int32 *modsta, int32 *solsta, int32 *iter, \ |
134 |
real64 *objval, real64 *usrmem) |
135 |
typedef void COISTA_FUNC COISTA_ARGS; |
136 |
|
137 |
#define COIRS_VARS (xval, xmar, xbas, xsta, \ |
138 |
yval, ymar, ybas, ysta, n, m, usrmem) |
139 |
#define COIRS_ARGS (real64 *xval, real64 *xmar, int32 *xbas, \ |
140 |
int32 *xsta, real64 *yval, real64 *ymar, int32 *ybas, \ |
141 |
int32 *ysta, int32 *n, int32 *m, real64 *usrmem) |
142 |
typedef void COIRS_FUNC COIRS_ARGS; |
143 |
|
144 |
/* TODO: put chapter 6,7 and 8 functions here! */ |
145 |
|
146 |
#define COILF_VARS (flen, fn, usrmem) |
147 |
#define COILF_ARGS (int32 *flen, char *fn,real64 *usrmem) |
148 |
typedef void COILF_FUNC COILF_ARGS; |
149 |
|
150 |
#define COIEC_VARS (colno, msglen, msg, usrmem) |
151 |
#define COIEC_ARGS (int32 *colno, int32 *msglen, char msg[80],real64 *usrmem) |
152 |
typedef void COIEC_FUNC COIEC_ARGS; |
153 |
|
154 |
#define COIER_VARS (rowno, msglen, msg, usrmem) |
155 |
#define COIER_ARGS (int32 *rowno, int32 *msglen, char msg[80],real64 *usrmem) |
156 |
typedef void COIER_FUNC COIER_ARGS; |
157 |
|
158 |
#define COIENZ_VARS (colno, rowno, posno, msglen, msg, usrmem) |
159 |
#define COIENZ_ARGS (int32 *colno, int32 *rowno, int32 *posno, \ |
160 |
int32 *msglen, char msg[80],real64 *usrmem) |
161 |
typedef void COIENZ_FUNC COIENZ_ARGS; |
162 |
|
163 |
#define COIMSG_VARS (nmsg, smsg, llen, msgv, usrmem) |
164 |
#define COIMSG_ARGS (int32 *nmsg, int32 *smsg, int32 *llen, \ |
165 |
char msgv[80*15],real64 *usrmem) |
166 |
typedef void COIMSG_FUNC COIMSG_ARGS; |
167 |
|
168 |
#define COIPRG_VARS (nintgr, intrep, nreal, rl, x, usrmem, finish) |
169 |
#define COIPRG_ARGS (int32 *nintgr, int32 *intrep, int32 *nreal, \ |
170 |
real64 *rl, real64 *x, real64 *usrmem, int32 *finish) |
171 |
typedef void COIPRG_FUNC COIPRG_ARGS; |
172 |
|
173 |
#define COIORD_VARS (colno, rowno, value, resid, usrmem) |
174 |
#define COIORD_ARGS (int32 *colno, int32 *rowno, real64 *value, \ |
175 |
real64 *resid,real64 *usrmem) |
176 |
typedef void COIORD_FUNC COIORD_ARGS; |
177 |
|
178 |
#define COIORC_VARS (colno, rowno, value, resid, usrmem) |
179 |
#define COIORC_ARGS (int32 *colno, int32 *rowno, real64 *value, \ |
180 |
real64 *resid,real64 *usrmem) |
181 |
typedef void COIORC_FUNC COIORC_ARGS; |
182 |
|
183 |
#define COIBAN_VARS (msg, vers) |
184 |
#define COIBAN_ARGS (char *msg, char *vers) |
185 |
typedef void COIBAN_FUNC COIBAN_ARGS; |
186 |
|
187 |
#define COISCR_VARS (msg, len) |
188 |
#define COISCR_ARGS (char msg[80], int32 *len) |
189 |
typedef void COISCR_FUNC COISCR_ARGS; |
190 |
|
191 |
#define COIOPT_VARS (name, rval, ival, lval, usrmem) |
192 |
#define COIOPT_ARGS (char *name, real64 *rval, int32 *ival, \ |
193 |
int32 *lval, real64 *usrmem) |
194 |
typedef void COIOPT_FUNC COIOPT_ARGS; |
195 |
|
196 |
|
197 |
/* defines and typedefs for conopt supplied functions */ |
198 |
/* registration functions */ |
199 |
#define REGISTER_CONOPT_FUNCTION_ARGS (enum conopt_func_names name, \ |
200 |
void *func) |
201 |
typedef REGISTER_CONOPT_FUNCTION_FUNC REGISTER_CONOPT_FUNCTION_ARGS; |
202 |
#define UNREGISTER_CONOPT_FUNCTION_ARGS (enum conopt_func_names name, \ |
203 |
void *func) |
204 |
typedef UNREGISTER_CONOPT_FUNCTION_FUNC UNREGISTER_CONOPT_FUNCTION_ARGS; |
205 |
/* chapter 2 functions */ |
206 |
#define COICSU_ARGS (int32 *keep,real64 *usrmem) |
207 |
#define COICRS_ARGS (int32 *keep,real64 *usrmem) |
208 |
#define COIRM_ARGS () |
209 |
#define COICSM_ARGS (int32 *kept,real64 *usrmem,int32 *lwork, \ |
210 |
real64 *work,int32 *maxusd,int32 *curusd) |
211 |
typedef void COICSM_FUNC COICSM_ARGS; |
212 |
#define COICRM_ARGS (int32 *kept,real64 *usrmem,int32 *lwork, \ |
213 |
real64 *work,int32 *maxusd,int32 *curusd) |
214 |
typedef void COICRM_FUNC COICRM_ARGS; |
215 |
#define COIMEM_ARGS (int32 *nintgr,int32 *ipsz,int32 *minmem,int32 *estmem) |
216 |
typedef void COIMEM_FUNC COIMEM_ARGS; |
217 |
#define COIXIT_ARGS () |
218 |
|
219 |
#endif /* _CONOPTDLL_H */ |