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

Contents of /trunk/pygtk/variable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1316 - (show annotations) (download) (as text)
Mon Mar 5 07:22:21 2007 UTC (13 years, 5 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1714 byte(s)
Another one of these big refactorings. Split out 'system' directory from 'solver' directory. This will need more work
but it's a start at getting the non-solver-specific code out separately.
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 #include <vector>
24
25 #include "simulation.h"
26 #include "instance.h"
27
28 struct Relation;
29
30 #include "config.h"
31 extern "C"{
32 #include <utilities/ascConfig.h>
33 #include <system/slv_types.h>
34 #include <system/var.h>
35 }
36
37 /**
38 This is a wrapper for the var_variable type in ASCEND. This
39 type is used in reporting the variables in an instance, including
40 when looking for 'eligible' variables which can be fixed.
41 */
42 class Variable{
43 private:
44 Simulation *sim;
45 struct var_variable *var;
46
47 public:
48 Variable();
49 Variable(const Variable &old);
50 Variable(Simulation *sim, var_variable *var);
51
52 const std::string getName() const;
53 const double getValue() const;
54 const double getNominal() const;
55 const double getUpperBound() const;
56 const double getLowerBound() const;
57 const std::vector<Relation> getIncidentRelations() const;
58 const int getNumIncidentRelations() const;
59
60 Instanc getInstance();
61 };
62
63 #endif

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