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

Contents of /trunk/pygtk/variable.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 772 - (show annotations) (download) (as text)
Fri Jul 14 06:03:47 2006 UTC (14 years, 3 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1666 byte(s)
Improved the reporting of structural singularities in PyGTK interface.
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
27 struct Relation;
28
29 #include "config.h"
30 extern "C"{
31 #include <utilities/ascConfig.h>
32 #include <solver/slv_types.h>
33 #include <solver/var.h>
34 }
35
36 /**
37 This is a wrapper for the var_variable type in ASCEND. This
38 type is used in reporting the variables in an instance, including
39 when looking for 'eligible' variables which can be fixed.
40 */
41 class Variable{
42 private:
43 Simulation *sim;
44 struct var_variable *var;
45
46 public:
47 Variable();
48 Variable(const Variable &old);
49 Variable(Simulation *sim, var_variable *var);
50
51 const std::string getName() const;
52 const double getValue() const;
53 const double getNominal() const;
54 const double getUpperBound() const;
55 const double getLowerBound() const;
56 const std::vector<Relation> getIncidentRelations() const;
57 const int getNumIncidentRelations() const;
58 };
59
60 #endif

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