/[ascend]/trunk/pygtk/interface/simulation.h
ViewVC logotype

Annotation of /trunk/pygtk/interface/simulation.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 237 - (hide annotations) (download) (as text)
Mon Jan 30 06:10:26 2006 UTC (16 years, 10 months ago) by johnpye
File MIME type: text/x-chdr
File size: 2052 byte(s)
Incidence matrix now reports the mouseover-ed variable on the console
1 johnpye 132 #ifndef ASCXX_SIMULATION_H
2     #define ASCXX_SIMULATION_H
3    
4     #include <string>
5     #include <vector>
6    
7     #include "symchar.h"
8     #include "type.h"
9     #include "instance.h"
10    
11 johnpye 237 class Variable;
12    
13 johnpye 132 extern "C"{
14     #include <compiler/createinst.h>
15     #include <solver/slv_types.h>
16     }
17    
18     class Solver;
19 johnpye 208 class SolverParameters;
20 johnpye 233 class IncidenceMatrix;
21 johnpye 132
22     #ifndef ASCEND_INCDIR
23     #define ASCEND_INCDIR "/home/john/src/ascend/trunk/base/generic/lib"
24     #endif
25     #ifndef ASCEND_LIBDIR
26     #define ASCEND_LIBDIR "/home/john/src/ascend/trunk/base/jam/Release/linux"
27     #endif
28     #ifndef ASCEND_TMPDIR
29     #define ASCEND_TMPDIR "/tmp"
30     #endif
31     #ifndef ASCEND_MAKEFILEDIR
32     #define ASCEND_MAKEFILEDIR_1 "/home/john/src/ascend/trunk/pygtk/interface"
33     #define ASCEND_MAKEFILEDIR "/home/john/src/ascend/trunk/base/generic/lib"
34     #endif
35    
36     /**
37 johnpye 164 @TODO This class is for *Simulation* instances.
38 johnpye 132
39     Handle instantiating, running initialisation functions, solving
40     and outputing results of solutions.
41    
42     In ASCEND C-code, a simulation is a special type of Instance. It
43     has a 'simulation root' instance which often needs to be used for
44     solving, inspecting, etc, rather than the simulation instance itself.
45     */
46     class Simulation : public Instanc{
47 johnpye 233 friend class IncidenceMatrix;
48    
49 johnpye 132 private:
50     Instanc simroot;
51 johnpye 164 slv_system_structure *sys;
52 johnpye 153 bool is_built;
53 johnpye 132
54     // options to pass to BinTokenSetOptions
55 johnpye 164 /// TODO these should probably be put somewhere else
56 johnpye 132 std::string *bin_srcname;
57     std::string *bin_objname;
58     std::string *bin_libname;
59     std::string *bin_cmd;
60     std::string *bin_rm;
61    
62 johnpye 233 protected:
63     slv_system_structure *getSystem();
64    
65 johnpye 132 public:
66 johnpye 164 explicit Simulation(Instance *i, const SymChar &name);
67     Simulation(const Simulation &);
68     ~Simulation();
69    
70 johnpye 132 Instanc &getModel();
71     void run(const Method &method);
72     void checkDoF() const;
73     const bool check();
74     void build();
75     void solve(Solver s);
76     std::vector<Variable> getFixableVariables();
77     void write();
78    
79     void setSolver(Solver &s);
80     const Solver getSolver() const;
81 johnpye 196
82 johnpye 208 SolverParameters getSolverParameters() const;
83 johnpye 225 void setSolverParameters(SolverParameters &);
84 johnpye 233
85     IncidenceMatrix getIncidenceMatrix();
86 johnpye 132 };
87    
88    
89     #endif

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