00001 00016 #ifndef OSMATLAB_H 00017 #define OSMATLAB_H 00018 // 00019 //OS headers 00020 #include "OSCoinSolver.h" 00021 #include "OSResult.h" 00022 #include "OSiLReader.h" 00023 #include "OSiLWriter.h" 00024 #include "OSInstance.h" 00025 #include "OSDefaultSolver.h" 00026 #include "OSDataStructures.h" 00027 #include "OSSolverAgent.h" 00028 #include "OSErrorClass.h" 00029 00030 #ifdef COIN_HAS_LINDO 00031 #include "OSLindoSolver.h" 00032 #endif 00033 00034 #ifdef COIN_HAS_IPOPT 00035 #include "OSIpoptSolver.h" 00036 #endif 00037 00038 00039 00040 //end OS headers 00041 00042 #include <string> 00043 00060 class OSMatlab { 00061 00062 public: 00063 00065 OSMatlab(); 00066 00068 ~OSMatlab() ; 00069 00073 SparseMatrix *sparseMat; 00074 00078 double *bl; 00079 00083 double *bu; 00084 00088 double *obj; 00089 00093 double *vl; 00094 00098 double *vu; 00099 00103 int numVar; 00104 00108 int numCon; 00109 00113 char *varType; 00114 00118 bool objType; 00119 00121 int numQTerms; 00122 00126 int *qRows; 00127 00131 int *qIndex1; 00132 00136 int *qIndex2; 00137 00141 double *qVal; 00142 00146 DefaultSolver *solverType; 00147 00149 std::string instanceName; 00150 00152 std::string sSolverName; 00153 00155 std::string sAgentAddress; 00156 00162 std::string solve(); 00163 00167 void createOSInstance(); 00168 00173 OSInstance *osinstance; 00174 00178 std::string osil; 00179 00180 };//OSMatlabclass 00181 00182 #endif