1 #ifndef SNOPTPROBLEM_PAGMO
2 #define SNOPTPROBLEM_PAGMO
4 #include "snopt_PAGMO.h"
5 #include "../../problem/base.h"
6 #include "../../algorithm/snopt.h"
11 class snoptProblem_PAGMO {
22 integer *iAfun, *jAvar;
25 integer *iGfun, *jGvar;
27 doublereal *x, *xlow, *xupp, *xmul;
28 doublereal *F, *Flow, *Fupp, *Fmul;
30 integer *xstate, *Fstate;
32 char *xnames, *Fnames;
33 integer nxnames, nFnames;
39 void errMsgExit(
const char *var );
41 integer inform, fortranStyleObj, fortranStyleAG;
42 integer minrw, miniw, mincw;
43 integer lenrw, leniw, lencw;
48 integer iSpecs, iSumm, iPrint;
50 char specname[200], printname[200];
51 integer spec_len, prnt_len;
61 void alloc ( integer lencw, integer leniw, integer lenrw );
62 void realloc ( integer lencw, integer leniw, integer lenrw );
63 void memcpyIn (
char *tcw, integer *tiw, doublereal *trw,
64 integer tlencw, integer tleniw, integer tlenrw);
65 void memcpyOut(
char *tcw, integer *tiw, doublereal *trw,
66 integer tlencw, integer tleniw, integer tlenrw);
68 snoptProblem_PAGMO(
const pagmo::problem::base& problem, pagmo::algorithm::snopt::preallocated_memory *di_comodo);
69 ~snoptProblem_PAGMO();
74 int snmema( integer &mincw, integer &miniw, integer &minrw);
77 void setParameter (
char *stroptin );
78 void getParameter (
char *stroptin,
char *stroptout );
79 void setIntParameter (
const char *stropt, integer opt );
80 void getIntParameter (
const char *stropt, integer &opt );
81 void setRealParameter(
const char *stropt, doublereal opt );
82 void getRealParameter(
const char *stropt, doublereal &opt );
83 void solve ( integer starttype );
84 void setPrintFile (
const char printname[] );
85 void setSpecFile (
char specname[] );
88 void setProblemSize( integer n, integer neF );
89 void setObjective ( integer ObjRow, doublereal ObjAdd );
90 void setA ( integer lenA, integer *iAfun, integer *jAvar,
92 void setNeA ( integer neA );
93 void setG ( integer lenG, integer *iGfun, integer *jGvar );
94 void setNeG ( integer neG );
95 integer getNeG (){
return neG;}
96 void setX ( doublereal *x, doublereal *xlow, doublereal *xupp,
97 doublereal *xmul, integer *xstate );
98 void setF ( doublereal *F, doublereal *Flow, doublereal *Fupp,
99 doublereal *Fmul, integer *Fstate );
100 void setXNames (
char *xnames, integer nxnames );
101 void setFNames (
char *Fnames, integer nFnames );
102 void setProbName (
const char *Prob );
103 void setUserFun ( My_fp usrfun );
104 void activate_screen_output() {iSumm = 6;}
105 void deactivate_screen_output() {iSumm = 0;}