lemon/lp_base.h
changeset 2218 50f1a780a5ff
parent 2185 e2bf51eab7f7
child 2260 4274224f8a7d
equal deleted inserted replaced
32:45872344e182 33:802267e3269a
    73 	  index[first_free]=n;
    73 	  index[first_free]=n;
    74 	  first_free=next;
    74 	  first_free=next;
    75 	}
    75 	}
    76 	return cross[n];
    76 	return cross[n];
    77       }
    77       }
    78       ///\todo Create an own exception type.
    78       else {
    79       else throw LogicError(); //floatingId-s must form a continuous range;
    79 	///\todo Create an own exception type.
       
    80 	throw LogicError(); //floatingId-s must form a continuous range;
       
    81       }
    80     }
    82     }
    81     ///Remove a fix id.
    83     ///Remove a fix id.
    82 
    84 
    83     ///\param n is a fix id
    85     ///\param n is a fix id
    84     ///
    86     ///
  1167     ///Possible variable (coloumn) types (e.g. real, integer, binary etc.)
  1169     ///Possible variable (coloumn) types (e.g. real, integer, binary etc.)
  1168     enum ColTypes {
  1170     enum ColTypes {
  1169       ///Continuous variable
  1171       ///Continuous variable
  1170       REAL = 0,
  1172       REAL = 0,
  1171       ///Integer variable
  1173       ///Integer variable
  1172       INTEGER = 1
  1174 
       
  1175       ///Unfortunately, cplex 7.5 somewhere writes something like
       
  1176       ///#define INTEGER 'I'
       
  1177       LEMON_INTEGER = 1
  1173       ///\todo No support for other types yet.
  1178       ///\todo No support for other types yet.
  1174     };
  1179     };
  1175 
  1180 
  1176     ///Sets the type of the given coloumn to the given type
  1181     ///Sets the type of the given coloumn to the given type
  1177     ///
  1182     ///
  1190     ///Sets the type of the given Col to integer or remove that property.
  1195     ///Sets the type of the given Col to integer or remove that property.
  1191     ///
  1196     ///
  1192     ///Sets the type of the given Col to integer or remove that property.
  1197     ///Sets the type of the given Col to integer or remove that property.
  1193     void integer(Col c, bool enable) {
  1198     void integer(Col c, bool enable) {
  1194       if (enable)
  1199       if (enable)
  1195 	colType(c,INTEGER);
  1200 	colType(c,LEMON_INTEGER);
  1196       else
  1201       else
  1197 	colType(c,REAL);
  1202 	colType(c,REAL);
  1198     }
  1203     }
  1199 
  1204 
  1200     ///Gives back whether the type of the column is integer or not.
  1205     ///Gives back whether the type of the column is integer or not.
  1201     ///
  1206     ///
  1202     ///Gives back the type of the column.
  1207     ///Gives back the type of the column.
  1203     ///\return true if the column has integer type and false if not.
  1208     ///\return true if the column has integer type and false if not.
  1204     bool integer(Col c){
  1209     bool integer(Col c){
  1205       return (colType(c)==INTEGER);
  1210       return (colType(c)==LEMON_INTEGER);
  1206     }
  1211     }
  1207 
  1212 
  1208     /// The status of the MIP problem
  1213     /// The status of the MIP problem
  1209     SolutionStatus mipStatus() {
  1214     SolutionStatus mipStatus() {
  1210       return _getMipStatus();
  1215       return _getMipStatus();