Main Page   Class Hierarchy   Compound List   File List   Contact   Download   Symbolic Constraints   Examples  

var_obj.h

00001 #ifndef SCIL_VAR_OBJ_H
00002 #define SCIL_VAR_OBJ_H
00003 
00004 #undef set
00005 #include <scil/global.h>
00006 #include <map>
00007 
00008 namespace SCIL {
00009 
00010 class cons_obj;
00011 class column;
00012 class ABA_Variable;
00013 class ILP_Problem;
00014 class subproblem;
00015 
00017 class var_obj
00018 {
00019   
00020   friend class ILP_Problem;
00021   friend class subproblem;
00022 
00023 private:
00024   
00025   std::map<cons_obj*, double> IC;
00026   ABA_Variable* Ref_AVar;
00027   
00028 public:
00030   int vi;
00032   double obj_;
00034   double uBound_;
00036   double lBound_;
00038   Vartype vt;
00039   
00042   var_obj(double obj, double lBound, double uBound, Vartype vt_) {
00043     obj_=obj; lBound_=lBound; uBound_=uBound; vt=vt_;
00044   }
00045 
00047   virtual ~var_obj() {};
00048   
00050   var_item index() {  return(vi); };
00051   
00052   void init(subproblem& S, int nr, Activation a);
00053 
00054   void init(ILP_Problem& IP, int nr, Activation a);
00055 
00057   virtual double upper_bound() {
00058     return uBound_;
00059   };
00060   
00062   virtual double lower_bound() {
00063     return lBound_;
00064   };
00065 
00067   virtual double coeff(cons_obj*) {
00068     return 0;
00069   }
00070 
00072   virtual double obj() {
00073     return obj_;
00074   };
00075 
00077   virtual Vartype type() {
00078     return vt;
00079   };
00080 
00081   void set(cons_obj* i, double d);
00082 
00083   ABA_Variable* AVar() {
00084     return Ref_AVar;
00085   };
00086 
00087   virtual double coeff(ABA_CONSTRAINT* i);
00088 
00090   virtual void non_zero_entries(column& col) {
00091   };
00092 
00094   virtual int genColumn(Active_Inequalities* ai, Column& col);
00095 
00096 };
00097 
00098 }
00099 
00100 #endif
Generated on Mon Mar 28 22:03:51 2011 for SCIL by  doxygen 1.6.3