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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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