Last change
on this file since 3752 was 2649, checked in by ansari, 21 years ago |
Ajout programme test methode minimisation simplex - Reza 09/02/2005
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2649] | 1 | #include <stdio.h>
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include "math.h"
|
---|
| 4 | #include <iostream>
|
---|
| 5 | #include <string>
|
---|
| 6 |
|
---|
| 7 | #include "sopnamsp.h"
|
---|
| 8 | #include "simplex.h"
|
---|
| 9 | #include "histinit.h"
|
---|
| 10 | #include "pexceptions.h"
|
---|
| 11 | #include <typeinfo>
|
---|
| 12 | #include "timing.h"
|
---|
| 13 |
|
---|
| 14 | int main(int narg, char* arg[])
|
---|
| 15 | {
|
---|
| 16 | cout << " ---- Programme tsimplex.cc - Test de Minimisation simplex --- " << endl;
|
---|
| 17 | int prt = 0;
|
---|
| 18 | int tsel = -1;
|
---|
| 19 | int rc = 0;
|
---|
| 20 | if ((narg > 1) && (strcmp(arg[1],"-h") == 0)) {
|
---|
| 21 | cout << " tsimplex: test de Minimisation simplex (classe MinZSimplex) \n"
|
---|
| 22 | << " Usage: tsimplex [ISel (=-1,0,..,4) PrtLev (=0,1,2,...) \n"
|
---|
| 23 | << " defaut Isel=-1 (all) , PrtLev=0 \n " << endl;
|
---|
| 24 | return rc;
|
---|
| 25 | }
|
---|
| 26 | if (narg > 1) tsel = atoi(arg[1]);
|
---|
| 27 | if (narg > 2) prt = atoi(arg[2]);
|
---|
| 28 | try {
|
---|
| 29 | SophyaInit();
|
---|
| 30 | InitTim();
|
---|
| 31 | rc = MinZSimplex::AutoTest(tsel, prt);
|
---|
| 32 | }
|
---|
| 33 | catch (PThrowable & exc) {
|
---|
| 34 | cerr << " tsimplex.cc: Catched Exception (PThrowable)" << (string)typeid(exc).name()
|
---|
| 35 | << " - Msg= " << exc.Msg() << endl;
|
---|
| 36 | rc = 99;
|
---|
| 37 | }
|
---|
| 38 | catch (std::exception & e) {
|
---|
| 39 | cerr << " tsimplex.cc: Catched std::xception "
|
---|
| 40 | << " - what()= " << e.what() << endl;
|
---|
| 41 | rc = 98;
|
---|
| 42 | }
|
---|
| 43 | catch (...) {
|
---|
| 44 | cerr << " tsimplex.cc: some other exception (...) was caught ! " << endl;
|
---|
| 45 | rc = 97;
|
---|
| 46 | }
|
---|
| 47 | PrtTim("End tsimplex " );
|
---|
| 48 | cout << " ---- Programme tsimplex.cc - FIN (Rc=" << rc << ") --- " << endl;
|
---|
| 49 | return rc;
|
---|
| 50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.