/[ascend]/trunk/pygtk/variable.h
ViewVC logotype

Contents of /trunk/pygtk/variable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 669 - (show annotations) (download) (as text)
Wed Jun 21 07:00:45 2006 UTC (13 years, 3 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1527 byte(s)
Merged changes from DAE branch (revisions 702 to 819) back into trunk.
This adds the Integration API to the ASCEND solver (in base/generic).
Also provides pre-alpha support for 'IDA' from the SUNDIALS suite, a DAE solver.
Many other minor code clean-ups, including adoption of new 'ASC_NEW' and friends (to replace 'ascmalloc')
Added some very sketchy stuff providing 'DIFF(...)' syntax, although it is anticipated that this will be removed.
1 /* ASCEND modelling environment
2 Copyright (C) 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, or (at your option)
7 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., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
18 */
19 #ifndef ASCXX_VARIABLE_H
20 #define ASCXX_VARIABLE_H
21
22 #include <string>
23
24 #include "simulation.h"
25
26 #include "config.h"
27 extern "C"{
28 #include <utilities/ascConfig.h>
29 #include <solver/slv_types.h>
30 #include <solver/var.h>
31 }
32
33 /**
34 This is a wrapper for the var_variable type in ASCEND. This
35 type is used in reporting the variables in an instance, including
36 when looking for 'eligible' variables which can be fixed.
37 */
38 class Variable{
39 private:
40 Simulation *sim;
41 struct var_variable *var;
42
43 public:
44 Variable();
45 Variable(const Variable &old);
46 Variable(Simulation *sim, var_variable *var);
47
48 const std::string getName() const;
49 const double getValue() const;
50 const double getNominal() const;
51 const double getUpperBound() const;
52 const double getLowerBound() const;
53 };
54
55 #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22