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

variable.cc

00001 #include<scil/variable.h>
00002 #include"scip_constraint_handler.h"
00003 
00004 namespace SCIL {
00005   
00006   var_obj::var_obj() {
00007     DATA=new Variable_Data;
00008     objVal=0;
00009     lBound=1;
00010     uBound=1;
00011     vt=Vartype_Integer;
00012     ((Variable_Data*) DATA)->varP=NULL;
00013   };
00014 
00015   var_obj::var_obj(double objVal_, double lBound_, double uBound_, Vartype vt_) 
00016     : objVal(objVal_), lBound(lBound_), uBound(uBound_), vt(vt_) { 
00017     DATA=new Variable_Data;
00018   };
00019 
00020   var_obj::~var_obj() {
00021     if(((Variable_Data*) DATA)->varP!=NULL) {
00022       CHECK_ABORT( SCIPreleaseVar(((Variable_Data*) DATA)->scipp, &((Variable_Data*) DATA)->varP) );
00023     }
00024     delete (Variable_Data*) DATA;
00025   };
00026 
00027   double var_obj::obj() const {
00028     return objVal;
00029   };
00030 
00031   double var_obj::lower_bound() const {
00032     return lBound;
00033   };
00034 
00035   double var_obj::upper_bound() const {
00036     return uBound;
00037   };
00038 
00039   Vartype var_obj::type() const {
00040     return vt;
00041   };
00042 }
00043 
00044 
00045     

Generated on Tue Nov 16 15:18:23 2004 for SCIL by doxygen1.2.16