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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 225 - (show annotations) (download) (as text)
Fri Jan 27 14:55:43 2006 UTC (14 years, 10 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1914 byte(s)
Added const-ness to 2nd parameter of slv_set_char_parameter.
Implemented setting of int, real and string parameters via PyGTK interface.
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 class SolverParameters;
20
21 #ifndef ASCEND_INCDIR
22 #define ASCEND_INCDIR "/home/john/src/ascend/trunk/base/generic/lib"
23 #endif
24 #ifndef ASCEND_LIBDIR
25 #define ASCEND_LIBDIR "/home/john/src/ascend/trunk/base/jam/Release/linux"
26 #endif
27 #ifndef ASCEND_TMPDIR
28 #define ASCEND_TMPDIR "/tmp"
29 #endif
30 #ifndef ASCEND_MAKEFILEDIR
31 #define ASCEND_MAKEFILEDIR_1 "/home/john/src/ascend/trunk/pygtk/interface"
32 #define ASCEND_MAKEFILEDIR "/home/john/src/ascend/trunk/base/generic/lib"
33 #endif
34
35 /**
36 @TODO This class is for *Simulation* instances.
37
38 Handle instantiating, running initialisation functions, solving
39 and outputing results of solutions.
40
41 In ASCEND C-code, a simulation is a special type of Instance. It
42 has a 'simulation root' instance which often needs to be used for
43 solving, inspecting, etc, rather than the simulation instance itself.
44 */
45 class Simulation : public Instanc{
46 private:
47 Instanc simroot;
48 slv_system_structure *sys;
49 bool is_built;
50
51 // options to pass to BinTokenSetOptions
52 /// TODO these should probably be put somewhere else
53 std::string *bin_srcname;
54 std::string *bin_objname;
55 std::string *bin_libname;
56 std::string *bin_cmd;
57 std::string *bin_rm;
58
59 public:
60 explicit Simulation(Instance *i, const SymChar &name);
61 Simulation(const Simulation &);
62 ~Simulation();
63
64 Instanc &getModel();
65 void run(const Method &method);
66 void checkDoF() const;
67 const bool check();
68 void build();
69 void solve(Solver s);
70 std::vector<Variable> getFixableVariables();
71 void write();
72
73 void setSolver(Solver &s);
74 const Solver getSolver() const;
75
76 SolverParameters getSolverParameters() const;
77 void setSolverParameters(SolverParameters &);
78 };
79
80
81 #endif

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