/[ascend]/trunk/pygtk/testipopt.cpp
ViewVC logotype

Contents of /trunk/pygtk/testipopt.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2203 - (show annotations) (download) (as text)
Fri May 21 04:29:59 2010 UTC (14 years, 6 months ago) by jpye
File MIME type: text/x-c++src
File size: 450 byte(s)
USe PNG image for splash, instead of SVG.
Change installer to use Tcl 8.5.8.2.
Fix URL for Tcl/Tk download.
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 L.load("test/ipopt/test2.a4c");
13 Type t = L.findType("test2");
14 Simulation S = t.getSimulation("S");
15 SolverReporter R;
16 try{
17 S.solve(Solver("IPOPT"),R);
18 }catch(runtime_error &e){
19 cerr << "ERROR in solving:" << e.what() << endl;
20 exit(1);
21 }
22 S.run(t.getMethod("self_test"));
23 }

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