/[ascend]/trunk/ascxx/testconopt.cpp
ViewVC logotype

Contents of /trunk/ascxx/testconopt.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2579 - (show annotations) (download) (as text)
Wed Mar 14 23:05:32 2012 UTC (10 years, 3 months ago) by jpye
File MIME type: text/x-c++src
File size: 417 byte(s)
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 L.load("conopttest.a4c");
13 Type t = L.findType("conopttest");
14 cerr << "Type = " << t.getName() << endl;
15 Simulation S = t.getSimulation("S",1);
16
17 S.build();
18
19 cerr << "About to solve..." << endl;
20
21 SolverReporter R;
22 S.solve(Solver("CONOPT"),R);
23 }

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