MeshKit  1.0
LPSolveClass.hpp
Go to the documentation of this file.
00001 //-----------------------------------C++-------------------------------------//
00002 // File: src/algs/Sweep/LPSolveClass.hpp
00003 // Monday Feb 01 10:50 2012
00004 // Brief: LPSolveClass class definition: do the LPSolveClass 
00005 //        linear programming using lpsolve
00006 //---------------------------------------------------------------------------//
00007 
00008 
00009 #ifndef LPSOLVECLASS_HPP
00010 #define LPSOLVECLASS_HPP
00011 
00012 #include <stdlib.h>
00013 #include <stdio.h>
00014 #include <assert.h>
00015 #include <string>
00016 #include <iostream>
00017 #include <fstream>
00018 #include <string.h>
00019 #include <sstream>
00020 #include <vector>
00021 #include <set>
00022 #include <list>
00023 #include <math.h>
00024 #include <map>
00025 
00026 
00027 using namespace std;
00028 
00029 
00030 namespace MeshKit
00031 {
00032 //===========================================================================//
00039 //===========================================================================//
00040 
00041 class LPSolveClass
00042 {       
00043 public:
00044     LPSolveClass();
00045     ~LPSolveClass();
00046 
00047         //setup the objective function and constraints
00048         void SetupObj(vector<double> left, double const_value = 0.0);
00049         void SetupInEqu(vector<vector<double> > left, vector<double> right);
00050         void SetupEqu(vector<vector<double> > left, vector<double> right);
00051         void SetupConst(vector<int> right);
00052 
00053 
00054     //Execute function
00055     int Execute();
00056 
00057         //return the variables
00058         void GetVariables(vector<int> &var);
00059 
00060    
00061 
00062 
00063 private://private member functions
00064         
00065 
00066 private://private member variable
00067         vector<double> coefficients;
00068         double obj_const;
00069         vector<vector<double> > A_inequ;
00070         vector<double> b_inequ;
00071         vector<vector<double> > A_equ;
00072         vector<double> b_equ;
00073         vector<int> b_const;
00074 
00075         vector<int> variables;
00076    
00077 };
00078 
00079 }
00080 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines