solverIF.h

Go to the documentation of this file.
00001 #ifndef solverIF__H
00002 #define solverIF__H
00003 
00004 #include <stdlib.h>
00005 #include <stdio.h>
00006 #include <time.h>
00007 #include <iostream>
00008 #include <string>
00009 #include <vector>
00010 #include <queue>
00011 #include <map>
00012 
00013 #include "lp_lib.h"
00014 #include "mosek.h"
00015 
00016 #define SIF_MOSEK 1
00017 #define SIF_LPSOLVE 2
00018 
00019 #define PRINT_LP 0
00020 
00021 #define BD_LE 1
00022 #define BD_GE 2
00023 #define BD_EQ 3
00024 
00025 #define MAX_SOLVER_VAL 1e11
00026 
00027 using namespace std;
00028 
00029 namespace solver {
00030 
00031   class solverIF {
00032   public:
00033     ~solverIF(){
00034         deleteSolver();
00035     }
00036     /* Solver interface */
00037     static int solverType;
00038     void deleteSolver();
00039     void initializeSolver(int);
00040     void setBound(int, double, double);
00041     void setFree(int);
00042     void setObjective(int, double *, int *); 
00043     void addConstraint(int, double *, int *, int, double);
00044     void setLowerBound(int, double);
00045     void setUpperBound(int, double);
00046     void addQuadObjective(int, double *, int *, int *);
00047     void addQuadObjectiveEntry(double, int, int);
00048     int solveLP(double * xx);
00049     int solveQP(double * xx);
00050     void copySolution();
00051       
00052     //#ifdef LPSOLV      
00053     lprec * _lp;
00054     //#endif
00055       
00056     //#ifdef MOSEKSOLV      
00057     static MSKenv_t env;
00058     static MSKtask_t task;
00059     MSKrescodee r;
00060     //#endif
00061       
00062     int _nConstrs;
00063     int _nVars;
00064   };
00065 
00066 };
00067 
00068 #endif

Generated on Thu Aug 25 14:24:05 2011 by  doxygen 1.3.9.1