Parent Directory | Revision Log
Workaround for bug 494. Very close to the changes that Grivan suggested in changeset 3482. ASCEND now working in Fedora 16 with SWIG 2.0.4.
1 | #include "library.h" |
2 | #include "simulation.h" |
3 | #include "solver.h" |
4 | #include "solverreporter.h" |
5 | |
6 | #include <iostream> |
7 | using namespace std; |
8 | |
9 | int main(void){ |
10 | |
11 | Library L; |
12 | #define TESTNAME "test6" |
13 | L.load("test/ipopt/" TESTNAME ".a4c"); |
14 | Type t = L.findType(TESTNAME); |
15 | #undef TESTNAME |
16 | Simulation S = t.getSimulation("S",1); |
17 | SolverReporter R; |
18 | try{ |
19 | S.solve(Solver("IPOPT"),R); |
20 | }catch(runtime_error &e){ |
21 | cerr << "ERROR in solving:" << e.what() << endl; |
22 | exit(1); |
23 | } |
24 | S.run(t.getMethod("self_test")); |
25 | |
26 | L.clear(); |
27 | } |
john.pye@anu.edu.au | ViewVC Help |
Powered by ViewVC 1.1.22 |