1 |
/* ASCEND modelling environment |
2 |
Copyright (C) 1990-2006 Carnegie-Mellon University |
3 |
|
4 |
This program is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2 of the License, or |
7 |
(at your option) any later version. |
8 |
|
9 |
This program is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
13 |
|
14 |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software |
16 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 |
This file is part of the SLV solver. |
18 |
*//** @file |
19 |
Sensitivity add-on for ASCEND |
20 |
by Tom Epperly, Kirk Abbot |
21 |
|
22 |
-- notes here have been moved to models/sensitivity/sensitivity.c -- |
23 |
*/ |
24 |
|
25 |
#ifndef ASC_SENSITIVITY_H |
26 |
#define ASC_SENSITIVITY_H |
27 |
|
28 |
#include <utilities/ascConfig.h> |
29 |
#include <compiler/instance_enum.h> |
30 |
#include <compiler/compiler.h> |
31 |
#include <general/list.h> |
32 |
#include <compiler/extfunc.h> |
33 |
#include <solver/mtx.h> |
34 |
#include <solver/mtx_basic.h> |
35 |
#include <solver/mtx_perms.h> |
36 |
#include <solver/mtx_query.h> |
37 |
#include <solver/linsol.h> |
38 |
#include <solver/linsolqr.h> |
39 |
#include <solver/slv_types.h> |
40 |
#include <solver/var.h> |
41 |
#include <solver/rel.h> |
42 |
#include <solver/discrete.h> |
43 |
#include <solver/conditional.h> |
44 |
#include <solver/logrel.h> |
45 |
#include <solver/bnd.h> |
46 |
#include <solver/calc.h> |
47 |
#include <solver/relman.h> |
48 |
#include <solver/slv_common.h> |
49 |
#include <solver/slv_stdcalls.h> |
50 |
#include <solver/system.h> |
51 |
#include <solver/slv_client.h> |
52 |
|
53 |
/*-------------------------------------------------- |
54 |
The following functions are provided only for use by LSODE. We want to |
55 |
phase this out and replace with a new solver like IDA. |
56 |
*/ |
57 |
ASC_DLLSPEC int Compute_J(slv_system_t sys); |
58 |
ASC_DLLSPEC int NumberFreeVars(slv_system_t sys); |
59 |
int NumberIncludedRels(slv_system_t sys); |
60 |
int LUFactorJacobian(slv_system_t sys); |
61 |
ASC_DLLSPEC int Compute_dy_dx_smart(slv_system_t sys, real64 *rhs, real64 **dy_dx, |
62 |
int *inputs, int ninputs, int *outputs, int noutputs |
63 |
); |
64 |
|
65 |
/*-------------------------------------------------- |
66 |
The following are provided to the external module 'sensitivity'. We want |
67 |
to move all of these out into the external shared object, but can't until |
68 |
the LSODE dependency goes away. |
69 |
*/ |
70 |
|
71 |
ASC_DLLSPEC int finite_difference(struct gl_list_t *arglist); |
72 |
ASC_DLLSPEC struct Instance *FetchElement(struct gl_list_t *arglist, |
73 |
unsigned long whichbranch, |
74 |
unsigned long whichelement); |
75 |
ASC_DLLSPEC int NumberRels(slv_system_t sys); |
76 |
ASC_DLLSPEC int LUFactorJacobian1(slv_system_t sys,int rank); |
77 |
ASC_DLLSPEC struct Instance *FetchElement(struct gl_list_t *arglist, |
78 |
unsigned long whichbranch, |
79 |
unsigned long whichelement); |
80 |
|
81 |
/* I *think* that we can probably replace these with 'densemtx.h' functions. */ |
82 |
|
83 |
ASC_DLLSPEC real64 **make_matrix(int nrows, int ncols); |
84 |
ASC_DLLSPEC void free_matrix(real64 **matrix, int nrows); |
85 |
|
86 |
#endif /* ASC_SENSITIVITY_H */ |
87 |
|