1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include "library.h"
#include "simulation.h"
#include "solver.h"
#include "solverreporter.h"
#include <iostream>
using namespace std;
int main(void){
Library L;
#define TESTNAME "test6"
L.load("test/ipopt/" TESTNAME ".a4c");
Type t = L.findType(TESTNAME);
#undef TESTNAME
Simulation S = t.getSimulation("S",1);
SolverReporter R;
try{
S.solve(Solver("IPOPT"),R);
}catch(runtime_error &e){
cerr << "ERROR in solving:" << e.what() << endl;
exit(1);
}
S.run(t.getMethod("self_test"));
L.clear();
}
|